1172 Commits

Author SHA1 Message Date
Claude
cc46a915dd refactor: complete removal of buildkit and sticky disk management
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>
2025-08-01 14:25:57 -04:00
Claude
877a04de98 refactor: Remove sticky disk management while keeping build reporting
- 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
2025-08-01 14:10:11 -04:00
Claude
7894682343 refactor: Remove buildkit management from build-push-action
- 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
2025-08-01 14:06:43 -04:00
Aditya Maru
ac765fe619
Merge pull request #119 from useblacksmith/grpc-fallbakc
src: only prune if buildkitd was spun up
2025-06-17 22:24:30 -04:00
Claude
f9f71c9f11 src: only prune if buildkitd was spun up 2025-06-17 14:36:14 -04:00
Aditya Maru
4e97fd3608
Merge pull request #120 from useblacksmith/change-env
src: use BLACKSMITH prefixed VM ID env var
2025-06-16 17:48:07 -04:00
Claude
a037e6f634 src: use BLACKSMITH prefixed VM ID env var 2025-06-16 16:12:28 -04:00
Aditya Maru
574eb0ee0b
.github: add v1.2 to bump_tags_to_master.yaml
Signed-off-by: Aditya Maru <adityamaru@gmail.com>
2025-06-11 17:18:40 -04:00
Aditya Maru
4fac79897d
Merge pull request #118 from useblacksmith/builder-misconfig
fix: use correct platform when creating remote buildx builder
2025-06-11 16:43:20 -04:00
Claude
51bef8ce51 .github: add docker workflow 2025-06-11 16:25:04 -04:00
Claude
616bee01ad test: fix platform test to work on both ARM and AMD runners
The test was hardcoded to expect arm64 platform, causing failures
on AMD runners. Now checks actual host architecture dynamically.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-11 13:54:31 -04:00
Claude
a7fa33c366 fix: use correct platform when creating remote buildx builder
The remote builder was hardcoded to use --platform linux/amd64
regardless of user input or runner architecture. This caused
performance issues on ARM runners and cache inefficiencies.

Now properly uses the platforms input or detects host architecture
to avoid unnecessary QEMU emulation and improve build performance.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-11 12:59:55 -04:00
Aditya Maru
6fe3b1c366
Merge pull request #117 from useblacksmith/add-missing-option
action: add missing option string
2025-05-30 15:02:06 -04:00
Claude
d2acb067a5 action: add missing option string 2025-05-30 14:46:31 -04:00
Aditya Maru
68105fca60
Merge pull request #116 from useblacksmith/bump-buildkitd
*: allow users to pass in a buildx version
2025-05-30 13:07:26 -04:00
Claude
28c244705c *: allow users to pass in a buildx version 2025-05-30 12:31:51 -04:00
Aditya Maru
e09a08878e
Merge pull request #115 from useblacksmith/buildx-ratelimit
src: add a retry with backoff to combat 429s when downloading buildkit
2025-05-18 16:29:42 -04:00
Claude
9dbab7fbd2 src: add a retry with backoff to combat 429s when downloading buildkit 2025-05-18 16:22:27 -04:00
Aditya Maru
198ccc9626
Merge pull request #114 from useblacksmith/add-up-ping
src: add ping before get stickydisk
2025-05-16 13:50:38 -04:00
Claude
1868624b97 src: add ping before get stickydisk 2025-05-16 13:41:46 -04:00
Aditya Maru
f0d8aee790
Merge pull request #113 from useblacksmith/newlogs
src: more debug logs
2025-05-14 14:06:06 -04:00
Claude
e84bc1a88e src: more debug logs 2025-05-14 14:04:56 -04:00
Aditya Maru
5501e3ffb3
Merge pull request #112 from useblacksmith/debug-port
src: print the port bpa is trying to hit
2025-05-14 13:47:44 -04:00
Claude
41a36ac067 src: print the port bpa is trying to hit 2025-05-14 13:43:57 -04:00
Aditya Maru
7af3b3af33
Merge pull request #111 from useblacksmith/fix-unnecessary-commti
src: only commit stickydisk in post step if in setup-only
2025-04-29 17:08:09 -04:00
Claude
296109dd1e src: only commit stickydisk in post step if in setup-only
Firstly this was a bug where we were trying to commit in the post
step even if we had already committed at the end of the main step in
a non-setup-only invocation.

Secondly, if the action is canceled before the exposeID is set in the main
process, we don't want to send a commit request with an empty exposeID.
2025-04-29 17:01:42 -04:00
Aditya Maru
5646913081
.github: update bump_tags_to_master.yaml
Signed-off-by: Aditya Maru <adityamaru@gmail.com>
2025-04-26 22:55:20 -04:00
Aditya Maru
550edf2feb
Merge pull request #110 from useblacksmith/move-prune
src: move buildkit prune to cleanup stage and invoke it inline
2025-04-22 17:01:26 -04:00
Claude
c80185915d src: move buildkit prune to cleanup stage and invoke it inline
Previously, we were firing off an async buildkit prune to clean
up layers unused in 14 days. This changes that to cleanup layers
unused in 7 days and fires it off inline on cleanup. It just seems
easier to reason about that way.
2025-04-22 16:31:23 -04:00
Aditya Maru
49f6d185dd
Merge pull request #109 from useblacksmith/use-port-env
src: use port from env
2025-04-15 21:37:56 -04:00
Claude
11ec21ffed src: use port from env 2025-04-15 18:23:28 -07:00
Aditya Maru
a1b5443a1b
Merge pull request #105 from useblacksmith/setup-only
*: introduce a setup-only mode to the build-push-action
2025-04-14 19:44:06 -04:00
Claude
ab514e31b5 *: introduce a setup-only mode to the build-push-action
This setup-only mode will setup a docker builder with the stickydisk
mounted but will not run a Docker build. The use case here is to allow
customers to then run their custom Tilt files or Docker commands against
our builder. The other subtle change is that we only cleanup in the post
step of this builder action. It is still to be seen if you can start several
of these builders at the same time in a workflow but we can do that as a follow
on.
2025-04-14 16:36:36 -07:00
Aayush Shah
f8d1c2e2ae
*: normalize file paths in all cases (#104) 2025-03-06 17:24:56 -05:00
Aditya Maru
3bde8b24e4
Merge pull request #103 from useblacksmith/stub-multiarch
src: disable native multi-arch builds
2025-03-05 18:23:22 -05:00
Aditya Maru
6fd13769ac src: disable native multi-arch builds 2025-03-04 15:53:15 -05:00
Aditya Maru
aa05aa4d9f
Merge pull request #101 from useblacksmith/tailscale-cleanup
src: only log fatal errors in tailscale teardown
2025-03-03 22:57:51 -05:00
Aditya Maru
feb3751245 src: only log fatal errors in tailscale teardown 2025-03-03 22:55:54 -05:00
Aditya Maru
1def72df18
Merge pull request #99 from useblacksmith/scaffold-multi-platform
src: add scaffolding for support multi-platform builds
2025-02-16 23:16:43 -05:00
Aditya Maru
4a3e86e9c9 src: add scaffolding for support multi-platform builds 2025-02-17 05:25:52 +05:30
Aditya Maru
ca7f4ddd0c
Merge pull request #97 from useblacksmith/02-10-_bind_to_localhost_over_TCP_instead_of_using_a_unix_socket
*: bind to localhost over TCP instead of using a unix socket
2025-02-10 23:07:46 -05:00
Aayush
1390f95565 *: bind to localhost over TCP instead of using a unix socket 2025-02-10 23:06:21 -05:00
Aditya Maru
6ff8522817
Merge pull request #96 from useblacksmith/add-sync
src: add sync before umount
2025-01-21 19:38:26 -05:00
Aditya Maru
2331ad873b src: add sync before umount 2025-01-21 19:34:23 -05:00
Aditya Maru
75e9b3f8b2
Merge pull request #95 from useblacksmith/write-bb-startr
src: write a sentinel file once the builder is setup
2025-01-10 16:06:27 -05:00
Aditya Maru
f440133b20 wip 2025-01-10 15:52:55 -05:00
Aditya Maru
37974fc17e
Merge pull request #94 from useblacksmith/01-09-src_prevent_path_duplication_when_dockerfile_is_within_context
src: prevent path duplication when dockerfile is within context
2025-01-09 10:16:29 -05:00
Aayush
8554acbf59
src: prevent path duplication when dockerfile is within context 2025-01-09 10:03:58 -05:00
Aditya Maru
82dd2a61b6
Merge pull request #93 from useblacksmith/fix-error-msg
src: fix error message
2025-01-08 07:14:53 -05:00
Aditya Maru
5ac445ae84 src: fix error message 2025-01-08 07:14:25 -05:00