Skip to content

Store the underlying model's last refresh time in the metrics view state#6735

Merged
k-anshul merged 2 commits intomainfrom
begelundmuller/copy-model-refresh-timestamp-to-metrics-views
Feb 21, 2025
Merged

Store the underlying model's last refresh time in the metrics view state#6735
k-anshul merged 2 commits intomainfrom
begelundmuller/copy-model-refresh-timestamp-to-metrics-views

Conversation

@begelundmuller
Copy link
Copy Markdown
Contributor

@begelundmuller begelundmuller commented Feb 20, 2025

Changes:

  • Adds a model_refreshed_on field on the metrics view state.
  • During validation, it copies the metrics view's underlying model's refreshed_on into model_refreshed_on.
  • model_refreshed_on will be empty for metrics views that are backed by external tables
  • The model_refreshed_on field will not be updated if the metrics view fails validation and keeps serving the old valid_spec.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@begelundmuller begelundmuller self-assigned this Feb 20, 2025
@k-anshul k-anshul merged commit 3a3c604 into main Feb 21, 2025
12 checks passed
@k-anshul k-anshul deleted the begelundmuller/copy-model-refresh-timestamp-to-metrics-views branch February 21, 2025 11:04
grahamplata pushed a commit that referenced this pull request Feb 21, 2025
…ate (#6735)

* Store the underlying model's last refresh time in the metrics view state

* Add tests
ericpgreen2 pushed a commit that referenced this pull request Feb 25, 2025
…ate (#6735)

* Store the underlying model's last refresh time in the metrics view state

* Add tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants