Skip to content

feat(nimbus): Always fetch newer results#15871

Open
RJAK11 wants to merge 2 commits into
mainfrom
15737
Open

feat(nimbus): Always fetch newer results#15871
RJAK11 wants to merge 2 commits into
mainfrom
15737

Conversation

@RJAK11

@RJAK11 RJAK11 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Because

  • the fetch task used experiment status and a fixed time window to decide when to fetch results

This commit

  • adds a field to track when an experiment's results were last loaded
  • finds the newest modified time among each experiment's statistics, metadata, and errors files
  • fetches results when that timestamp is newer than the stored one and saves the new timestamp

Fixes #15737

@mikewilli mikewilli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Will this work with our error checks? Right now we inject an error inside the client code if we expect results but the file doesn't exist. I think with this new feature we'd just skip over them.

Comment thread experimenter/experimenter/experiments/tests/test_changelog_utils.py Outdated
migrations.AddField(
model_name='nimbusexperiment',
name='results_data_updated_at',
field=models.DateTimeField(blank=True, null=True, verbose_name='Results Data Last Updated'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What's going to be the behavior the first time we run the new version of the task? Refresh every experiment's results whether it needs them or not?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes I believe so. I wasn't able to think of an approach that would safely prevent this.

Comment thread experimenter/experimenter/jetstream/tasks.py Outdated
Comment thread experimenter/experimenter/jetstream/tasks.py Outdated
Comment thread experimenter/experimenter/jetstream/tasks.py Outdated
Because

* the fetch task used experiment status and a fixed time window to decide when to fetch results

This commit

* adds a field to track when an experiment's results were last loaded
* finds the newest modified time among each experiment's statistics, metadata, and errors files
* refreshes when that timestamp is newer than the stored one, and saves the new timestamp after loading
* still refreshes when an expected results window is missing from the bucket so that missing-results errors are injected

Fixes #15737
Because

* the fetch task used experiment status and a fixed time window to decide when to fetch results

This commit

* adds a field to track when an experiment's results were last loaded
* finds the newest modified time among each experiment's statistics, metadata, and errors files
* refreshes when that timestamp is newer than the stored one, and saves the new timestamp after loading
* still refreshes when an expected results window is missing from the bucket so that missing-results errors are injected

Fixes #15737
@RJAK11

RJAK11 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Will this work with our error checks? Right now we inject an error inside the client code if we expect results but the file doesn't exist. I think with this new feature we'd just skip over them.

Thank you @mikewilli for the review! You are right, the changes would've skipped the error checks and I didn’t notice that. I added a new function so that the task also re-fetches when we expect a window whose file isn't in the bucket, so now the client should still inject the error. It's bounded by the analysis in the exact way we originally used so a result that never arrives doesn't just keep refetching forever. This might be a messy solution but I couldn’t think of another approach. Let me know what you think!

@RJAK11 RJAK11 requested a review from mikewilli June 16, 2026 13:27
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.

Always fetch new results

2 participants