Adapt release workflow test mocks to action-gh-release v3.0.2#2464
Open
delthas wants to merge 1 commit into
Open
Adapt release workflow test mocks to action-gh-release v3.0.2#2464delthas wants to merge 1 commit into
delthas wants to merge 1 commit into
Conversation
Contributor
Hello delthas,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
This was referenced Jul 17, 2026
Contributor
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 |
delthas
force-pushed
the
improvement/ZENKO-5317/fix-gh-release-v302-mocks
branch
from
July 17, 2026 14:39
dfaa073 to
f928d94
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 3 times. These extra listReleases calls consumed the sequenced mock reply containing the draft release, sending the action down the update-existing-release path and leaving its PATCH unmatched: the 5 'Promote artifacts' tests each hung until the 120s jest timeout. Replace the sequenced listReleases replies with a single repeated draft-free reply, so the upfront lookup never sees a release for the target tag regardless of how many listing attempts the action makes. After creation, the action discovers the draft through the second getReleaseByTag reply alone (pickCanonicalRelease falls back to it when listings contain no match), and publishes it via the existing updateRelease mock. Issue: ZENKO-5317
delthas
force-pushed
the
improvement/ZENKO-5317/fix-gh-release-v302-mocks
branch
from
July 17, 2026 14:44
f928d94 to
0ce6772
Compare
delthas
marked this pull request as ready for review
July 17, 2026 14:51
delthas
requested review from
a team,
SylvainSenechal,
benzekrimaha,
francoisferrand and
maeldonn
and removed request for
benzekrimaha
July 17, 2026 14:52
Contributor
Author
|
Requested @maeldonn in place of Maha Benzekri, who is currently on PTO. |
SylvainSenechal
approved these changes
Jul 17, 2026
delthas
requested review from
DarkIsDude
and removed request for
francoisferrand
July 19, 2026 22:00
Contributor
Author
|
Requested @DarkIsDude in place of Francois Ferrand, who is currently on PTO. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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