Skip to content

build(test): check the SDK installs and runs on Debian 12 - #141

Merged
MicBun merged 3 commits into
mainfrom
distribution-test-bookworm
Oct 14, 2026
Merged

MicBun merged 3 commits into
mainfrom
distribution-test-bookworm

Conversation

@MicBun

@MicBun MicBun commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

The Docker distribution check builds the SDK wheel in one image and installs it in a clean one, then imports the SDK, creates a client against the mainnet gateway and derives an account. Both images now start from python:3.12-slim-bookworm (Debian 12) instead of python:3.12-slim-bullseye (Debian 11). The package list, Go 1.24.1 and gopy v0.4.10 stay as they were.

The smoke script those steps run, tests/distribution/get_account_test.py, now ends with exit code 1 when a step fails. It printed the failure and still exited 0 before, so the Docker job and both native build jobs passed whatever it printed. A client that cannot reach a node still passes, as before, because the native jobs run without one. The Docker job talks to the mainnet gateway, so a gateway error other than an unreachable host now shows as a failed job.

Release wheels are built on the GitHub runner by release-build.yml, which never uses this image or the smoke script, so nothing that ships changes.

Why

Debian 11's long term support ended on 31 August 2026, and its security updates moved from deb.debian.org to archive.debian.org. The package index on deb.debian.org still lists those updates, so apt-get install on Debian 11 asks for files the mirror no longer serves and stops with a 404. Both stages install packages with apt, so both stages move to Debian 12. Debian 12 has long term support until 30 June 2028.

The check first stopped at the apt step on this pull request:

Testing

  • On the stock images, installing the packages this Dockerfile uses (curl, git, build-essential, patchelf) stops with 404s from debian-security on python:3.12-slim-bullseye and completes on python:3.12-slim-bookworm.
  • I built the image from a shallow clone of this branch with the workflow's docker build command, then ran it with TN_ENDPOINT set to the mainnet gateway, as the workflow does. The wheel built and installed, the script printed all three steps as passed (the import, the client, and the account), and docker run returned 0.
  • I ran each path of the smoke script with the old and the new version. Against the mainnet gateway, and with no node reachable, both versions pass and exit 0. Four failure paths exited 0 before and exit 1 now: the SDK not installed, another error while importing it, a bad private key when creating the client, and a failing account call.
  • In the image, docker run returns 1 with a bad private key and 0 with no node reachable.

Summary by CodeRabbit

  • Chores
    • Updated the distribution container image to a newer Debian-based Python image.
    • Distribution checks now report failures with a nonzero exit status for import, account-derivation, and unexpected client-creation errors. Connection-refused and dial errors return a success status.
    • These updates affect distribution packaging and test results; they do not change end-user functionality.

@holdex

holdex Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Time Submission Status

Member # Time Running Total Status Last Update
MicBun 30min ✅ Submitted Oct 14, 2026, 11:37 PM

Submit or update total time with:

@holdex pr submit-time 2h

Add time on top of previous submission with:

@holdex pr add-time 1h30m

See available commands to help comply with our Guidelines.

@MicBun MicBun self-assigned this Oct 14, 2026
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 26c08d82-642c-4a53-a86f-816ef1a5ee90
📥 Commits

Reviewing files that changed from the base of the PR and between a559243 and c5b6320.

📒 Files selected for processing: 1
  • tests/distribution/get_account_test.py
🚧 Files skipped from review as they are similar to previous changes: 1
  • tests/distribution/get_account_test.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The distribution test Dockerfile now uses Bookworm-based Python images. The account test script returns status codes for its outcomes and passes the result to sys.exit.

Changes: Distribution test updates

Layer / File(s) Summary
Update container base images
tests/distribution/Dockerfile.get_account
The builder and runtime stages now use python:3.12-slim-bookworm.
Set account test exit status
tests/distribution/get_account_test.py
Import failures, account-derivation failures, and unexpected client-creation errors return status 1. Recognized connection errors return status 0. The script exits with the status returned by main().

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to c5b63

The distribution check receives the smoke test’s failure status. No merge-blocking issue is established.

Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the main change: updating the distribution test to verify that the SDK installs and runs on Debian 12.
✨ Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@MicBun

MicBun commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@MicBun

MicBun commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@MicBun MicBun changed the title build(docker): check the SDK installs and runs on Debian 12 test: check the SDK installs and runs on Debian 12 Oct 14, 2026
@MicBun MicBun changed the title test: check the SDK installs and runs on Debian 12 build(test): check the SDK installs and runs on Debian 12 Oct 14, 2026
@MicBun

MicBun commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

@holdex pr submit-time 30m

@MicBun
MicBun merged commit db7517c into main Oct 14, 2026
7 checks passed
@MicBun
MicBun deleted the distribution-test-bookworm branch October 14, 2026 23:37
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.

1 participant