Skip to content

fix: exclude CPU templates from release tarballs#5911

Open
immanuwell wants to merge 1 commit into
firecracker-microvm:mainfrom
immanuwell:fix-gh-release-cpu-template-tarball
Open

fix: exclude CPU templates from release tarballs#5911
immanuwell wants to merge 1 commit into
firecracker-microvm:mainfrom
immanuwell:fix-gh-release-cpu-template-tarball

Conversation

@immanuwell

Copy link
Copy Markdown
Contributor

Changes

Skip release-renamed custom CPU template files when building the GitHub release tarballs.

Reason

release.sh copies templates as C3-$VERSION.json, T2-$VERSION.json, etc. gh_release.py tried to skip templates, but checked only bare names, so the files slipped into the tarball. Small papercut, but real: latest v1.15.1 x86_64 tarball has these files inside.

Repro:

gh release download v1.15.1 --repo firecracker-microvm/firecracker --pattern firecracker-v1.15.1-x86_64.tgz --dir /tmp/fc-rel
tar -tzf /tmp/fc-rel/firecracker-v1.15.1-x86_64.tgz | grep 'C3-v1.15.1.json'

This adds a regression test and keeps gh_release.py --help working without PyGithub installed, pretty handy for local checks.

Tests:

uv run --with pytest pytest tools/test_gh_release.py -q
uv run --with black black --check --diff tools/gh_release.py tools/test_gh_release.py
uv run --with isort isort --check --diff tools/gh_release.py tools/test_gh_release.py
uv run --with pylint pylint --rcfile tests/pyproject.toml --output-format=colorized tools/gh_release.py tools/test_gh_release.py
./tools/devtool checkstyle

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.

PR Checklist

  • I have read and understand CONTRIBUTING.md.
  • I have run tools/devtool checkbuild --all to verify that the PR passes
    build checks on all supported architectures.
  • I have run tools/devtool checkstyle to verify that the PR passes the
    automated style checks.
  • I have described what is done in these changes, why they are needed, and
    how they are solving the problem in a clear and encompassing way.
  • I have updated any relevant documentation (both in code and in the docs)
    in the PR.
  • I have mentioned all user-facing changes in CHANGELOG.md.
  • If a specific issue led to this PR, this PR closes the issue.
  • When making API changes, I have followed the
    Runbook for Firecracker API changes.
  • I have tested all new and changed functionalities in unit tests and/or
    integration tests.
  • I have linked an issue to every new TODO.

  • This functionality cannot be added in rust-vmm.

Signed-off-by: immanuwell <pchpr.00@list.ru>
@JamesC1305

Copy link
Copy Markdown
Contributor

Hi @immanuwell,

Thanks for your contribution. I validated your repro and confirmed that the problem exists. I'll take a look into the implementation of the fix soon and get back to you.

@JamesC1305 JamesC1305 self-assigned this Jun 3, 2026
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