Skip to content

Adapt release workflow test mocks to action-gh-release v3.0.2#2464

Open
delthas wants to merge 1 commit into
development/2.14from
improvement/ZENKO-5317/fix-gh-release-v302-mocks
Open

Adapt release workflow test mocks to action-gh-release v3.0.2#2464
delthas wants to merge 1 commit into
development/2.14from
improvement/ZENKO-5317/fix-gh-release-v302-mocks

Conversation

@delthas

@delthas delthas commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

What does this PR do, and why do we need it?

The check-workflows job fails on every PR based on development/2.14+ since 2026-07-13: softprops/action-gh-release v3.0.2 (picked up automatically via the floating @v3 tag in release.yaml) changed its GitHub API call sequence. Its findTagFromReleases now falls back to listing releases when getReleaseByTag returns 404 — GitHub does not expose draft releases through get-by-tag — and retries the listing up to 3 times. These extra listReleases calls eventually consumed the sequenced mock reply containing the draft release (intended for the post-creation canonicalizeCreatedRelease scan), so the action believed a release already existed and issued a PATCH /releases/123 with draft: true that no mock matches. The unmatched request hangs until undici's headers timeout, and the 5 "Promote artifacts" tests in release.spec.ts each died on the 120s jest timeout.

This PR replaces the sequenced listReleases replies 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 second getReleaseByTag reply alone (pickCanonicalRelease falls back to it when listings contain no match), before publishing it via the existing updateRelease mock.

Which issue does this PR fix?

Fixes ZENKO-5317.

Special notes for your reviewers:

  • The exact call sequence was confirmed with a DEBUG=nock* trace: the release-notes step makes one listReleases call (the old mock comments claiming two were inaccurate), and the action's fallback makes three.

Issue: ZENKO-5317

@bert-e

bert-e commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Hello delthas,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request TBA
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e

bert-e commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Request integration branches

Waiting for integration branch creation to be requested by the user.

To request integration branches, please comment on this pull request with the following command:

/create_integration_branches

Alternatively, the /approve and /create_pull_requests commands will automatically
create the integration branches.

@delthas
delthas force-pushed the improvement/ZENKO-5317/fix-gh-release-v302-mocks branch from dfaa073 to f928d94 Compare July 17, 2026 14:39
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
delthas force-pushed the improvement/ZENKO-5317/fix-gh-release-v302-mocks branch from f928d94 to 0ce6772 Compare July 17, 2026 14:44
@delthas
delthas marked this pull request as ready for review July 17, 2026 14:51
@delthas
delthas requested review from a team, SylvainSenechal, benzekrimaha, francoisferrand and maeldonn and removed request for benzekrimaha July 17, 2026 14:52
@delthas

delthas commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

Requested @maeldonn in place of Maha Benzekri, who is currently on PTO.

@delthas
delthas requested review from DarkIsDude and removed request for francoisferrand July 19, 2026 22:00
@delthas

delthas commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

Requested @DarkIsDude in place of Francois Ferrand, who is currently on PTO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants