Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix (Exports): Simplify time ranges for on-demand exports #7241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 1, 2025

Conversation

ericpgreen2
Copy link
Contributor

@ericpgreen2 ericpgreen2 commented Apr 30, 2025

This PR changes the way we provide time ranges to the Export API for on-demand (non-scheduled) exports.

Previously, we provided a time range expression (e.g. P7D, rill-MTD) and amended it by also specifying an endDate. (This amendment attempted to ensure consistency with the data shown in the UI, but the approach was faulty).

Now, we pass in the startTime and endTime from the timeControlsStore. Currently, the timeControlsStore resolves time range expressions client-side. However, in the future, we should use the backend's MetricsViewTimeRanges API to resolve time ranges.

Closes https://github.com/rilldata/rill-private-issues/issues/1650

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!

@ericpgreen2 ericpgreen2 changed the title fix (Exports): Only set explicit timeEnd for "latest" time ranges fix (Exports): Simplify time ranges for on-demand exports Apr 30, 2025
@ericpgreen2 ericpgreen2 marked this pull request as ready for review April 30, 2025 21:05
@ericpgreen2 ericpgreen2 merged commit ba9d923 into main May 1, 2025
9 checks passed
@ericpgreen2 ericpgreen2 deleted the fix-exports-conditionally-apply-end-time branch May 1, 2025 12:06
ericpgreen2 added a commit that referenced this pull request May 1, 2025
* Only set explicit `timeEnd` for "latest" time ranges

* Simpler. Just use `startTime` and `endTime` from `timeControlsStore`.
grahamplata pushed a commit that referenced this pull request May 8, 2025
* Only set explicit `timeEnd` for "latest" time ranges

* Simpler. Just use `startTime` and `endTime` from `timeControlsStore`.
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.

3 participants