Skip to content

Make devbox sandbox friendly, add devbox CI.#27728

Merged
mdwn merged 4 commits intomasterfrom
mike.wilson/devbox-ci
Jun 14, 2023
Merged

Make devbox sandbox friendly, add devbox CI.#27728
mdwn merged 4 commits intomasterfrom
mike.wilson/devbox-ci

Conversation

@mdwn
Copy link
Copy Markdown
Contributor

@mdwn mdwn commented Jun 12, 2023

The devbox is now sandbox friendly, and devbox CI has been added to ensure that any changes to Devbox are properly validated.

@mdwn mdwn force-pushed the mike.wilson/devbox-ci branch 11 times, most recently from d39d596 to 02874d3 Compare June 12, 2023 15:05
@mdwn mdwn changed the title Add Devbox CI to ensure that Devbox changes are validated. Make devbox sandbox friendly, add devbox CI. Jun 12, 2023
The devbox is now sandbox friendly, and devbox CI has been added to ensure
that any changes to Devbox are properly validated.
@mdwn mdwn force-pushed the mike.wilson/devbox-ci branch from fb0715d to ccb345a Compare June 13, 2023 04:00
@strideynet
Copy link
Copy Markdown
Contributor

What do you mean by "sandbox friendly" out of interest ?

@mdwn
Copy link
Copy Markdown
Contributor Author

mdwn commented Jun 13, 2023

What do you mean by "sandbox friendly" out of interest ?

You can find more info on it here: https://nixos.wiki/wiki/Nix_package_manager#sandboxing, but basically nix sandbox builds don't allow access to the internet. This is enabled by default on Linux, so if we want to use this in CI it'll be easier if we tune our devbox so that it can fit into the sandboxed nix install rather than try to wrestle a no-sandbox nix install into our build boxes, IMO.

@mdwn mdwn marked this pull request as ready for review June 13, 2023 13:47
@github-actions github-actions Bot requested review from espadolini and hugoShaka June 13, 2023 13:48
Comment thread devbox.lock
},
"python@3.11.2": {
"last_modified": "2023-03-31T22:52:29Z",
"plugin_version": "0.0.1",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you know why this got removed?
If I run devbox shell locally, it appears again

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Honestly I'm not sure. It disappears for me and seems to reappear for others. Definitely odd.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Which devbox are you using?

$ devbox version
0.5.4

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Same, but on MacOS.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The devbox folks are looking into this!

Comment thread devbox.json
"python@3.11.2",
"shellcheck@0.9.0",
"yamllint@1.28.0",
"zlib@1.2.13",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Adding zlib to our dependencies fixed the following error when I ran make full-ent FIDO2=dynamic:

ld: file not found: /usr/lib/libz.1.dylib for architecture arm64


- name: Install devbox dependencies
run: |
devbox install No newline at end of file
Copy link
Copy Markdown

@LucilleH LucilleH Jun 14, 2023

Choose a reason for hiding this comment

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

🎉 🎉 🎉 In case you want to enable caching in the future, you can use https://github.com/marketplace/actions/devbox-installer or copy the yaml there

Copy link
Copy Markdown
Contributor

@hugoShaka hugoShaka left a comment

Choose a reason for hiding this comment

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

The GHA part looks good, but I have absolutely 0 nix knowledge. So I can't vouch for the flakes part.

@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from espadolini June 14, 2023 20:21
@mdwn mdwn enabled auto-merge June 14, 2023 20:49
@mdwn mdwn added this pull request to the merge queue Jun 14, 2023
Copy link
Copy Markdown
Collaborator

@r0mant r0mant left a comment

Choose a reason for hiding this comment

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

Bot.

Merged via the queue into master with commit cb84fbf Jun 14, 2023
@mdwn mdwn deleted the mike.wilson/devbox-ci branch June 14, 2023 21:16
Comment on lines +29 to +30
- name: Install devbox
run: curl -fsSL https://get.jetpack.io/devbox | FORCE=1 bash
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we do the curl | bash before we checkout (to descope source code)?

I'm thinking about attacks like https://about.codecov.io/security-update/ here.

I'm also somewhat amused that we're using a floating version of devbox, when the entire point of the tool is to pin the toolchain to specific known versions. We should probably pin the devbox version too. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants