Skip to content

by/update node version#1493

Closed
bruce-y wants to merge 233 commits into
docker:masterfrom
useblacksmith:by/update-node-version
Closed

by/update node version#1493
bruce-y wants to merge 233 commits into
docker:masterfrom
useblacksmith:by/update-node-version

Conversation

@bruce-y

@bruce-y bruce-y commented Mar 20, 2026

Copy link
Copy Markdown
  • *: basic scaffolding for build-push-action
  • src: add logic to report differently on success and failure
  • plumb through the dockerfile path when creating a build_task
  • configure a local builder using the docker-container driver as a fallback
  • log specific warning when no builder instances are available (Opencontainers labels #2)
  • point to anvil staging environment (Add workflow examples #3)
  • log anvil url (Use v1.0 of github-actions image #4)
  • npm run build (Add link to issues page #5)
  • point to fly staging (Add blue anchor branding #6)
  • add a fallback input (Leverage docker cache #7)
  • fix typo (Rename LICENCE to LICENSE #8)
  • log the submitted build task id
  • additional logging
  • retry ephemeral anvil errors
  • misc cleanup
  • improve error logs
  • log abandonment url
  • plumb task id through to abandon call
  • include e2e builder launch time the complete request payload (Add 'v1' tag instead of 'v1.0' #9)
  • normalize dockerfile paths
  • log the prefix task id since its more user readable
  • revert back to logging task id
  • retry on ephemeral http errors (Please consider adding input safelisting #10)
  • only retry build task submission on ephemeral server errors (docs: Change use of "Name" to "Path" in dockerfile option information #11)
  • improve error logging
  • tls (can this be used with GitHub package registry? #12)
  • rely on GITHUB_REPOSITORY to get the repo name
  • point staging runs to staging anvil
  • *: teach action to hot load sticky disks
  • dont retry on 500 and plumb 500 through
  • dist: missed build regen
  • add missing vmID in form data
  • src: dont fatal on shutdown
  • add some more debugging for arm builds
  • more debugging
  • *: clear up logs
  • add retry to umount logic incase proc is still running
  • *: ignore the inputs builder
  • *: hit sentry on failures to get remote docker builders
  • fix sentry endpoint
  • send request options as json
  • fix naming of request options
  • check if headers are override
  • remove some core info lines
  • fix lint errors (Not worked with ECR actions #20)
  • rename getRemoteBuilderAddr to getBuilderAddr (Update Readme and description with push on Docker hub #21)
  • correct warning log line (allow only build phase #22)
  • update generated code (Add image tag as action output #24)
  • report builds to the backend (Add *complete* example workflow yaml file #25)
  • dont fail the build if we fail to contact backend (unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /github/workspace/Dockerfile: no such file or directory Error #26)
  • rename a method and add some debug logging (Feature Request: Ability to check for existing image via manifest and retag #27)
  • stop messing up API client headers in requests to backend (Add complete working example #28)
  • inline some logic (path doesn't work, value remains . even if input setted with another value #29)
  • log the status code in the build reporting warning (Feature Request: ability to skip the build step #30)
  • update generated code (Adds GCR example #31)
  • log the full request URL (Default to using BuildKit #32)
  • record and report docker build duration seconds (Feature request: Timestamp based tag #33)
  • Create bump_tags_to_master.yaml
  • *: inline headers
  • *: move formatting of the block device to the client
  • *: blkid returns non-zero code if no fs found
  • log the input context as well as the final context (Feature request: provide way to add --ssh argument to docker build command #39)
  • report cache hit ratio and build size back to backend (Enable use of non-master branch as "latest" #40)
  • workflows: add workflow to avoid checking in ungenerated code (Best practice for environment variables #41)
  • Only use buildRef if it exists (Remove v from tags #42)
  • dist: cat buildkit log file if build fails
  • src: move shutdown, cleanup, commit from post to after build
  • src: add petname and vmID to notification
  • src: add resize2fs call if the block device is formatted
  • src: fix the movement of cleanup to the main step
  • src: add local mirror to buildkit toml
  • src: change sticky disk key to repo name
  • src: make blacksmith builder name unique
  • src: wrap all steps after blacksmith builder in try catch
  • src: add some idempotent cleanup safeguard in post action
  • src: change arch to use BLACKSMITH_ENV
  • src: only resolve buildref on success
  • src: prevent top-level ref variable from being shadowed
  • src: shuttle a expose ID between expose and commit
  • src: report the correct sticky disk key
  • src: bump socket creation timeout to 5s from 3s
  • src: send stickydisk key with commit
  • backend: use device returned in ExposeVolume response
  • backend: default to /dev/vdb when ExposeVolume response is empty
  • *: refactor methods to support mocking
  • *: unify error handling and add more unit tests
  • src: fix bug in conditional that zero'd out expose ID
  • src: alert if an exception is thrown on cleanup
  • src: make getDockerfilePath return the full path to the dockerfile (--cache_froms from a gcr.io private registry: auth error during pull #64)
  • *: use axios-retry instead of handrolled retry methods
  • src: start sending get request with query params
  • src: make post unmount even if buildkitd is no longer present
  • src: ignore error when theres nothing mounted
  • ignore error when nothing is mounted
  • *: move to grpc backed communication for the agent
  • src: refactor cleanup logic to expose buildkitd.log
  • src: cleanup flakiness in different parts of the action
  • src: stop running process as nohup to avoid missing logs
  • src: fix shutdown retry behavior
  • src: stop spurious warnings on buildkit shutdown
  • *: report metrics to the VM agent
  • src: use the plumbed BLACKSMITH_BACKEND_URL if present
  • src: silence metric warnings for now
  • src: print api url in debug info
  • src: disable automatic buildkit GC
  • update README (Login validation must be ignored if push is false #85)
  • Update README.md
  • src: join and leave tailnet on start and cleanup of builder
  • use local dockerfile path over git context (Mono action #86)
  • src: bump timeout from 30s to 45s
  • src: ignore unset sentinel value for tailscale token ([Question] Running container before pushing #89)
  • src: change warning to debug
  • src: update timeout on setupStickyDisk (Cannot locate specified Dockerfile if the dockerfile is in a directory named Docker #91)
  • src: bump buildkit startup timeout to 30sec
  • src: fix error message
  • src: prevent path duplication when dockerfile is within context
  • wip
  • src: add sync before umount
  • *: bind to localhost over TCP instead of using a unix socket
  • src: add scaffolding for support multi-platform builds
  • src: only log fatal errors in tailscale teardown
  • src: disable native multi-arch builds
  • *: normalize file paths in all cases (Local registry example #104)
  • *: introduce a setup-only mode to the build-push-action
  • src: use port from env
  • src: move buildkit prune to cleanup stage and invoke it inline
  • .github: update bump_tags_to_master.yaml
  • src: only commit stickydisk in post step if in setup-only
  • src: print the port bpa is trying to hit
  • src: more debug logs
  • src: add ping before get stickydisk
  • src: add a retry with backoff to combat 429s when downloading buildkit
  • *: allow users to pass in a buildx version
  • action: add missing option string
  • fix: use correct platform when creating remote buildx builder
  • test: fix platform test to work on both ARM and AMD runners
  • .github: add docker workflow
  • .github: add v1.2 to bump_tags_to_master.yaml
  • src: use BLACKSMITH prefixed VM ID env var
  • src: only prune if buildkitd was spun up
  • refactor: Remove buildkit management from build-push-action
  • refactor: Remove sticky disk management while keeping build reporting
  • refactor: complete removal of buildkit and sticky disk management
  • refactor: remove unused stickydisk setup logic and rename setup_builder
  • refactor: remove unnecessary build-reporter abstraction
  • refactor: remove tmpDir management and buildx installation
  • refactor: remove nofallback parameter
  • fix: resolve TypeScript build errors and lint issues
  • refactor: only report metrics when using Blacksmith builder
  • fix: resolve variable scope issues causing CI failures
  • fix: remove unnecessary @ts-expect-error directive
  • chore: comment out bump tags workflow to prevent breaking changes
  • fix: add timeout to buildx export operation to prevent hanging
  • feat: add eStargz compression support for faster image pulls (Add action definitions #1)
  • fix: resolve eStargz version check bug and add test coverage
  • chore: update buf dependency and rebuild dist files for CI compatibility
  • Update base node version

adityamaru and others added 30 commits September 11, 2024 20:08
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
* tls

* set up tls while creating the remote builder
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.
adityamaru and others added 27 commits June 11, 2025 16:25
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
@bruce-y bruce-y closed this Mar 20, 2026
@bruce-y
bruce-y deleted the by/update-node-version branch March 20, 2026 20:51
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.

5 participants