[CI/Tests] Open a daily PR that moves the OME pin - #16
Conversation
Signed-off-by: yifeliu <31553858+pallasathena92@users.noreply.github.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (7)
Included review availability: This review used your included allowance. 3 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour. 📝 WalkthroughWalkthroughAdds a daily and manually dispatched workflow to update the OME pin. When an update is eligible, the workflow regenerates the API reference and publishes the pin and page through a pull request. ChangesOME pin update
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~40 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant MoveOMEWorkflow
participant OMEGitHubAPI
participant OMECheckout
participant GitHubActionsArtifact
participant move_pin.py
participant GitHubPullRequests
MoveOMEWorkflow->>OMEGitHubAPI: Read newest OME main commit
MoveOMEWorkflow->>OMECheckout: Check out target commit and generate API reference
MoveOMEWorkflow->>GitHubActionsArtifact: Upload generated page
MoveOMEWorkflow->>move_pin.py: Pass baseline, target, page, and dry_run
move_pin.py->>OMEGitHubAPI: Recheck pin update decision
move_pin.py->>GitHubPullRequests: Open pull request when publishing proceeds
Merge Risk: ⚪ Minimal · up to This adds a daily workflow that opens a pull request to move the OME pin and regenerate the API reference. The supplied evidence shows no concrete merge-blocking risk. Manual dry-run and live-run checks are still advisable after merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 7.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 42 functions across 2 files. (5 skipped: 5 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
What this PR does
Adds the Move the OME Pin workflow. Once a day, when OME's
mainis ahead ofome.ref, it opens one pull request that moves the pin to OME's newest commit and regenerates the API reference from that commit. A maintainer reviews and merges that pull request..github/workflows/move-ome-pin.ymlruns daily at 15:17 UTC, ahead of the nightly at 09:23 UTC, and on manual dispatch with adry_runinput. Scheduled runs needNIGHTLY_DOCS_ENABLED, like the nightly. It runs on GitHub-hosted runners and calls no model.hack/nightly-docs/move_pin.pydecides whether the pin has to move and publishes the pull request.The rules it follows:
ome.ref, it opens no other and never rewrites that one, so a maintainer can push fixes to its branch.main.Why we need it
The nightly documents OME at the commit in
ome.ref, and nothing moved the pin automatically. Until someone followed the manual steps in CONTRIBUTING.md, the nightly had nothing new to document. OME'smainis already ahead of the pin.How to test
python3 -m unittest discover -s hack/nightly-docs -p '*_test.py'runs 17 new tests inmove_pin_test.py.move_pin.py planagainst the real repositories, thenpublishwithDRY_RUN=truein a scratch clone, using the page generated from OME at0510610. It staged onlyome.ref, because the regenerated page is identical to the committed one.main. After merging, rungh workflow run move-ome-pin.yml -R ome-projects/ome-docs -f dry_run=true, then once withoutdry_run.Checklist
git commit -s)pnpm lint && pnpm check && pnpm test && pnpm buildpasses locallySummary by CodeRabbit