Skip to content

feat(ci): separate sozo releases from dojo#3381

Merged
glihm merged 20 commits intomainfrom
ci/sozo
Nov 25, 2025
Merged

feat(ci): separate sozo releases from dojo#3381
glihm merged 20 commits intomainfrom
ci/sozo

Conversation

@glihm
Copy link
Collaborator

@glihm glihm commented Nov 25, 2025

Summary by CodeRabbit

  • Chores

    • Updated Rust toolchain to 1.90.0 across dev and CI.
    • Removed legacy engine installation from the development container.
    • Locked release tooling version, switched to POSIX validation, and added reliable manifest version updates before releasing.
    • Simplified release workflow by removing the multi-target release job and adjusted version extraction context.
  • New Features

    • Added tool-version declarations and ASDF-based toolchain setup in the build image, with related package installs and entrypoint preserved.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 25, 2025

Ohayo, sensei!

Walkthrough

Updates devcontainer and CI Rust toolchain versions to 1.90.0, removes dojoengine install from devcontainer, adds ASDF-based tool installation and .tool-versions for bin/sozo, changes release-dispatch to manually propagate package versions and pin cargo-release, adjusts release-sozo to read package.version from bin/sozo, and removes the multi-platform release job.

Changes

Cohort / File(s) Change Summary
Devcontainer Docker
\.devcontainer/Dockerfile
Bumped RUST_VERSION 1.89.0 → 1.90.0; removed curl-based dojoengine installation.
CI Devcontainer Build
.github/workflows/devcontainer.yml
Updated RUST_VERSION build-arg from 1.88.0 → 1.90.0.
Release dispatch workflow
.github/workflows/release-dispatch-sozo.yml
Pins cargo-release install (--version ... --locked); switched version validation to POSIX [ -z ... ]; added set -e; added manual manifest version propagation (iterates ./Cargo.toml and ../../crates/sozo/*.Cargo.toml, uses awk to rewrite versions) before running cargo release commands.
Release workflow (sozo)
.github/workflows/release-sozo.yml
"Get version" step now runs in ./bin/sozo and queries package.version (not workspace.package.version); writes VERSION and tag_name (prefixed with v) to GITHUB_OUTPUT.
Release workflow (main)
.github/workflows/release.yml
Removed the matrix-based multi-platform release job (artifact build/archive/upload steps deleted); only prepare step remains.
Bin: tool versions & Docker
bin/sozo/.tool-versions, bin/sozo/Dockerfile
Added .tool-versions (scarb, starknet-foundry); Dockerfile now installs git/curl/wget/ca-certificates, installs/configures ASDF via prebuilt binary, copies .tool-versions, adds ASDF plugins, runs asdf install and asdf reshim; ENTRYPOINT remains sozo.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant User as Trigger
  participant DispatchWF as release-dispatch-sozo.yml
  participant FS as Repo Filesystem
  participant CargoRelease as cargo-release

  rect rgb(240,248,255)
    Note over DispatchWF: Start release-dispatch-sozo
  end

  User->>DispatchWF: provide VERSION input
  DispatchWF->>DispatchWF: validate input (POSIX [ -z ... ])
  alt input valid
    DispatchWF->>FS: list manifests (./Cargo.toml, ../../crates/sozo/*.Cargo.toml)
    FS-->>DispatchWF: files list
    DispatchWF->>FS: awk-inject cleaned version into each manifest
    FS-->>DispatchWF: updated files
    DispatchWF->>CargoRelease: run cargo-release commands (pinned --locked)
    CargoRelease-->>DispatchWF: release steps
  else invalid
    DispatchWF-->>User: exit with error
  end
Loading
sequenceDiagram
  autonumber
  participant ReleaseWF as release-sozo.yml
  participant BinSozo as ./bin/sozo (working dir)
  participant CargoGet as cargo-get

  rect rgb(245,250,240)
    Note over ReleaseWF: Get version step now uses package.version in bin/sozo
  end

  ReleaseWF->>BinSozo: cd ./bin/sozo
  ReleaseWF->>CargoGet: run cargo-get -> query package.version
  CargoGet-->>ReleaseWF: returns version
  ReleaseWF->>ReleaseWF: prefix "v", write VERSION and tag_name to GITHUB_OUTPUT
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Inspect the awk manifest rewrite in .github/workflows/release-dispatch-sozo.yml for correctness and edge cases (toml formatting, multiple version fields).
  • Verify bin/sozo/Dockerfile ASDF install steps, .tool-versions placement, permissions, PATH/ENV persistence, and reproducibility.
  • Confirm release-sozo.yml version extraction using package.version in ./bin/sozo is appropriate for the workspace layout.
  • Ensure removal of the matrix release job in .github/workflows/release.yml doesn’t break downstream job dependencies.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main objective of the PR: separating sozo releases from the main dojo release process.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ci/sozo

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 96da6bb and 7bbb18e.

📒 Files selected for processing (1)
  • .github/workflows/release.yml (0 hunks)
💤 Files with no reviewable changes (1)
  • .github/workflows/release.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: clippy

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2447820 and 3b5aaa9.

📒 Files selected for processing (2)
  • bin/sozo/.tool-versions (1 hunks)
  • bin/sozo/Dockerfile (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • bin/sozo/.tool-versions
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: clippy
🔇 Additional comments (3)
bin/sozo/Dockerfile (3)

6-8: Good system dependency choices.

The addition of git, curl, wget, and ca-certificates (line 7) is sensible for supporting ASDF binary downloads and plugin installation. No concerns here, sensei.


41-44: ASDF plugin installation verified — .tool-versions is correctly staged and contains required versions.

Lines 41-44 are correct. The .tool-versions file is properly copied from the repository root to /root/.tool-versions (line 39), and the root .tool-versions contains both scarb 2.13.1 and starknet-foundry 0.51.0. The asdf install command will read this file and install the specified versions. The asdf reshim call is redundant with asdf v0.18.0 (which handles reshimming automatically) but causes no harm.


39-39: Perfect. I now have sufficient evidence to verify the review comment. The Dockerfile shows:

  1. No WORKDIR directive - operates from / by default
  2. COPY .tool-versions /root/.tool-versions - copies from the build context root to /root/
  3. Standard build pattern - when docker build -f bin/sozo/Dockerfile . is run (context = repo root), the .tool-versions file at the repo root is accessible and will be copied successfully
  4. File exists - .tool-versions is confirmed at the repo root with the required tools (scarb, starknet-foundry, etc.)

The bin/sozo/.tool-versions file exists as a separate, minimal subset file (likely for other purposes), but it is not used by this Dockerfile.

The COPY path is correct.


COPY .tool-versions path is correct for repo-root context builds.

The .tool-versions file exists at the repository root and is properly referenced in the COPY instruction. When this Dockerfile is built with the repository root as the build context (standard pattern: docker build -f bin/sozo/Dockerfile .), the path resolves correctly. The separate bin/sozo/.tool-versions file is a different artifact and not used by this Dockerfile.

Comment on lines +17 to +27
# Define the ASDF related variables.
# Note that the data dir is also invovled.
ENV ASDF_VERSION=v0.18.0
ENV ASDF_DIR=/opt/asdf
ENV ASDF_BIN_DIR=${ASDF_DIR}/bin
ENV ASDF_DATA_DIR=${ASDF_DIR}/

# Add to the PATH + ensure the ASDF_DATA_DIR is also set,
# to have next invocation of asdf working as expected.
ENV PATH="${ASDF_BIN_DIR}:${ASDF_DATA_DIR}/shims:$PATH"
ENV ASDF_DATA_DIR=${ASDF_DATA_DIR}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Ohayo sensei! Remove redundant ASDF_DATA_DIR assignment and fix path double-slash.

Line 22 sets ASDF_DATA_DIR with a trailing slash, and line 27 re-exports it identically—this is redundant. Also, the trailing slash causes ${ASDF_DATA_DIR}/shims to expand to /opt/asdf//shims (double slash), which is cosmetically sloppy and can confuse debugging.

Consolidate and clean up the ASDF environment setup:

-ENV ASDF_VERSION=v0.18.0
-ENV ASDF_DIR=/opt/asdf
-ENV ASDF_BIN_DIR=${ASDF_DIR}/bin
-ENV ASDF_DATA_DIR=${ASDF_DIR}/
-
-# Add to the PATH + ensure the ASDF_DATA_DIR is also set,
-# to have next invocation of asdf working as expected.
-ENV PATH="${ASDF_BIN_DIR}:${ASDF_DATA_DIR}/shims:$PATH"
-ENV ASDF_DATA_DIR=${ASDF_DATA_DIR}
+ENV ASDF_VERSION=v0.18.0 \
+    ASDF_DIR=/opt/asdf \
+    ASDF_BIN_DIR=/opt/asdf/bin \
+    ASDF_DATA_DIR=/opt/asdf \
+    PATH="/opt/asdf/bin:/opt/asdf/shims:$PATH"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Define the ASDF related variables.
# Note that the data dir is also invovled.
ENV ASDF_VERSION=v0.18.0
ENV ASDF_DIR=/opt/asdf
ENV ASDF_BIN_DIR=${ASDF_DIR}/bin
ENV ASDF_DATA_DIR=${ASDF_DIR}/
# Add to the PATH + ensure the ASDF_DATA_DIR is also set,
# to have next invocation of asdf working as expected.
ENV PATH="${ASDF_BIN_DIR}:${ASDF_DATA_DIR}/shims:$PATH"
ENV ASDF_DATA_DIR=${ASDF_DATA_DIR}
# Define the ASDF related variables.
# Note that the data dir is also invovled.
ENV ASDF_VERSION=v0.18.0 \
ASDF_DIR=/opt/asdf \
ASDF_BIN_DIR=/opt/asdf/bin \
ASDF_DATA_DIR=/opt/asdf \
PATH="/opt/asdf/bin:/opt/asdf/shims:$PATH"
🤖 Prompt for AI Agents
In bin/sozo/Dockerfile around lines 17 to 27, the ASDF_DATA_DIR is set with a
trailing slash and then redundantly re-exported, causing a double-slash in the
PATH; remove the second ENV ASDF_DATA_DIR line, set ASDF_DATA_DIR without a
trailing slash (e.g. ENV ASDF_DATA_DIR=${ASDF_DIR}), and update PATH to
reference ${ASDF_DATA_DIR}/shims so expansions produce a single slash (ensure
only one ENV defines ASDF_DATA_DIR).

Comment on lines +29 to +37
# Install ASDF from pre-built binaries github release (easiest way IMHO).
RUN wget -q https://github.com/asdf-vm/asdf/releases/download/${ASDF_VERSION}/asdf-${ASDF_VERSION}-linux-${TARGETARCH}.tar.gz -O /tmp/asdf.tar.gz && \
mkdir -p $ASDF_BIN_DIR && \
tar -xzf /tmp/asdf.tar.gz -C $ASDF_BIN_DIR && \
rm /tmp/asdf.tar.gz && \
ls -laR ${ASDF_DIR}

RUN chmod +x $ASDF_BIN_DIR/asdf && ls -alR $ASDF_DIR/
RUN asdf --version
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Remove debug output commands for cleaner Docker builds.

Lines 34, 36, and 37 are verbose/debug-only commands (ls -laR, asdf --version) that add no value to the final image and slow down builds. These should be removed for production.

Clean up the ASDF installation step:

 RUN wget -q https://github.com/asdf-vm/asdf/releases/download/${ASDF_VERSION}/asdf-${ASDF_VERSION}-linux-${TARGETARCH}.tar.gz -O /tmp/asdf.tar.gz && \
 mkdir -p $ASDF_BIN_DIR && \
 tar -xzf /tmp/asdf.tar.gz -C $ASDF_BIN_DIR && \
 rm /tmp/asdf.tar.gz && \
-ls -laR ${ASDF_DIR}
-
-RUN chmod +x $ASDF_BIN_DIR/asdf && ls -alR $ASDF_DIR/
-RUN asdf --version
+chmod +x $ASDF_BIN_DIR/asdf
🤖 Prompt for AI Agents
In bin/sozo/Dockerfile around lines 29 to 37, remove the debug/verbose commands:
delete the recursive directory listings (ls -laR ${ASDF_DIR} and ls -alR
$ASDF_DIR/) and the final asdf --version invocation; retain the ASDF install
extraction and the chmod +x $ASDF_BIN_DIR/asdf step so the binary is executable,
and squash or combine RUN lines as needed to avoid extra image layers and keep
the build lean.

@glihm glihm merged commit 2bb9d20 into main Nov 25, 2025
10 checks passed
@glihm glihm deleted the ci/sozo branch November 25, 2025 21:54
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