by/update node version#1493
Closed
bruce-y wants to merge 233 commits into
Closed
Conversation
1. Checks we have buildx installed 2. Configures a remote builder if we get an address back 3. Uses the already configured builder if we don't get an address back This change does not plumb the dockerfile path through as the entity, and does not differentiate a failed build from a succesful to report to anvil in the post step yet.
*: basic scaffolding for build-push-action
This change teaches the build push action to request a stickydisk every time it runs. Once the SD is hotloaded the VM will mount the buildkit root dir and starts buildkitd.
fix: use correct platform when creating remote buildx builder
Signed-off-by: Aditya Maru <adityamaru@gmail.com>
src: use BLACKSMITH prefixed VM ID env var
src: only prune if buildkitd was spun up
- Remove buildkitd startup and configuration logic - Remove buildkitd shutdown and cleanup from both main and post actions - Remove buildkitd-related imports and helper functions - Update startBlacksmithBuilder to check for existing builder from setup-docker-builder - Keep sticky disk setup and build reporting functionality intact BREAKING CHANGE: This action now requires setup-docker-builder to be run first to manage the Docker builder lifecycle
- Remove sticky disk mounting and unmounting logic - Remove sticky disk commit logic from both main and post actions - Replace setupStickyDisk with reportBuildStart to only report build start - Update build completion reporting to not depend on exposeId - Keep build tracking and reporting functionality intact The sticky disk lifecycle is now fully managed by setup-docker-builder
This commit completes the refactoring of build-push-action to focus solely on Docker build reporting and metrics, with all infrastructure management moved to the separate setup-docker-builder action. Changes: - Remove all setupOnly references from context.ts, main.ts, and state-helper.ts - Rename startBlacksmithBuilder to reportBuildMetrics to better reflect its purpose - Remove exposeId from all function signatures and state management - Remove sticky disk commit logic from reporter.ts - Update tests to match new function names and signatures - Clean up unused imports and fix linting issues The action now assumes that a Docker builder has already been configured (either via setup-docker-builder or existing setup) and focuses only on: - Running Docker builds with the configured builder - Reporting build metrics and status to Blacksmith API - Managing build outputs and metadata 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit completes the cleanup of build-push-action by removing all the buildkit and sticky disk setup logic that has been moved to the separate setup-docker-builder action. Changes: - Delete setup_builder.ts which contained 380+ lines of unused code - Create new build-reporter.ts with only the reportBuildStart function - Update all imports to use the new build-reporter module - The new file name better reflects its single responsibility The action is now cleaner and more focused, with infrastructure setup logic properly separated into the setup-docker-builder action. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Inline the reportBuildStart function directly into main.ts since it was just a thin wrapper around reporter.reportBuild. This removes an unnecessary abstraction layer and makes the code simpler. Changes: - Delete build-reporter.ts file - Inline the reportBuild logic directly in reportBuildMetrics function - Update tests to mock reporter.reportBuild directly - Fix test expectations to match the new error messages The code is now cleaner with one less file and abstraction layer. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Since setup-docker-builder handles all infrastructure setup, build-push-action no longer needs to: - Install buildx (just assert it's available) - Manage temporary directories (handled by actions toolkit) Changes: - Replace buildx installation with simple availability assertion - Remove tmpDir state management entirely - Remove buildx-version input parameter - Clean up unused imports and functions The action now assumes buildx is already configured by setup-docker-builder or another setup action, making it simpler and more focused. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Remove the nofallback input parameter as it's no longer needed. The action now assumes that a builder is already configured and available. Changes: - Remove nofallback from action.yml inputs - Remove nofallback from Inputs interface and getInputs function - Update tests to remove nofallback references - Also remove setup-only and buildx-version from action.yml (already removed from code) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Fix axios-retry type compatibility issues in reporter.ts - Remove unused imports (Context, Metric_MetricType) - Update test expectations to match current implementation - Fix ESLint errors and apply formatting 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Rename reportBuildMetrics to reportBuildStart for clarity - Check if builder name contains 'blacksmith' before reporting - Log warning when not using a Blacksmith builder - Skip build start and completion reporting for non-Blacksmith builders - Update tests to reflect function rename 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Move builder variable declaration to outer scope - Use optional chaining for builder.name in buildRef call - Fixes runtime error where builder was undefined outside its declaration scope 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- The @ts-expect-error directive was causing CI failures - npm dependencies don't have the type mismatch that pnpm dependencies had - Verified all tests and builds pass with npm commands matching CI 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- v2 is a breaking version requiring setup-docker-builder to be called first - Commenting out workflow to prevent accidentally bumping v1 tags to breaking changes - Workflow kept as reference for future tag bumping procedures 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…anagement refactor: split build-push-action to separate infrastructure setup
Add a 30-second timeout to the buildxHistory.export() call to prevent workflow jobs from hanging indefinitely when the buildx dial-stdio process crashes or becomes unresponsive. The build will continue with reporting even if the export fails or times out. Key improvements: - Clear timeout when export completes to avoid unhandled promise rejection - Handle undefined exportRes gracefully (already supported by reporter) - Continue with build reporting even if export fails Fixes issue where docker run export-build command would hang with "broken pipe" errors when buildx backend is unavailable. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
fix: add timeout to buildx export operation
- Add estargz boolean input parameter to action.yml - Modify buildx output arguments to include estargz compression flags when enabled - Add buildx version check (requires >= 0.10.0) and push requirement validation - Update README.md with usage examples and documentation - Requires push: true to be effective - Compatible with existing output configurations Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Raunak Chowdhuri <raunak@reducto.ai>
- Move buildx version check before adding compression parameters to prevent build failures on older buildx versions - Add comprehensive unit tests for estargz feature with 8 test cases - Simplify redundant ternary operator logic - Rebuild dist files to fix CI verification Fixes the critical bug where compression parameters were added before version validation, causing unsupported parameter errors on buildx < 0.10.0
Update @buf/blacksmith_vm-agent.connectrpc_es to latest version and rebuild dist files to match CI environment. This fixes the verify-build check that was failing due to dependency version mismatch.
*: add estargz compression support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docker-containerdriver as a fallbackfallbackinput (Leverage docker cache #7)completerequest payload (Add 'v1' tag instead of 'v1.0' #9)GITHUB_REPOSITORYto get the repo namevfrom tags #42)getDockerfilePathreturn the full path to the dockerfile (--cache_fromsfrom a gcr.io private registry: auth error during pull #64)setupStickyDisk(Cannot locate specified Dockerfile if the dockerfile is in a directory named Docker #91)