fix: fallback to docker-container driver when default builder uses docker driver#76
Open
dephiros wants to merge 2 commits intouseblacksmith:mainfrom
Open
fix: fallback to docker-container driver when default builder uses docker driver#76dephiros wants to merge 2 commits intouseblacksmith:mainfrom
dephiros wants to merge 2 commits intouseblacksmith:mainfrom
Conversation
…ailable When the Blacksmith remote builder setup fails (e.g. sticky disk API timeout), the fallback path checks for an existing builder. The 'default' builder always exists and uses the 'docker' driver, which doesn't support attestation (provenance/sbom). This causes builds to fail with: ERROR: Attestation is not supported for the docker driver. Fix: check the builder's driver, not just its existence. If the existing builder uses the 'docker' driver, create a 'docker-container' builder instead, which supports all buildx features including attestation.
eltonkl
reviewed
Mar 24, 2026
eltonkl
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
The logging statement on src/main.ts line 656 is not reflected in dist/index.js yet.
Could you update dist/index.js slightly?
sed -i '' 's/Created and set a local builder for use/Created and set a local docker-container builder/g' dist/index.js
Author
Thanks for the review @eltonkl and sorry for missing that since I had to update the dist file manually(missing private deps locally) |
Contributor
|
@dephiros this seems like a good change but I would rather y'all not fallback at all! Let me also look into what error you're seeing when interacting with the stickydisk API |
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.
Problem
When the Blacksmith remote builder setup fails (e.g. sticky disk API timeout), the fallback path at
src/main.ts:644checks for an existing builder viatoolkit.builder.inspect(). Thedefaultbuilder always exists and uses thedockerdriver, so the conditionif (builder)is always true.This means the code never reaches the
elsebranch that creates adocker-containerbuilder. Thedockerdriver doesn't support attestation (provenance/sbom), causing builds to fail with:Fix
Check the builder's
driverproperty, not just its existence. If the existing builder uses thedockerdriver, create adocker-containerbuilder instead, which supports all buildx features including attestation.