Skip to content

fix(release): use ref_name for gh run list branch so RUN_ID is resolved#870

Draft
plavjanik wants to merge 2 commits intomainfrom
fix/release-gh-run-list-branch
Draft

fix(release): use ref_name for gh run list branch so RUN_ID is resolved#870
plavjanik wants to merge 2 commits intomainfrom
fix/release-gh-run-list-branch

Conversation

@plavjanik
Copy link
Copy Markdown
Member

Summary

Nightly SDK packages (e.g. zowe-native-proto-sdk-0.3.0-2026-03-18-014027.tgz) were bundling a server PAX that contained the wrong binary names (zowed / libzowed.so instead of zowex). After install, the SDK runs ~/.zowe-server/zowex server, so the shell reported FSUM7351 not found. The PAX also had stale build timestamps (e.g. March 6) instead of a recent main build.

This change fixes the root cause: the nightly release workflow was resolving RUN_ID with gh run list --branch=${{ github.ref }}. For scheduled runs, github.ref is refs/heads/main, but gh run list --branch=refs/heads/main returns no runs (the CLI expects the short branch name main). So RUN_ID was empty.

What happened when RUN_ID was empty

The "Download Server" step runs:

gh run download $RUN_ID --dir packages/sdk/bin --name zowe-server-bin
gh run download $RUN_ID --name zowe-server-release

With RUN_ID empty, this becomes gh run download --name zowe-server-bin (and similarly for the second). Per gh behavior, that downloads the latest artifact with that name from any workflow run, not from a specific branch.

The most recent such artifact was from run 22771182462 on branch member-ispf-stats (March 6, 2026). That branch's buildTools.ts still packaged the old layout: zowed and libzowed.so. So the nightly was shipping a PAX from a feature branch with old naming instead of from a main z/OS build.

Fix

Use github.ref_name instead of github.ref when calling gh run list:

  • github.ref = refs/heads/maingh run list returns nothing → RUN_ID empty.
  • github.ref_name = maingh run list returns the latest z/OS build run for mainRUN_ID set correctly.

So the nightly now resolves RUN_ID from the main branch's z/OS build (when one exists).

Verification

  • This repo: Confirmed locally that gh run list --branch=refs/heads/main --workflow=zos-build.yml --limit=1 returns [], while gh run list --branch=main --workflow=zos-build.yml --limit=1 returns a run ID.
  • Nightly: After merge, the next scheduled release run will use the new logic; if there is a successful z/OS build on main, that run's artifacts will be used for the SDK/server PAX.
  • Note: z/OS build on main has been failing/cancelled since around the ibm-clang migration (Migrate native C++ code to use ibm-clang compiler #812). Fixing those failures is separate; this PR only ensures the release workflow uses the correct run (main) when one exists, instead of falling back to the latest artifact from any branch.

Follow-up

  • Investigate and fix why the z/OS build on main has been failing (so nightly can ship a current server from main).

Checklist

  • One-line change in .github/workflows/release.yml (line 62).
  • No change to build or z/OS build workflows; only the release workflow's "Set Environment" step is affected.
  • Commit is signed off.
  • Checked: no existing PR or issue tracks this RUN_ID/ref_name fix or the nightly wrong-artifact behavior (PR Fix upload step of release workflow #813 was a different release workflow fix).

Made with Cursor

Nightly release uses gh run list --branch= to get the latest z/OS build run.
github.ref is refs/heads/main; gh CLI expects short branch name (main).
Using refs/heads/main returns no runs, so RUN_ID was empty and gh run
download grabbed the latest artifact from any branch (e.g. member-ispf-stats
with old zowed naming), causing FSUM7351 when SDK runs ~/.zowe-server/zowex.

Signed-off-by: Petr Plavjanik <petr.plavjanik@broadcom.com>
Made-with: Cursor
@github-project-automation github-project-automation bot moved this to New Issues in Zowe CLI Squad Mar 18, 2026
@zowe-robot zowe-robot moved this from New Issues to In Progress in Zowe CLI Squad Mar 18, 2026
…s PR

Signed-off-by: Petr Plavjanik <petr.plavjanik@broadcom.com>
Made-with: Cursor
@sonarqubecloud
Copy link
Copy Markdown

@t1m0thyj
Copy link
Copy Markdown
Member

t1m0thyj commented Mar 18, 2026

The z/OS Build workflow is temporarily broken after our switch to ibm-clang compiler. We're waiting on Marist to apply maintenance to the build system, which is scheduled for sometime in April.

Unfortunately this means that at the moment we have no way of building the ZRS binaries and packaging new releases with public infrastructure.

I've disabled the z/OS Build workflow for the time being. As a backup, we should be able to build using internal CI for now - I'll follow up offline with more details.

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

Labels

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants