Skip to content

Support STAGED->RUNNING transitions in _apply_trial_statuses#5214

Closed
yangjoanna wants to merge 1 commit into
facebook:mainfrom
yangjoanna:export-D106868394
Closed

Support STAGED->RUNNING transitions in _apply_trial_statuses#5214
yangjoanna wants to merge 1 commit into
facebook:mainfrom
yangjoanna:export-D106868394

Conversation

@yangjoanna
Copy link
Copy Markdown
Contributor

Summary:
The Orchestrator skipped all is_deployed statuses (STAGED and RUNNING) in _apply_trial_statuses, so trials with staging_required=True could never transition from STAGED to RUNNING through the polling path. This fixes that by processing actual status changes (e.g. STAGED->RUNNING) while still skipping no-ops (RUNNING->RUNNING).

Also adds a started_time parameter to mark_running() so runners can provide the actual deployment timestamp instead of defaulting to datetime.now(). The Orchestrator reads time_started from run_metadata and passes it through on transition.

Reviewed By: saitcakmak

Differential Revision: D106868394

Summary:
The Orchestrator skipped all `is_deployed` statuses (STAGED and RUNNING) in `_apply_trial_statuses`, so trials with `staging_required=True` could never transition from STAGED to RUNNING through the polling path. This fixes that by processing actual status changes (e.g. STAGED->RUNNING) while still skipping no-ops (RUNNING->RUNNING).

Also adds a `started_time` parameter to `mark_running()` so runners can provide the actual deployment timestamp instead of defaulting to `datetime.now()`. The Orchestrator reads `time_started` from `run_metadata` and passes it through on transition.

Reviewed By: saitcakmak

Differential Revision: D106868394
@meta-cla meta-cla Bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jun 2, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Jun 2, 2026

@yangjoanna has exported this pull request. If you are a Meta employee, you can view the originating Diff in D106868394.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.40230% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.50%. Comparing base (1a2b2cf) to head (461bce0).

Files with missing lines Patch % Lines
ax/orchestration/orchestrator.py 80.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5214      +/-   ##
==========================================
- Coverage   96.51%   96.50%   -0.01%     
==========================================
  Files         617      617              
  Lines       69694    69776      +82     
==========================================
+ Hits        67262    67339      +77     
- Misses       2432     2437       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Jun 2, 2026

This pull request has been merged in 8749b08.

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

Labels

CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants