Skip to content

Conversation

@NathanFlurry
Copy link
Member

No description provided.

@vercel
Copy link

vercel bot commented Oct 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
rivet-cloud Ignored Ignored Oct 25, 2025 8:38pm
rivet-inspector Ignored Ignored Preview Oct 25, 2025 8:38pm
rivet-site Ignored Ignored Preview Oct 25, 2025 8:38pm

Copy link
Member Author


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@claude
Copy link

claude bot commented Oct 25, 2025

PR Review: CI - Building Manifests for Docker

Overview

This PR removes the --noValidateGit flag from the release script invocations in the complete job of the release workflow.

Analysis

What the Change Does

The --noValidateGit flag was used to bypass git validation checks in the release script. Looking at the code:

  • scripts/release/git.ts:4-13 - The validateGit function checks for uncommitted changes using git status --porcelain
  • scripts/release/main.ts:112-115 - Git validation is skipped when --noValidateGit is passed (except during setupCi)
  • The completeCi step only runs tagDocker and updateArtifacts operations, which don't modify the git repository

Code Quality: ✅ Good

  • The change is clean and consistent across both conditional branches
  • Removing unnecessary flags improves clarity and reduces technical debt

Correctness: ✅ Correct

The removal is safe because:

  1. The complete job does a fresh checkout (actions/checkout@v4 at line 229)
  2. The completeCi batch step only executes:
    • tagDocker - pulls, tags, and pushes Docker images (no git operations)
    • updateArtifacts - updates S3 artifacts (no git operations)
  3. Neither of these operations modify the git working directory, so the git validation will always pass
  4. The comment at line 113 ("HACK: Skip setupCi...") suggests there were workarounds for CI environment quirks, but those don't apply to the completeCi step

Potential Issues: ⚠️ Minor Consideration

  • The PR title mentions "building manifests for docker" but the change itself is just removing a flag. Consider clarifying:
    • Is this part of a larger effort to fix Docker manifest building?
    • Or does removing this flag fix a specific issue with manifest building?

A more descriptive PR description would help reviewers understand the motivation (e.g., "Removes unnecessary --noValidateGit flag since the completeCi step performs a clean checkout and only executes Docker/artifact operations that don't modify git state").

Security: ✅ No Concerns

  • Adding git validation improves the reliability of the release process
  • No security implications from this change

Test Coverage: ✅ Adequate

  • The change will be validated when the release workflow runs
  • The removal of the bypass flag means the script will now properly fail if there are unexpected uncommitted changes, which is the desired behavior

Recommendation: Approve with Minor Suggestion

The change is technically correct and improves code quality. Consider updating the PR description to explain why this flag was unnecessary for the completeCi step to provide better context for future maintainers.

LGTM

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 25, 2025

More templates

@rivetkit/actor

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/actor@3263

@rivetkit/cloudflare-workers

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/cloudflare-workers@3263

@rivetkit/core

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/core@3263

@rivetkit/db

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/db@3263

@rivetkit/framework-base

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/framework-base@3263

@rivetkit/next-js

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/next-js@3263

@rivetkit/react

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/react@3263

rivetkit

pnpm add https://pkg.pr.new/rivet-dev/rivet/rivetkit@3263

@rivetkit/sql-loader

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sql-loader@3263

@rivetkit/engine-runner

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner@3263

@rivetkit/engine-runner-protocol

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner-protocol@3263

commit: 515bb0c

@NathanFlurry NathanFlurry force-pushed the 10-25-ci_building_manifests_for_docker_images branch from 08ee85a to 29b3780 Compare October 25, 2025 19:16
@claude
Copy link

claude bot commented Oct 25, 2025

PR Review: Building manifests for Docker

Summary

This PR modifies the Docker release process to build multi-architecture manifests instead of simply tagging and pushing single-architecture images. The changes also temporarily disable the actual Docker image builds by commenting out the Dockerfiles.


🔴 Critical Issues

1. Dockerfiles are completely disabled

Both engine/docker/universal/Dockerfile and engine/sdks/typescript/test-runner/Dockerfile have their entire build process commented out, leaving only sleep infinity as the CMD. This means:

  • No actual application binaries are built or included in the images
  • The images are essentially empty shells that do nothing
  • This breaks the entire deployment pipeline

Impact: Production images will be non-functional.

Recommendation: This appears to be a work-in-progress change. The PR should either:

  • Be marked as draft/WIP until the build process is restored
  • Include the actual multi-arch build implementation
  • Have a clear plan for when the commented code will be restored

2. Missing --amend flag in manifest create

In scripts/release/docker.ts:55, the manifest creation does not use the --amend flag:

await $`docker manifest create ${image}:${to} ${image}:${from}-amd64 ${image}:${from}-arm64`;

Issue: If this script is run multiple times (e.g., during retries or updates), it will fail because the manifest already exists.

Fix:

await $`docker manifest create --amend ${image}:${to} ${image}:${from}-amd64 ${image}:${from}-arm64`;

3. No cleanup of local manifests

Docker manifests persist locally after creation. Running this multiple times can cause conflicts.

Recommendation: Add cleanup before creating manifests:

// Remove existing manifest if it exists
try {
  await $({ stdout: 'ignore', stderr: 'ignore' })`docker manifest rm ${image}:${to}`;
} catch {
  // Ignore if does not exist
}

⚠️ Major Concerns

4. Removal of --noValidateGit flag

The PR removes --noValidateGit from the release workflow without explanation.

Questions:

  • What does this flag do in the release script?
  • Why was it safe to remove?
  • Could this cause issues in the CI environment?

Recommendation: Add a comment explaining why this flag was removed, or include it in the PR description.

5. Error handling could be more specific

The error message at line 27 uses template string syntax that will not expand in the error:

throw new Error(
  `Images ${name}:${prefix}-${opts.commit}-{amd64,arm64} do not exist on Docker Hub.`,
);

Recommendation: Make the error more actionable:

throw new Error(
  `Multi-arch images not found on Docker Hub:\n` +
  `  - ${name}:${prefix}-${opts.commit}-amd64\n` +
  `  - ${name}:${prefix}-${opts.commit}-arm64\n` +
  `Please ensure both architecture builds completed successfully.`
);

💡 Suggestions

6. Sequential pulls could be parallelized

Lines 17-24 pull images sequentially. For faster execution:

await Promise.all([
  $({ stdout: "ignore", stderr: "ignore" })`docker pull ${name}:${prefix}-${opts.commit}-amd64`,
  $({ stdout: "ignore", stderr: "ignore" })`docker pull ${name}:${prefix}-${opts.commit}-arm64`,
]);

7. Add verification step

After creating manifests, consider verifying they contain both architectures:

// Verify manifest was created correctly
const inspect = await $`docker manifest inspect ${image}:${to}`;
console.log(`✓ Manifest created with ${JSON.parse(inspect.stdout).manifests.length} platforms`);

8. Missing error context

If manifest operations fail, the error will not indicate which image/tag failed. Consider wrapping in try-catch:

async function createManifest(image: string, from: string, to: string) {
  console.log(`==> Creating manifest: ${image}:${to} from ${image}:${from}-{amd64,arm64}`);
  
  try {
    await $`docker manifest create --amend ${image}:${to} ${image}:${from}-amd64 ${image}:${from}-arm64`;
    await $`docker manifest push ${image}:${to}`;
  } catch (error) {
    throw new Error(`Failed to create/push manifest ${image}:${to}: ${error}`);
  }
}

📋 Minor Issues

9. Comment consistency

Some comments say "Tag" (old) vs "Create manifest" (new). Ensure all comments reflect the new approach.

10. Missing platform annotations

Consider adding explicit platform annotations to manifests for clarity:

docker manifest create ${image}:${to} \
  --amend \
  ${image}:${from}-amd64 \
  ${image}:${from}-arm64

docker manifest annotate ${image}:${to} ${image}:${from}-amd64 --os linux --arch amd64
docker manifest annotate ${image}:${to} ${image}:${from}-arm64 --os linux --arch arm64

✅ Positives

  1. Correct approach to multi-arch: Using Docker manifests is the right way to support multiple architectures
  2. Good error checking: Verifying both images exist before creating manifests
  3. Clear intent: The changes clearly show the transition from single-arch tagging to multi-arch manifests

🎯 Recommendations

Before merging:

  1. ✅ Restore the Dockerfile build processes or clarify WIP status
  2. ✅ Add --amend flag to manifest create
  3. ✅ Add manifest cleanup before creation
  4. ✅ Document why --noValidateGit was removed
  5. ✅ Improve error messages for better debugging
  6. ⚠️ Consider parallelizing Docker pulls
  7. ⚠️ Add manifest verification step
  8. ⚠️ Add better error context to manifest operations

Testing:

  • Verify the manifest creation works with both architectures
  • Test retry scenarios to ensure --amend works correctly
  • Confirm that the release workflow completes successfully end-to-end

Overall Assessment

The core approach (moving to Docker manifests) is sound, but the PR appears incomplete with all Dockerfiles commented out. This needs to be resolved before merging. The TypeScript changes are well-structured but need the suggested improvements for production robustness.

Status: 🔴 Needs significant work before merge

@NathanFlurry NathanFlurry force-pushed the 10-25-ci_building_manifests_for_docker_images branch from 29b3780 to 05505c3 Compare October 25, 2025 19:20
@claude
Copy link

claude bot commented Oct 25, 2025

PR Review: Building manifests for Docker

🔴 Critical Issues

1. Commented-out Dockerfiles Breaking Image Builds

The Dockerfiles have been almost entirely commented out, leaving only placeholder sleep infinity commands:

  • engine/docker/universal/Dockerfile: Lines 1-132 are commented out
  • engine/sdks/typescript/test-runner/Dockerfile: All build logic is commented out

Impact: This breaks the Docker build process entirely. The images no longer contain any actual application code or dependencies.

Files affected:

  • engine/docker/universal/Dockerfile:104-106
  • engine/sdks/typescript/test-runner/Dockerfile:26

2. Docker Manifest Strategy Mismatch

The release script (scripts/release/docker.ts) now expects per-architecture tagged images (-amd64, -arm64), but the Dockerfiles no longer build anything. This creates a fundamental disconnect in the release pipeline.

Current flow issues:

  • Script pulls images with -amd64 and -arm64 suffixes (lines 20-24)
  • Creates manifests combining these architecture-specific tags (line 55)
  • But the Dockerfiles don't produce these architecture-specific tags anymore

⚠️ Major Concerns

3. Missing Build Infrastructure

The PR title mentions "building manifests for docker" but the actual building mechanism has been removed. There's no multi-architecture build setup using docker buildx or similar tooling.

Expected implementation:

  • Use docker buildx build --platform linux/amd64,linux/arm64 with proper tagging
  • Or separate builds for each architecture with appropriate tags
  • GitHub Actions workflow should handle the multi-arch builds before the release step

4. Workflow Dependency Removed Without Explanation

The binaries dependency was removed from the complete job (.github/workflows/release.yaml:226). This might be intentional for manifest-only releases, but needs clarification on whether binaries are built elsewhere or no longer needed.

5. Removed --noValidateGit Flag

This change adds git validation back to the release process (.github/workflows/release.yaml:257,259). While this is generally good for safety, ensure this doesn't break existing workflows or require additional setup.


📋 Questions & Recommendations

  1. Is this a WIP PR? The commented-out code and placeholder commands suggest this might be in progress. Consider marking as draft if so.

  2. Missing build step: Where are the multi-architecture Docker images actually being built? The manifest creation assumes they exist, but nothing creates them.

  3. Error handling: The manifest creation in createManifest() (scripts/release/docker.ts:51-59) has no error handling or cleanup if the manifest already exists.


✅ Positive Changes

  1. Multi-architecture support: The manifest approach is the right strategy for providing multi-platform images.
  2. Clear logging: Good console output for debugging manifest creation.
  3. Proper manifest workflow: Using docker manifest create and push is the correct approach.

🎯 Recommendations

  1. Restore the Dockerfiles or move the build logic elsewhere with clear documentation
  2. Add the actual multi-arch build step before manifest creation
  3. Add error handling for manifest operations (check if manifest exists, clean up on failure)
  4. Consider adding --amend flag to docker manifest create for idempotency
  5. Add integration tests to verify the manifests are created correctly with both architectures
  6. Document the release process explaining the new multi-arch workflow

Security & Performance

  • ✅ No security concerns with the manifest approach itself
  • ⚠️ The placeholder images (sleep infinity) could be a security risk if accidentally deployed
  • ⚠️ No apparent performance issues, but manifests should be inspected post-creation to verify correct architecture metadata

Suggested Next Steps

  1. Un-comment the Dockerfiles or integrate with a buildx-based multi-arch build
  2. Update the GitHub Actions workflow to build multi-arch images before calling the release script
  3. Test the entire release pipeline end-to-end
  4. Add documentation explaining the new manifest-based release process

@NathanFlurry NathanFlurry force-pushed the 10-25-ci_building_manifests_for_docker_images branch from 05505c3 to 7570c1c Compare October 25, 2025 19:27
@claude
Copy link

claude bot commented Oct 25, 2025

Pull Request Review

Summary

This PR implements Docker multi-architecture manifest support by modifying the release workflow to create proper manifest lists for AMD64 and ARM64 images. The Dockerfiles have been temporarily commented out (presumably for testing manifest creation).


Critical Issues

1. Dockerfiles Are Completely Broken
Location: engine/docker/universal/Dockerfile, engine/sdks/typescript/test-runner/Dockerfile

All build stages are commented out, leaving only sleep infinity commands. The images will not contain the actual application binaries, rivet-engine binary will not be available, and images are essentially empty shells.

Impact: Severe - These images cannot function in production.

Recommendation: These Dockerfiles MUST be uncommented before merging to any production branch.

2. Missing Manifest Cleanup
Location: scripts/release/docker.ts:53

The docker manifest create command will fail if a manifest with the same name already exists from a previous run. Add cleanup before creating manifests or use the --amend flag.


Major Concerns

3. Removed Git Validation Flag
Location: .github/workflows/release.yaml:257-260
The --noValidateGit flag was removed. Ensure the git validation logic is correct and won't break releases.

4. Architecture Suffix Naming
Location: .github/workflows/release.yaml:166,169 and scripts/release/docker.ts:18-20
The workflow now uses -arm64 and -amd64 suffixes. This is a breaking change - ensure documentation is updated and downstream consumers are aware.

5. Removed Binary Job Dependency
Location: .github/workflows/release.yaml:226
The complete job now only depends on docker, not binaries. Was this intentional?


Positive Changes

6. Proper Multi-Architecture Support
The new manifest creation logic properly combines AMD64 and ARM64 images into unified manifests.

7. Better Error Messages
The error handling now includes the actual error in the message, making debugging easier.

8. Validation of Both Architectures
The code now explicitly checks that both architecture variants exist before creating manifests.


Testing Recommendations

Before merging:

  1. Verify that manifest creation works with both architectures
  2. Test that docker pull rivetkit/engine:latest correctly pulls the right architecture
  3. CRITICAL: Uncomment the Dockerfiles and verify full builds work
  4. Test the release script end-to-end in a staging environment
  5. Verify binary uploads still work correctly

Final Verdict

Status: NEEDS WORK before merging

The manifest creation logic looks solid, but the commented-out Dockerfiles are a blocker. This PR appears to be WIP for testing the manifest creation workflow.

Before merging:

  1. Uncomment all Dockerfile build stages
  2. Add manifest cleanup/amend logic
  3. Clarify the removal of the binaries job dependency
  4. Test full end-to-end release with actual builds
  5. Update any documentation referencing Docker image tags

If this is intentionally a testing/WIP PR, please mark it as draft until the Dockerfiles are restored.

@NathanFlurry NathanFlurry force-pushed the 10-25-ci_building_manifests_for_docker_images branch from 7570c1c to bfec30b Compare October 25, 2025 19:39
@claude
Copy link

claude bot commented Oct 25, 2025

Pull Request Review

Summary

This PR modifies the Docker release process to use multi-architecture manifest lists instead of single-architecture images. The changes comment out the actual Docker build process and update the tagging mechanism to work with pre-built architecture-specific images.


Key Changes Analysis

1. Docker Build Process Changes (Dockerfiles)

The PR comments out the entire Docker build process in:

  • engine/docker/universal/Dockerfile (builder stage and runtime stages)
  • engine/sdks/typescript/test-runner/Dockerfile (entire build process)

Both files now only run sleep infinity instead of their intended functionality.

⚠️ Critical Issues:

  • These changes appear incomplete/WIP: The Dockerfiles no longer build or run anything useful - they just sleep indefinitely
  • Breaking change: These images won't function in production as they contain no binaries or application code
  • No migration path: There's no indication of how these images are actually being built elsewhere

2. Docker Tagging Script (scripts/release/docker.ts)

Changes the approach from pulling and retagging images to creating manifest lists:

Before:

await $`docker pull --platform amd64 ${name}:${prefix}-${opts.commit}`;
await $`docker tag ${image}:${from} ${image}:${to}`;
await $`docker push ${image}:${to}`;

After:

await $`docker manifest inspect ${name}:${prefix}-${opts.commit}-amd64`;
await $`docker manifest inspect ${name}:${prefix}-${opts.commit}-arm64`;
await $`docker manifest create ${image}:${to} ${image}:${from}-amd64 ${image}:${from}-arm64`;
await $`docker manifest push ${image}:${to}`;

✅ Good:

  • Properly creates multi-architecture manifests
  • Validates both amd64 and arm64 images exist before proceeding
  • Better error messages with more context

⚠️ Issues:

  • Assumes architecture-specific images exist: The code now expects images tagged with -amd64 and -arm64 suffixes, but doesn't explain where these come from
  • Missing context: No documentation about how/where the architecture-specific images are built

3. GitHub Workflow Changes (.github/workflows/release.yaml)

  • Removes binaries job from dependencies
  • Removes --noValidateGit flag from release script calls

✅ Good:

  • Removing --noValidateGit is safer - enables git validation checks
  • Simplifies the workflow dependency graph

⚠️ Concerns:

  • Removing the binaries job dependency might break the release if those binaries are needed elsewhere

Security Concerns

  1. No Docker credential handling visible: The manifest operations require Docker Hub authentication, but credentials aren't shown in the diff (might be handled elsewhere - worth verifying)

  2. Supply chain consideration: By moving away from building images in this workflow to consuming pre-built architecture images, ensure:

    • The source of these pre-built images is trusted and secure
    • There's provenance tracking for the pre-built images
    • SBOM (Software Bill of Materials) is maintained

Performance Considerations

Positive:

  • Multi-architecture manifests are more efficient than maintaining separate image tags
  • Using docker manifest inspect is faster than docker pull for validation
  • Eliminates unnecessary image pulls in the release process

Testing & Completeness Concerns

❌ Critical Issues:

  1. Dockerfiles are non-functional: The commented-out Dockerfiles won't work in any environment. This appears to be a work-in-progress change that shouldn't be merged.

  2. Missing context: There's no explanation for:

    • Where are the -amd64 and -arm64 images being built?
    • Is this part of a larger multi-PR change?
    • What's the testing plan for these changes?
  3. No documentation: The PR description is empty, making it impossible to understand the intent

  4. Incomplete migration: This breaks the existing build process without providing a working replacement


Recommendations

Before merging, this PR needs:

  1. Complete the implementation: Either:

    • Revert the Dockerfile changes and only modify the tagging script, OR
    • Provide the complete solution showing where architecture-specific images are built
  2. Add PR description: Explain:

    • Why this change is being made
    • Where the architecture-specific images come from
    • The testing that's been done
    • Any dependencies on other PRs or changes
  3. Add documentation: Update relevant docs about the new build/release process

  4. Test the release process: Verify the complete end-to-end flow works:

    • Architecture-specific images are built somewhere
    • Manifest creation succeeds
    • Images can be pulled and run on both amd64 and arm64
  5. ⚠️ Consider staging this work: If this is part of a larger refactor, consider:

    • Breaking it into smaller, functional PRs
    • Using feature flags to enable the new behavior gradually
    • Maintaining backward compatibility during transition

Code Quality

The TypeScript changes are well-written with:

  • Good error handling
  • Clear logging
  • Proper async/await usage

However, the Dockerfile changes are concerning as they appear incomplete.


Verdict

❌ Cannot recommend merging in current state due to:

  1. Non-functional Dockerfiles that break the build
  2. Missing context and documentation
  3. Appears to be incomplete/WIP changes

This looks like it could be a good improvement for multi-architecture support, but needs to be completed before merging.

Questions for the author:

  1. Is this part of a larger changeset across multiple PRs?
  2. Where are the -amd64 and -arm64 tagged images being built?
  3. What's the testing plan for verifying this works end-to-end?
  4. Is there a reason the Dockerfiles needed to be commented out rather than removed or updated?

@NathanFlurry NathanFlurry force-pushed the 10-25-ci_building_manifests_for_docker_images branch from bfec30b to 515bb0c Compare October 25, 2025 19:52
@claude
Copy link

claude bot commented Oct 25, 2025

Pull Request Review

Summary

This PR modifies the Docker release pipeline to support multi-architecture (amd64/arm64) manifest creation. The changes shift from simple image tagging to proper manifest list management.


Critical Issues

1. Dockerfiles are completely commented out

Location: engine/docker/universal/Dockerfile, engine/sdks/typescript/test-runner/Dockerfile

Issue: The entire build process has been commented out, leaving only empty base images with sleep infinity. This means:

  • No binaries are being built
  • No dependencies are installed
  • Docker images are non-functional shells
  • The images pushed to Docker Hub will be useless

Impact: This will break production deployments completely. Anyone pulling these images will get containers that do nothing.

Recommendation:

  • If this is a WIP/testing PR, it should be marked as a draft
  • The Dockerfiles need to be uncommented before merge
  • Add a check in CI to ensure images are functional

2. Missing dependency on binaries job

Location: .github/workflows/release.yaml:226

Before: needs: [docker, binaries]
After: needs: [docker]

Issue: The complete job no longer waits for binaries to be built and uploaded to R2. This creates a race condition where the release process could complete before binaries are available.

Impact:

  • Binaries might not be available when users try to download them
  • Release process could report success while binary uploads are still failing
  • No guarantee that both Docker images and binaries are available together

Recommendation: Restore the dependency: needs: [docker, binaries]


3. noValidateGit flag removed without context

Location: .github/workflows/release.yaml:257,259

Issue: The noValidateGit flag was removed from the release script invocation. Without seeing the script implementation, this could cause releases to fail if git validation is now enforced.

Recommendation: Verify that removing this flag does not break the CI release process.


Positive Changes

1. Proper multi-arch manifest handling

Location: scripts/release/docker.ts:49-54

The shift from docker tag to docker buildx imagetools create is the correct approach for multi-arch images. This properly creates multi-architecture manifest lists that Docker can use for platform-specific pulls.

2. Improved image existence validation

Location: scripts/release/docker.ts:14-27

The change from docker pull to docker manifest inspect is more efficient:

  • Does not download entire images just to check existence
  • Validates both architectures explicitly
  • Better error messages with architecture information

3. Architecture-specific tagging in workflow

Location: .github/workflows/release.yaml:195,212

Properly appends architecture suffixes (-amd64, -arm64) to image tags, which is essential for the manifest creation step.


Code Quality & Best Practices

1. Error handling could be more informative

Location: scripts/release/docker.ts:22-26

The error message includes the error object but could provide more guidance about what went wrong and how to fix it.

2. Consider adding retry logic

Location: scripts/release/docker.ts:18-20

Manifest inspection could fail due to transient network issues. Consider adding retry logic with exponential backoff.

3. Missing platform validation

Location: .github/workflows/release.yaml:164-169

The matrix does not validate that both platforms actually ran successfully before the complete job. If one architecture fails, the other might still proceed.

Suggestion: Add explicit validation that both amd64 and arm64 images were pushed before creating manifests.


Security Considerations

No security issues identified. The changes maintain the same credential handling and do not introduce new vulnerabilities.


Performance Considerations

Positive:

  • docker manifest inspect is much faster than docker pull
  • Multi-arch manifest creation is efficient with buildx imagetools

No concerns identified.


Test Coverage

Missing:

  • No tests verify that the manifest creation actually works
  • No validation that images are functional (not just empty containers)
  • No checks that manifests contain both architectures

Recommendations:

  1. Add a validation step after manifest creation to inspect the manifest and verify both platforms are present
  2. Add smoke tests that pull and run the multi-arch images
  3. Test that docker pull rivetkit/engine:latest works on both amd64 and arm64

Summary & Recommendations

Before merging, you MUST:

  1. Uncomment all Dockerfile content to restore actual builds
  2. Add binaries back to the complete job dependencies
  3. Verify removing noValidateGit does not break CI

Nice to have:

  1. Add manifest validation after creation
  2. Add smoke tests for multi-arch images
  3. Mark as draft until Dockerfiles are uncommented

Overall assessment: The multi-arch manifest approach is correct and well-implemented, but the PR appears to be in a WIP state with critical components commented out. This should not be merged in its current state.


Questions for the Author

  1. Is this PR intended to be a draft/WIP?
  2. Why are the Dockerfiles completely commented out?
  3. Was removing the binaries dependency intentional?
  4. Has this been tested end-to-end in a staging environment?

Review generated with reference to CLAUDE.md conventions

@NathanFlurry NathanFlurry force-pushed the 10-25-ci_building_manifests_for_docker_images branch from 515bb0c to a59fa00 Compare October 25, 2025 20:38
@NathanFlurry NathanFlurry marked this pull request as ready for review October 25, 2025 20:38
@NathanFlurry NathanFlurry merged commit 0cbd689 into main Oct 25, 2025
8 of 11 checks passed
@claude
Copy link

claude bot commented Oct 25, 2025

PR Review: CI - Building manifests for Docker

Summary

This PR refactors the Docker release script to properly handle multi-architecture images by creating manifest lists instead of simple tags. The change moves from docker tag + docker push to docker buildx imagetools create for proper multi-arch support.

✅ Positive Changes

  1. Correct Multi-Arch Handling: Using docker buildx imagetools create is the right approach for creating multi-architecture manifest lists from existing architecture-specific images.

  2. Better Validation: The new validation using docker manifest inspect checks that both architecture images exist before attempting to create manifests, which will catch issues earlier.

  3. Clearer Intent: The rename from tag() to createManifest() better reflects what the function actually does now.

