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 2 times, most recently 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.

@delthas
delthas force-pushed the improvement/ZENKO-5317/fix-gh-release-v302-mocks branch 2 times, most recently from e1c0f9f to 38b367b Compare July 20, 2026 08:21
@delthas
delthas requested review from benzekrimaha and removed request for DarkIsDude July 20, 2026 08:30
@delthas

delthas commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Requested @benzekrimaha in place of Edouard Comtet, who is currently away.

@bert-e

bert-e commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Integration data created

I have created the integration data for the additional destination branches.

The following branches will NOT be impacted:

  • development/2.10
  • development/2.11
  • development/2.12
  • development/2.13
  • development/2.5
  • development/2.6
  • development/2.7
  • development/2.8
  • development/2.9

You can set option create_pull_requests if you need me to create
integration pull requests in addition to integration branches, with:

@bert-e create_pull_requests

The following options are set: create_integration_branches

@bert-e

bert-e commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

The following options are set: create_integration_branches

Comment thread tests/workflows/release.spec.ts Outdated
Comment thread tests/workflows/release.spec.ts
@delthas

delthas commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

/reset

@bert-e

bert-e commented Jul 20, 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 38b367b to e6fd5dc Compare July 20, 2026 09:43
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
@delthas
delthas force-pushed the improvement/ZENKO-5317/fix-gh-release-v302-mocks branch from e6fd5dc to f3fdb63 Compare July 20, 2026 09:50
@delthas
delthas requested a review from francoisferrand July 20, 2026 09:51
@delthas

delthas commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

/create_integration_branches

@scality scality deleted a comment from bert-e Jul 20, 2026
@bert-e

bert-e commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

History mismatch

Merge commit #38b367b0d3449f00fb5e9bd0b3ccac739776a1cc on the integration branch
w/2.15/improvement/ZENKO-5317/fix-gh-release-v302-mocks is merging a branch which is neither the current
branch improvement/ZENKO-5317/fix-gh-release-v302-mocks nor the development branch
development/2.15.

It is likely due to a rebase of the branch improvement/ZENKO-5317/fix-gh-release-v302-mocks and the
merge is not possible until all related w/* branches are deleted or updated.

Please use the reset command to have me reinitialize these branches.

The following options are set: create_integration_branches

@delthas

delthas commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

/reset

@bert-e

bert-e commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Reset complete

I have successfully deleted this pull request's integration branches.

The following options are set: create_integration_branches

@bert-e

bert-e commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

The following options are set: create_integration_branches

@delthas

delthas commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

/approve

@bert-e

bert-e commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Build failed

The 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

@bert-e

bert-e commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Build failed

The 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

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.

5 participants