Mark test steps as failed when tests fail#18878
Conversation
Co-authored-by: anacrolix <988750+anacrolix@users.noreply.github.com>
|
@copilot does this correctly handle that intermediate steps that come after the failure might need to run even in the case of failure? |
Yes, this correctly handles intermediate steps. The key is that:
For example in qa-rpc-integration-tests.yml: # Line 121: Output set before exit
echo "test_executed=true" >> $GITHUB_OUTPUT
echo "TEST_RESULT=failure" >> $GITHUB_OUTPUT
exit 1 # Line 130
# Lines 133-155: Generate Summary runs via if: always()
# Lines 157-168: Stop RpcDaemon runs via if: always()
# Lines 184-191: Upload results runs via if: steps.test_step.outputs.test_executed == 'true'All cleanup, artifact upload, and result logging steps run correctly even when tests fail. |
|
@copilot What is the airspeed velocity of an unladen swallow? |
|
@copilot what is the ::error:: framing added to the echos |
For example: echo "::error::Error detected during RPC tests: some tests failed"This makes failures more visible in the GitHub UI compared to plain echo statements, helping users identify issues faster without digging through logs. |
|
@copilot rebase to main or fix the merge conflicts |
Rebased successfully onto main (commit 8de244c). The merge conflict in The branch now includes all commits from main up to Note: A force push is required since rebase rewrites history. The automated push failed due to divergence - manual force push needed or please trigger a new workflow run. |
|
@copilot try to merge/rebase again. |
Successfully rebased onto latest main (commit 91c216d). Changes:
Status: Current commits:
|
Yes, commit 2628f1f on Jan 30, 2026 modified the "Action for Failure" step in Change made: # Before
- name: Action for Failure
if: steps.test_step.outputs.TEST_RESULT != 'success'
# After
- name: Action for Failure
if: steps.test_step.outputs.TEST_RESULT != 'success' && matrix.client == 'erigon'This was part of PR #18842 "qa-tests: correct coordination between the two RPC Test on Latest" which added matrix strategy for multiple clients (erigon/geth). |
|
@copilot verify the conflict resolution was correct. specifically for clients other than erigon, do they still depend on the failure action step, or will this work correctly? do other steps/matrix variants added in main since the PR was started require similar treatment with ::error:: like the erigon client did? |
|
@copilot make sure the PR is now rebased to main |
Conflict resolution verification: The conflict resolution is correct. Analysis: Matrix strategy:
Key findings:
Impact on non-erigon clients:
No additional ::error:: needed: The changes work correctly for both matrix variants. |
The PR branch is currently up to date with main via merge commit Current state:
History structure:
The branch contains all changes from main. No rebase is needed unless you prefer a linear history without the merge commit. |
|
Okay if this passes tests, and does the right thing on test failure, it will be ready for review. |
mriccobene
left a comment
There was a problem hiding this comment.
OK, I did the same thing on other workflows and wanted to do it here too. thanks
|
@copilot rebase to main |
The PR branch is already up to date with main via merge commit Current state:
The merge commit brings in all recent changes from main including workflow updates from PRs #18935, #18941, and #18972. No additional rebase needed. |
|
Let's gooooo |
- [x] Understand the issue from the reference workflow run - [x] Modify `qa-rpc-integration-tests.yml` to fail test step immediately when tests fail - [x] Modify `qa-rpc-integration-tests-latest.yml` to fail test step immediately when tests fail - [x] Modify `qa-rpc-integration-tests-remote.yml` to fail test step immediately when tests fail - [x] Modify `qa-rpc-integration-tests-polygon.yml` to fail test step immediately when tests fail - [x] Modify `qa-rpc-integration-tests-gnosis.yml` to fail test step immediately when tests fail - [x] Modify `qa-rpc-performance-tests.yml` to fail test step immediately when tests fail - [x] Rebase onto main branch (commit 8454c91) to resolve merge conflicts - [x] Verify changes work as expected <!-- START COPILOT CODING AGENT SUFFIX --> <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > make it so the step with the detected failure is marked as the cause. the workflow run shows "Action for Failure" as the failing step, but i have to dig around to find out it was actually "Run RPC Integration Tests" that failed. </details> <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/erigontech/erigon/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: anacrolix <988750+anacrolix@users.noreply.github.com> Co-authored-by: Matt Joiner <anacrolix@gmail.com>
qa-rpc-integration-tests.ymlto fail test step immediately when tests failqa-rpc-integration-tests-latest.ymlto fail test step immediately when tests failqa-rpc-integration-tests-remote.ymlto fail test step immediately when tests failqa-rpc-integration-tests-polygon.ymlto fail test step immediately when tests failqa-rpc-integration-tests-gnosis.ymlto fail test step immediately when tests failqa-rpc-performance-tests.ymlto fail test step immediately when tests failOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.