🔍 Issues & Concerns

1. Error Handling - String Interpolation of Error Object (Minor)

Location: Lines 23-26

throw new Error(
    `Images ${name}:${prefix}-${opts.commit}-{amd64,arm64} do not exist on Docker Hub. Error: ${error}`,
);

Issue: Interpolating the error object directly may not provide useful information. Consider using error.message or error.stderr for better error messages.

Suggestion:

const errorMessage = error instanceof Error ? error.message : String(error);
throw new Error(
    `Images ${name}:${prefix}-${opts.commit}-{amd64,arm64} do not exist on Docker Hub. Error: ${errorMessage}`,
);

2. Manifest Inspect Stdout/Stderr Not Suppressed (Minor)

Location: Lines 18, 20

Issue: The docker manifest inspect commands will output JSON to stdout, which may clutter the console output. The old code suppressed output with stdout: "ignore", stderr: "ignore".

Suggestion: Consider suppressing output for cleaner logs:

await $({ stdout: "ignore", stderr: "ignore" })`docker manifest inspect ${name}:${prefix}-${opts.commit}-amd64`;

Or remove the intermediate console.log statements on lines 17 and 19 since line 15 already indicates what's being checked.

3. Redundant Logging (Minor)

Location: Lines 15-21

Issue: There are multiple console.log statements that may be redundant:

  • Line 15: Says checking both images
  • Lines 17, 19: Individual inspections
  • Line 21: Confirms both exist

Suggestion: Simplify to reduce noise:

console.log(`==> Checking images exist: ${name}:${prefix}-${opts.commit}-{amd64,arm64}`);
try {
    await $({ stdout: "ignore" })`docker manifest inspect ${name}:${prefix}-${opts.commit}-amd64`;
    await $({ stdout: "ignore" })`docker manifest inspect ${name}:${prefix}-${opts.commit}-arm64`;
} catch (error) {
    // ... error handling
}

4. Missing Verification After Manifest Creation (Minor)

Location: Lines 49-55

Issue: The old code verified images existed before tagging them, but the new code doesn't verify that the manifest was successfully created and pushed.

Suggestion: Consider adding verification or at least logging the result:

const result = await $`docker buildx imagetools create --tag ${image}:${to} ${image}:${from}-amd64 ${image}:${from}-arm64`;
console.log(`==> Successfully created and pushed manifest: ${image}:${to}`);

🧪 Testing Considerations

  1. Test with Non-Existent Images: Verify that the error handling properly catches and reports missing architecture images.
  2. Test Manifest Creation Failures: What happens if docker buildx imagetools create fails? The error should be informative.
  3. Verify Multi-Arch Pull: After running the script, verify that docker pull on different architectures pulls the correct image.

🔒 Security Considerations

No security concerns identified. The script uses proper command execution through execa which handles shell injection safely.

📊 Code Quality

  • ✅ Follows TypeScript conventions
  • ✅ Clear function naming
  • ✅ Appropriate comments explaining the change
  • ⚠️ Could benefit from improved error handling

📝 Recommendations

  1. High Priority: Improve error message formatting (Issue [SVC-2555] Set up issue templates #1)
  2. Medium Priority: Simplify logging to reduce noise (Issue [SVC-2504] Fix 5 GB upload limit for local development from Cloudflare #3)
  3. Low Priority: Suppress manifest inspect output (Issue [SVC-2479] Send cluster events to PostHog #2)
  4. Low Priority: Add success verification (Issue [SVC-2483] Remove hardcoded uses of rivet.gg #4)

Verdict

Approve with minor suggestions

The core change is correct and necessary for proper multi-architecture Docker image support. The suggested improvements are minor and focus on better error messages and cleaner logging output.

@NathanFlurry NathanFlurry deleted the 10-25-ci_building_manifests_for_docker_images branch October 25, 2025 20:39
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