Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dx: reproducible local env #257

Merged
merged 10 commits into from
Nov 17, 2023
Merged

dx: reproducible local env #257

merged 10 commits into from
Nov 17, 2023

Conversation

leostera
Copy link
Collaborator

@leostera leostera commented Nov 17, 2023

Hi! 👋🏼

After a lot of struggles with DevContainers and VS Code, I resolved to fix the environment issues I had to be able to run the app, and run the tests, locally, using the tools that I'm most comfortable with.

It took some energy, but this PR does:

  1. Move away from nocrypto and onto mirage-cryptonocrypto has been deprecated and hasn't received any updates for ~5 years, and is considered a security concern. mirage-crypto is its successor, and gets a lot of attention. To do this I had to fork Sihl, so you'll find that we're pinning it now to: leostera/sihl@ef4c89f – I've also opened a PR to Sihl upstreaming these changes: feat: move away from nocrypto oxidizing/sihl#563

  2. Bump the version of Debian we are using. I was tempted to move to Ubuntu 23.04 (or one of the LTS versions they still offer support for), but Debian 12 includes a recent-enough version of OpenSSL (~3).

  3. Include phpMyAdmin as a side to Adminer, since Adminer does not support logging into databases without a password (and currently both our development databases are passwordless).

  4. Include an esy.json manifest for reproducible builds on macOS using Esy – this is the large set of folders you see there. They are mostly inoffensive and act as a lock file. In the meantime, I've deleted the default.nix file that is unmaintained and doesn't run on modern versions of Nix and NixPkgs.

  5. Refactor code accordingly and make sure all the tests are still passing both on the DevContainers setup and in the Local setup.

Ran into an issue with Debian-10 on macOS M1 (although not clear if the
os/arch has anything to do with this), where the latest version of
Parcel tried to pull in Rust-based components that relied on libc 2.29
or higher. Unfortunately Debian 10 ships with libc 2.28, so this crashed
at runtime.

This should be enough to fix it.
@leostera leostera mentioned this pull request Nov 17, 2023
8 tasks
.devcontainer/devcontainer.json Outdated Show resolved Hide resolved
esy.json Outdated Show resolved Hide resolved
pool/database/seed/seed_tenant.ml Outdated Show resolved Hide resolved
scripts/setup.sh Outdated Show resolved Hide resolved
fix(ci): use new env variable for first tenant db
fix(ci): we need both env vars now
fix(ci): move away from TENANT_TEST
Copy link
Contributor

@mabiede mabiede left a comment

Choose a reason for hiding this comment

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

lgtm

@mabiede mabiede merged commit 9722ebb into main Nov 17, 2023
5 checks passed
@leostera leostera deleted the dx/reproducible-local-env branch November 17, 2023 12:15
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.

2 participants