67 Commits
Author SHA1 Message Date
zeekay 7844a60aff refactor(pack): modernize to github.com/hanzoai/pack and remove upstream branding
- Migrate module path to github.com/hanzoai/pack across all Go packages
- Remove legacy upstream docs and competitor brand references
- Modernize LLM.md and mise.toml for pristine Hanzo Pack builder
2026-09-04 00:40:42 -07:00
Ed GaniukovandGitHub 01ecfada39 fix: exit 75 for transient failures (#690)
Every failure exited 1, so callers could only retry blindly:
deterministic failures (no provider detected, missing start command)
were run and logged three times by builderv3 before giving up.

Transient failures are now typed as mise.TemporaryError and map to exit
75 (EX_TEMPFAIL): transport errors, 429, 408, 5xx, and truncated
bodies. A 404 for a pinned mise version and a malformed archive stay
deterministic, since retrying them cannot succeed. The mise download
also had no response status check at all, so a 5xx body was written to
disk and later failed as "binary not found in archive".

Carrying that across the process boundary meant giving
GenerateBuildPlan an error return: a mise install failure was
previously swallowed into BuildResult{Success: false} and exited 1
along with every app-level failure. The error is non-nil only for
transient failures, so !Success stays on exit 1.

The download gets an http.Client timeout, since http.DefaultClient has
none and a stalled connection would hang the build forever. It
deliberately does not retry in-process: the caller already retries the
whole command, and retrying here would multiply that and delay the
signal.

Also writes --info-out even when the build result is unsuccessful, so
callers can read {"success": false, "logs": [...]} instead of scraping
stdout.
2026-08-12 14:46:23 +02:00
Michael BiancoandGitHub aae5ff8386 feat(cli): add show-plan flag to info command (#684)
* refactor: add io.Writer parameter to pretty print functions and JSON support

Generated-by: aiautocommit

* chore: promote tidwall/pretty from indirect to direct dependency

Generated-by: aiautocommit

* feat(cli): add show-plan flag to info command

- Add `--show-plan` flag to optionally render the generated build plan in the info command output.
- Update section header printing functions to accept an `io.Writer` destination for consistent output formatting.

Generated-by: aiautocommit
2026-08-10 16:14:52 -06:00
Michael BiancoandGitHub ba4ff74fbc feat(build): --no-cache build option (#516)
* feat: add --no-cache option to build subcommand

* docs: no cache docs

* refactor(buildkit): remove no-cache build option

* The no-cache option is no longer utilized in the BuildKit frontend logic.
* Updated documentation to reflect the removal of this parameter.

Generated-by: aiautocommit
2026-07-21 15:25:25 -06:00
3e53630854 feat: respect cache backend type for registry cache import/export, add cache support to build subcommand (#595)
* fix: respect cache backend type for registry cache import/export

* docs: update local development build instructions

- Update local image building to use the provided project task.
- Document the workflow for building with a local registry.
- Add examples for configuring buildctl with caching and debugging flags.

Generated-by: aiautocommit

* refactor(buildkit): clean up code comments and formatting

- Remove redundant comments and improve internal documentation.
- Fix minor formatting inconsistencies in code blocks and comment descriptions.

Generated-by: aiautocommit

* feat: add ParseBool utility to handle common boolean string variants

Generated-by: aiautocommit

* feat: integrate local registry and buildkit configuration

- Add buildkitd configuration to enable HTTP/insecure access to the local registry.
- Introduce a local registry service container on port 7890.
- Update the buildkit setup to mount the new registry configuration.
- Add tasks for building the frontend image and running project builds using the local registry and buildctl.

Generated-by: aiautocommit

* docs: update CLAUDE.md with architecture and style guidance

Generated-by: aiautocommit

* feat: add support for multiple cache-from and cache-to build flags

- Allow users to configure external cache sources and destinations via the `build` subcommand.
- Update cache parsing logic to support multiple entries matching the Docker buildx CLI format.
- Remove hardcoded default cache type to provide better control over BuildKit cache configurations.

Generated-by: aiautocommit

* test: add integration tests for cache-import parsing

Generated-by: aiautocommit

* refactor(buildkit): extract cache entry parsing logic

- Centralize cache configuration logic by moving loop-based parsing into a reusable `cacheEntriesFromFlags` helper.
- Improve code maintainability and readability by reducing duplication in `BuildWithBuildkitClient`.
- Add comprehensive unit tests for cache entry processing, including edge cases for flag parsing and empty inputs.

Generated-by: aiautocommit

* fix(test): remove unused buildkit cache flags from integration tests

* Remove unused flag variables that were meant for remote BuildKit caching.
* Ensure integration tests avoid remote cache (e.g., type=gha) to prevent exceeding GitHub Actions cache limits and excessive eviction.

Generated-by: aiautocommit

* test(buildkit): consolidate cache import tests

- Move TestParseCacheImports from its own file to frontend_test.go to consolidate related buildkit frontend tests.

Generated-by: aiautocommit

* style: fix indentation in build test helper

Generated-by: aiautocommit

* docs: document support for BuildKit cache backends

Generated-by: aiautocommit

* docs(developing-locally): add information on Docker, BuildKit, and caching

- Add missing setup prerequisites.
- Include debugging and configuration guidance for BuildKit/Docker.
- Clarify cache export and import implementation expectations in Railpack.

Generated-by: aiautocommit

* docs: clarify cache flag parsing and pnpm version logic

Generated-by: aiautocommit

---------

Co-authored-by: Matt Van Horn <[email protected]>

Co-authored-by: Michael Bianco <[email protected]>

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-13 11:15:16 -06:00
Michael BiancoandGitHub 3fee1b57cd refactor: update to go 1.21+ syntax and idioms (#524)
* refactor: update to go 1.21+ syntax and idioms

- Replace interface{} with any throughout the codebase.
- Use strings.SplitSeq and strings.CutPrefix for more efficient string processing.
- Utilize slices.Contains for cleaner slice membership checks.
- Use strings.Builder for efficient string concatenation.
- Adopt modern loop syntax (for range) for iteration.
- Remove redundant omitempty tags in struct definitions.

Generated-by: aiautocommit

* refactor: linting fix

* build: standardize commit messages for automation tasks

- Update commit messages in the upgrade task to follow conventional commit standards.
- Ensure consistency across automated fix, formatting, and snapshot update processes.

Generated-by: aiautocommit

* refactor: update commit messages in mise-upgrade task

Generated-by: aiautocommit
2026-03-23 08:07:06 -06:00
Michael BiancoandGitHub 13ad6257d4 build: upgrade go version (#515)
* build: update go version

* build: lockfile upgrades

* refactor: use switch statements for conditionals

* style: fix blank identifier assignments as receivers

* fix: ignore deferred io and removal errors

* refactor: general code improvements and staticcheck fixes

* test: bump golangci-lint-action version

* build: add go package upgrade task

* build: go package bump

* build: add go mod check to mise check task

* build: upgrade go packages automatically when upgrading mise

* build: update go version in local frontend image
2026-03-16 20:26:16 -06:00
Michael BiancoandGitHub 0990f0df18 fix: eliminate additional logs when using --dump-lbb (#452) 2026-02-02 15:26:37 -07:00
Michael BiancoandGitHub 907047145f feat(shell): support mise package install step (#433)
* docs: misc build process documentation

from exploring how we should do secrets + variables

* test: adding explicit int truthy test case

* refactor: centralize all str => list conversion into a single method

it's a one-liner, but self-documents what we are doing better

* refactor: add helper for parsing env as list

* docs: adding todo for ugly direct getenv access

* test: railpack env var configuration options

* test: check version-less RAILPACK_PACKAGES parsing

* test: snapshot update

* feat: support install phase on shell script provider

allows for more advanced install processes

* docs: note that version-less mise packages are allowed in shell config

* docs: more shell provider examples
2026-01-17 07:47:15 -07:00
Michael BiancoandGitHub c3b8a45727 docs: minor docs and comments (#309)
* refactor: remove obvious comments

* docs: minor comments

* docs: make it clear that cache folders cannot be removed
2025-10-22 12:07:18 -06:00
Michael BiancoandGitHub 865def5e53 feat: add --hide-pretty-plan and --show-plan to prepare (#284) 2025-09-30 05:10:28 -06:00
Michael BiancoandGitHub 299cd74c52 fix: use containerd platform parsing to fix platform parsing (#277)
* docs: inline llm instructions into mise.toml

* fix: use containerd platform parsing and remove custom implementation

* refactor: use a helper to define the default platform when none is defined

* test: platform unit tests

* test: platform integration test

* refactor: simplify integration test assertions

* test: inline tests.json into platform integration tests

* refactor: move platform parsing inside BuildWithBuildkitClient

* test: merge platform tests into general integration tests

* test: update snapshot

* ci: add qemu to integration tests
2025-09-26 08:47:40 -06:00
Michael BiancoandGitHub 2a3dd6825b fix: hard fail on invalid railpack.json (#226)
* fix: hard fail if railpack.json cannot be parsed

* test: add shouldFail test.json expression

helpful if we expect the build to fail. There shouldn't be too many of these, but we'll need at least
a couple to make sure cases like railpack.json syntax errors hard fail.

* test: bad json syntax failure

* test: config file abs path, relative, and DNE cases

* refactor: move hujson helper into internal helpers

* fix: support abs config file path, fail if config file path does not exist

* fix: document relative config file path, no abs config file support

* fix: invalid config json

* test: snapshot update

* test: remove abs file config test

* test: remove custom java config

I know basically nothing about Java and after I fixed the syntax error which was causing this config file to not be picked up, this started failing. The proper Zulu version check which is the main purpose of this is still working fine so I think it's fine to remove these custom commands.

* fix: typo

* test: snapshot update
2025-09-09 19:09:46 -06:00
Michael BiancoandGitHub 4d3d9dc99c feat: support for expanded platform arguments (#246) 2025-09-09 06:04:03 -06:00
Michael BiancoandGitHub a35128351b fix: --verbose enables mise verbose logging (#248)
* build: add bin/ to $PATH for local railpack usage

this is helpful when needing or run a local `railpack` build, without mise,
to avoid injecting mise environment variables.

* fix: support NO_COLOR

* fix: enable MISE_VERBOSE when --verbose is enabled

* fix: case insensitive truthy environment vars

* docs: helpful railpack dev tips
2025-09-03 16:17:30 -06:00
Michael BiancoandGitHub 5af5eb5161 refactor: use consistent local layers entrypoint (#241)
* fix: show-plan not showing json output

regression from $schema addition

* refactor: all providers using a consistent local layer entrypoint

* refactor: add local filesystem through a consistent entrypoint

* fix: improved error message on invalid firstInput

* test: remove path argument from NewLocalLayer test

* test: failing workspace example with uv

* test: passing workspace example

* feat: detect uv workspaces

* test: add packaged uv example

* test: snapshot update
2025-09-03 10:39:48 -06:00
Michael BiancoandGitHub 053a31887c fix: add -e alias for --env (#243)
fixes https://github.com/railwayapp/railpack/issues/202
2025-09-02 16:05:01 -04:00
Michael BiancoandGitHub 549afca2bb feat: add hidden dumb-llb flag (#225)
without this, you have to manually enable the bool to get a dumped llb.

I don't think it makes sense to enable this as a public flag at any point soon (or ever)
but for development having this available as a CLI flag will make life easier and
making it a hidden flag is more self-documenting to developers working with the project.
2025-08-20 11:30:11 -06:00
Michael BiancoandGitHub c3ab6d5078 add schema to plan (#222)
* feat: add $schema to generated plan output

* revert llb removal
2025-08-18 14:07:41 -04:00
Jake RunzerandGitHub 3747c9c8ef Mise github token (#159)
* ability to pass a github token to the mise install command

* buildkit frontend docs
2025-05-23 17:08:24 -04:00
Jake Runzer 464cad4d09 move utils to internal 2025-03-10 19:05:21 -04:00
Jake Runzer dbb5b897a9 parse semver version from text 2025-03-07 18:32:09 -05:00
Jake Runzer a782a68923 fix utils tests 2025-03-04 13:13:07 -05:00
Jake Runzer f3281df49b support specifying versions in RAILPACK_PACKAGES env var 2025-03-04 13:11:40 -05:00
Jake Runzer f4373861bf update docs 2025-03-01 19:48:39 -05:00
Jake Runzer 4e81e472e8 support passing cache key to build command 2025-03-01 19:16:59 -05:00
Jake Runzer 55bb08a518 save railpack version to build result 2025-02-28 14:09:59 -05:00
Jake Runzer 0f3b85fb13 start command and missing build plan errors 2025-02-27 21:47:21 -05:00
Jake Runzer 955bc6a511 logger for logs, warns, and errors 2025-02-27 20:17:07 -05:00
Jake Runzer 90d8fa8ecb fix --previous flag 2025-02-17 21:58:20 -05:00
Jake Runzer e58f615a06 support custom config file path 2025-02-16 20:12:26 -05:00
Jake Runzer 6cd7299071 properly use the version set by goreleaser 2025-02-10 16:14:42 -07:00
Jake Runzer a53ea2c278 add prepare command 2025-02-10 15:31:01 -07:00
Jake Runzer 30003e66b5 support passing in platform as flag 2025-02-05 15:08:09 -08:00
Jake Runzer 416b1acfea update names 2025-02-03 22:28:15 -08:00
Jake Runzer 4cf0eb8278 extract common build flags and write fill out the CLI reference 2025-02-03 21:42:36 -08:00
Jake Runzer 1f1d137d2c support passing in previous versions 2025-01-29 20:49:09 -05:00
Jake Runzer 42d0433788 plan cli command just outputs json plan 2025-01-29 19:55:43 -05:00
Jake Runzer dbbdbf2a6b cleanup graph env and step environment variable handling 2025-01-29 16:34:48 -05:00
Jake Runzer 82e9c2b3a6 some cleanup 2025-01-29 02:43:25 -05:00
Jake Runzer 282e6e0ee9 invalidate layer cache when secrets change 2025-01-28 23:39:15 -05:00
Jake Runzer d50b8c7342 support buildkit secrets when using build command 2025-01-28 17:35:40 -05:00
Jake Runzer cd8f3895e7 rename repo to "railpack" 2025-01-27 23:16:26 -05:00
Jake Runzer 9c7b3e5844 use railpack.json config file 2025-01-27 23:06:58 -05:00
Jake Runzer 82bd90ec1d schema generation 2025-01-27 22:34:36 -05:00
Jake Runzer 65d6fe7e87 flag config 2025-01-27 20:21:52 -05:00
Jake Runzer 6adb975f83 environment variable based config 2025-01-27 20:12:16 -05:00
Jake Runzer b7395eb6ae railpack info command that shows metadata 2025-01-27 14:38:40 -05:00
Jake Runzer e7dab6da37 add python system deps thing 2025-01-24 18:50:46 -05:00
Jake Runzer a9b5a1765f remove duplicates from depends on 2025-01-24 17:25:35 -05:00