-
Notifications
You must be signed in to change notification settings - Fork 176
Add Eden version selection based on PR target branch #5402
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
base: master
Are you sure you want to change the base?
Conversation
- Add pr_base_ref capture in pr-gate.yml - Create eden-version-map.yml with branch-to-version mapping - Modify eden-trusted.yml to select Eden version dynamically - Map LTS branches (13.4-stable, 14.5-stable) to Eden 1.0.9 - Map all other branches to Eden 1.0.13 GH actions don't support dynamic workflow names, so we have to take a workaround through scripts. Signed-off-by: Paul Gaiduk <[email protected]>
| echo "pr_id=${{ github.event.pull_request.number }}" >> "$GITHUB_OUTPUT" | ||
| echo "pr_sha=$pr_sha" >> "$GITHUB_OUTPUT" | ||
| echo "original_run_id=$original_run_id" >> "$GITHUB_OUTPUT" | ||
| echo "pr_base_ref=${{ github.event.pull_request.base.ref }}" >> "$GITHUB_OUTPUT" |
Check failure
Code scanning / zizmor
code injection via template expansion Error
| - name: Checkout repository | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
Check warning
Code scanning / zizmor
credential persistence through GitHub Actions artifacts Warning
| echo "pr_id=${{ steps.from_run.outputs.pr_id || steps.from_review.outputs.pr_id }}" >> "$GITHUB_OUTPUT" | ||
| echo "pr_sha=${{ steps.from_run.outputs.pr_sha || steps.from_review.outputs.pr_sha }}" >> "$GITHUB_OUTPUT" | ||
| echo "original_run_id=${{ steps.from_run.outputs.original_run_id || steps.from_review.outputs.original_run_id }}" >> "$GITHUB_OUTPUT" | ||
| echo "pr_base_ref=${{ steps.from_run.outputs.pr_base_ref || steps.from_review.outputs.pr_base_ref }}" >> "$GITHUB_OUTPUT" |
Check notice
Code scanning / zizmor
code injection via template expansion Note
| echo "pr_id=${{ steps.from_run.outputs.pr_id || steps.from_review.outputs.pr_id }}" >> "$GITHUB_OUTPUT" | ||
| echo "pr_sha=${{ steps.from_run.outputs.pr_sha || steps.from_review.outputs.pr_sha }}" >> "$GITHUB_OUTPUT" | ||
| echo "original_run_id=${{ steps.from_run.outputs.original_run_id || steps.from_review.outputs.original_run_id }}" >> "$GITHUB_OUTPUT" | ||
| echo "pr_base_ref=${{ steps.from_run.outputs.pr_base_ref || steps.from_review.outputs.pr_base_ref }}" >> "$GITHUB_OUTPUT" |
Check notice
Code scanning / zizmor
code injection via template expansion Note
| echo '{ "pr_id": "${{ steps.meta.outputs.pr_id }}", | ||
| "original_run_id": "${{ steps.meta.outputs.original_run_id }}", | ||
| "pr_sha": "${{ steps.meta.outputs.pr_sha }}", | ||
| "pr_base_ref": "${{ steps.meta.outputs.pr_base_ref }}", |
Check notice
Code scanning / zizmor
code injection via template expansion Note
| eve_artifact_name: "eve-${{ needs.context.outputs.hv }}-${{ needs.context.outputs.arch }}-${{ needs.context.outputs.platform }}" | ||
| artifact_run_id: ${{ needs.context.outputs.original_run_id }} | ||
| eden_version: "1.0.13" | ||
| runs-on: ubuntu-latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part (replacing shared action with the script) should be extra carefully tested in some other repo first. It can break how Eden tests are reported, how we set statuses for them, how we check the statuses between restarts, how we decide on which tests to restart, etc.
In general, can we avoid replacing shared action with the script?...
| - name: Checkout repository | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
|
||
| - name: Select Eden version based on target branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I expected an approach like this...
|
Here is my recomendations for the PR testing. I assume that the basic part is already covered by the @europaul: for PRs that target different branches, check that the GitHub Action picks the correct Eden version according to the current selection logic. The list below is about extra checks. They focus on how approval and build order interact with Eden, and on the fragile, hand-written logic for rendering and restarting tests. PR is approved first, build finishes laterWhen the PR is approved by a maintainer before the build is done, check that Eden tests start automatically after the build completes. Confirm that the Eden version is the right one for this PR. This path uses one way of collecting metadata, so it is important to see that the version choice is correct here. Build finishes first, PR is approved laterNow do the opposite: let the build finish first, and only then approve the PR. Rendering of Eden subtests and initial yellow stateOnce Eden tests start, the PR page should show the full list of Eden subtests. Final state after the first Eden run finishesWhen the first Eden run is completely done, every subtest should move from yellow to its final color: green if it passed, red if it failed. Restarting tests via maintainer “Restart ALL tests”After the first run you should have a realistic situation with some green and some red subtests. Ask a maintainer to click “Restart ALL tests” (not "restart failed tests"!!! in this case the status will not be updated on the PR page!). Restarting tests via
|
Description
Closes #5296
pr-gate.ymleden-version-map.ymlwith branch-to-version mappingeden-trusted.ymlto select Eden version dynamicallyGH actions don't support dynamic workflow names, so we have to take a workaround through scripts.
I didn't find a way to test it without merging, if somebody knows how - please let me know. On a PR to my own fork the Eden actions don't run.
PR dependencies
None
How to test and validate this PR
Run it in the CI.
Changelog notes
CI: add Eden version selection based on PR target branch
PR Backports
Checklist