Skip to content

fpga-releaser: fix --skip-gh and inverted needs_gh check#502

Merged
nathanaelhuffman merged 1 commit into
mainfrom
ndh/refix-fpga-releaser
May 18, 2026
Merged

fpga-releaser: fix --skip-gh and inverted needs_gh check#502
nathanaelhuffman merged 1 commit into
mainfrom
ndh/refix-fpga-releaser

Conversation

@nathanaelhuffman
Copy link
Copy Markdown
Collaborator

#500 broke the normal release flow due to a logic bug that makes a normal run with no --skip-gh and no --zip fail:

The change in #500 is equivalent to not args.skip_gh and args.zip is not None, so for the default invocation (no --skip-gh, no --zip) needs_gh evaluated to False, meaning the api stayed None, and get_latest_artifact_info blew up dereferencing that None.

In the original intention of this code, skip-gh really meant skip-gh-release. Even when fixing the bug above, the system still accessed the github api when skip-gh was set so this PR actually fixes that problem also so skip-gh really does skip github now, releases and APIs.

Commit 5bb0735 reparenthesized the needs_gh expression as
'not (args.skip_gh or args.zip is None)', which evaluates to
'not args.skip_gh and args.zip is not None' -- the opposite of the
intent for the default invocation. With no --skip-gh and no --zip,
needs_gh became False, api stayed None, and get_latest_artifact_info
crashed with AttributeError.

Additionally, --skip-gh on its own would fall through to
process_gh_build and attempt to fetch artifacts from GitHub, defeating
the purpose of the flag. Require --zip or --local when --skip-gh is
set so the tool never touches GitHub in that mode.
@nathanaelhuffman nathanaelhuffman force-pushed the ndh/refix-fpga-releaser branch from 290bfac to d689eae Compare May 15, 2026 20:51
Copy link
Copy Markdown
Collaborator

@Aaron-Hartwig Aaron-Hartwig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops :P

@nathanaelhuffman nathanaelhuffman merged commit eaa54f6 into main May 18, 2026
9 checks passed
@nathanaelhuffman nathanaelhuffman deleted the ndh/refix-fpga-releaser branch May 18, 2026 15:03
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.

2 participants