Adapt release workflow test mocks to action-gh-release v3.0.2#2464
Adapt release workflow test mocks to action-gh-release v3.0.2#2464delthas wants to merge 1 commit into
Conversation
Hello delthas,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Request integration branchesWaiting for integration branch creation to be requested by the user. To request integration branches, please comment on this pull request with the following command: Alternatively, the |
f928d94 to
0ce6772
Compare
|
Requested @maeldonn in place of Maha Benzekri, who is currently on PTO. |
|
Requested @DarkIsDude in place of Francois Ferrand, who is currently on PTO. |
e1c0f9f to
38b367b
Compare
|
Requested @benzekrimaha in place of Edouard Comtet, who is currently away. |
Integration data createdI have created the integration data for the additional destination branches.
The following branches will NOT be impacted:
You can set option The following options are set: create_integration_branches |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
The following options are set: create_integration_branches |
|
/reset |
Request integration branchesWaiting for integration branch creation to be requested by the user. To request integration branches, please comment on this pull request with the following command: Alternatively, the |
38b367b to
e6fd5dc
Compare
Since v3.0.2 (published 2026-07-13, picked up via the floating v3 tag), action-gh-release's findTagFromReleases falls back to listing releases after getReleaseByTag returns 404, to discover existing draft releases, retrying the listing up to maxRetries (3) times. The test mocked only 3 listReleases replies, so a findTagFromReleases retry consumed the reply containing the draft release: the action then took the update-existing-release path and issued an unmatched PATCH, and the 5 'Promote artifacts' tests each hung until the 120s jest timeout. Mock the full listReleases sequence instead: 4 draft-free replies (release-notes generation + the 3 findTagFromReleases attempts), then a draft-bearing reply for the post-creation canonicalizeCreatedRelease scan. None of the pre-creation listings contain the target tag, so the action creates the release as before. Issue: ZENKO-5317
e6fd5dc to
f3fdb63
Compare
|
/create_integration_branches |
History mismatchMerge commit #38b367b0d3449f00fb5e9bd0b3ccac739776a1cc on the integration branch It is likely due to a rebase of the branch Please use the The following options are set: create_integration_branches |
|
/reset |
Reset completeI have successfully deleted this pull request's integration branches. The following options are set: create_integration_branches |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
The following options are set: create_integration_branches |
|
/approve |
Build failedThe build for commit did not succeed in branch w/2.15/improvement/ZENKO-5317/fix-gh-release-v302-mocks The following options are set: approve, create_integration_branches |
Build failedThe build for commit did not succeed in branch w/2.16/improvement/ZENKO-5317/fix-gh-release-v302-mocks The following options are set: approve, create_integration_branches |
What does this PR do, and why do we need it?
The
check-workflowsjob fails on every PR based on development/2.14+ since 2026-07-13:softprops/action-gh-releasev3.0.2 (picked up automatically via the floating@v3tag inrelease.yaml) changed its GitHub API call sequence. ItsfindTagFromReleasesnow falls back to listing releases whengetReleaseByTagreturns 404 — GitHub does not expose draft releases through get-by-tag — and retries the listing up to 3 times. These extralistReleasescalls eventually consumed the sequenced mock reply containing the draft release (intended for the post-creationcanonicalizeCreatedReleasescan), so the action believed a release already existed and issued aPATCH /releases/123withdraft: truethat no mock matches. The unmatched request hangs until undici's headers timeout, and the 5 "Promote artifacts" tests inrelease.spec.tseach died on the 120s jest timeout.This PR replaces the sequenced
listReleasesreplies with a single repeated draft-free reply, making the mocks independent of how many listing calls the action makes. The action then creates the release as before and discovers the created draft through the secondgetReleaseByTagreply alone (pickCanonicalReleasefalls back to it when listings contain no match), before publishing it via the existingupdateReleasemock.Which issue does this PR fix?
Fixes ZENKO-5317.
Special notes for your reviewers:
DEBUG=nock*trace: the release-notes step makes onelistReleasescall (the old mock comments claiming two were inaccurate), and the action's fallback makes three.Issue: ZENKO-5317