Skip to content

Conversation

@ptrus
Copy link
Member

@ptrus ptrus commented Nov 27, 2025

Fixes: #652

This PR configures the ROFL builder container image by default for new and upgraded ROFL apps. Also provides clearer error messages when the container runtime is missing or native builds aren't supported.

Everyone should now just run oasis rofl build (regardless of platform).

Note: This changes the built artifacts again, but builds should now be fully reproducible across environments when using the Docker builder.

Changes:

  • Builder container image is now configured by default for new and upgraded apps
  • Stream tar directly to sqfstar instead of extracting to disk
  • Split builder images: minimal rofl-container-builder for container apps, full rofl-dev for raw Rust apps

Tested this (and got reproducable builts on):

  • ubuntu with oasis rofl build --no-container (no builder)
  • ubuntu with oasis rofl build (uses builder)
  • macos with builder oasis rofl build (uses builder)

TODO:

@netlify
Copy link

netlify bot commented Nov 27, 2025

Deploy Preview for oasisprotocol-cli canceled.

Name Link
🔨 Latest commit 3cbaa26
🔍 Latest deploy log https://app.netlify.com/projects/oasisprotocol-cli/deploys/69380d8d8a51e90008324608

@ptrus ptrus force-pushed the ptrus/feature/builder-artefact-default branch 3 times, most recently from 45f5d20 to 6969fc1 Compare November 28, 2025 06:59
@ptrus ptrus marked this pull request as ready for review November 28, 2025 07:01
@ptrus ptrus requested review from Copilot, kostko and matevz November 28, 2025 07:03
@ptrus ptrus force-pushed the ptrus/feature/builder-artefact-default branch 8 times, most recently from 53cc085 to 9a01701 Compare November 28, 2025 08:49
@kostko
Copy link
Member

kostko commented Nov 28, 2025

since rofl-dev image will now be more widely used, we might want to see if there's an easy way to reduce the size of it a bit

We could split it into two images, one that has the essential build tools for container-based apps (should be small) and the other that has Rust toolchain and more stuff. Then use the appropriate one when initializing/upgrading, depending on app kind (raw vs. container).

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@ptrus ptrus marked this pull request as draft November 28, 2025 09:26
@ptrus ptrus force-pushed the ptrus/feature/builder-artefact-default branch 7 times, most recently from 6898807 to ca91721 Compare December 2, 2025 08:59
@ptrus ptrus force-pushed the ptrus/feature/builder-artefact-default branch from 77537f4 to dc2e526 Compare December 2, 2025 14:24
@ptrus ptrus requested a review from Copilot December 2, 2025 14:24
@ptrus ptrus force-pushed the ptrus/feature/builder-artefact-default branch from dc2e526 to 3956608 Compare December 2, 2025 14:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ptrus ptrus requested a review from Copilot December 2, 2025 14:31
@ptrus ptrus force-pushed the ptrus/feature/builder-artefact-default branch from 3956608 to 7b86931 Compare December 2, 2025 14:34
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ptrus ptrus force-pushed the ptrus/feature/builder-artefact-default branch 2 times, most recently from 97cf10c to cfb1131 Compare December 2, 2025 15:38
@ptrus ptrus force-pushed the ptrus/feature/builder-artefact-default branch 6 times, most recently from 0ae0114 to b420dc1 Compare December 4, 2025 10:49
Copy link
Member

@kostko kostko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

return fmt.Errorf("%w\n%s", err, out.String())
}

// Resize to ensure virtual size matches original (prevents truncation).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this also a problem before?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It wasn't, but it's not 100% clear to me why. Maybe this is just a problem on macos, before we always used a docker container for building on macos. Will test out if this is macos specific.

Copy link
Member Author

@ptrus ptrus Dec 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured out what the issue was. It wasn't related to the environment. The problem was that the padding was done on the host via f.Truncate (not in the builder container), and over the bind mount the container saw only the pre‑pad size. Doing either veritysetup verify or resizing the image fixed the issue (probably just due to touching it?). So I moved the padding to be run in the builder env and it fixes the issue. I have kept the veritysetup verify step, since it's useful as a sanity check, but have removed the resize since it's not needed.

@ptrus ptrus force-pushed the ptrus/feature/builder-artefact-default branch from b420dc1 to 4274023 Compare December 9, 2025 11:48
@ptrus ptrus force-pushed the ptrus/feature/builder-artefact-default branch from 4274023 to 3cbaa26 Compare December 9, 2025 11:52
@ptrus ptrus requested a review from Copilot December 9, 2025 11:59
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ptrus ptrus merged commit 1323206 into master Dec 9, 2025
13 checks passed
@ptrus ptrus deleted the ptrus/feature/builder-artefact-default branch December 9, 2025 12:04
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.

oasis rofl build without builder should just fail on macOS

4 participants