Skip to content

Comments

Add is_temporary flag to archiving metrics#24087

Open
caddoo wants to merge 4 commits into5.x-devfrom
DEV-19865
Open

Add is_temporary flag to archiving metrics#24087
caddoo wants to merge 4 commits into5.x-devfrom
DEV-19865

Conversation

@caddoo
Copy link
Contributor

@caddoo caddoo commented Feb 16, 2026

Description

This PR adds archiving metrics support for identifying temporary archives via a new is_temporary flag

  • Why: Analysts need to distinguish archives triggered before a period ends (site timezone) from finalized archives for
    performance analysis and comparisons.
  • Core behavior: is_temporary is computed from archive start time vs period end in the site timezone.
  • Schema/migration: introduces archiving_metrics.is_temporary with default 0 for existing rows.
  • Testing: unit tests cover period types and edge/timezone cases; integration test confirms DB write includes the new column/value.

Checklist

  • [✔] I have understood, reviewed, and tested all AI outputs before use
  • [✔] All AI instructions respect security, IP, and privacy rules

Review

@caddoo caddoo added this to the 5.8.0 milestone Feb 16, 2026
@caddoo caddoo marked this pull request as ready for review February 16, 2026 05:40
@caddoo caddoo requested a review from a team February 16, 2026 05:41
Copy link
Member

@sgiehl sgiehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks fine. Left a small suggestion.
Besides that the whole plugin actually misses some end-to-end tests. So triggering a real archiving and ensuring that the metrics are afterwards correctly stored.
I'm not adding an approval here for now, as bumping the version to 5.8.0-b2 should be done after 5.8.0-b1 🙈

@caddoo
Copy link
Contributor Author

caddoo commented Feb 17, 2026

Generally looks fine. Left a small suggestion. Besides that the whole plugin actually misses some end-to-end tests. So triggering a real archiving and ensuring that the metrics are afterwards correctly stored. I'm not adding an approval here for now, as bumping the version to 5.8.0-b2 should be done after 5.8.0-b1 🙈

Thanks!

I believe e2e is covered from the API level inwards, do you want larger scoped tests? The details about the correct values being stored are handled in other tests.

testArchiveReportsWritesMetricsOnceAndDoesNotWriteAgainWhenReusingDbArchive

Copy link
Member

@sgiehl sgiehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: We need to release b2, once this is merged.

@caddoo caddoo enabled auto-merge (squash) February 20, 2026 03:07
@caddoo caddoo disabled auto-merge February 20, 2026 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants