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

Create a solution for pre-commit hook to update versions #937

Closed
samrose opened this issue Apr 5, 2024 · 1 comment
Closed

Create a solution for pre-commit hook to update versions #937

samrose opened this issue Apr 5, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@samrose
Copy link
Contributor

samrose commented Apr 5, 2024

Chore

Describe the chore

We currently have tooling that will update our extensions versions against our ansible vars https://github.com/supabase/postgres/blob/develop/nix/tools/sync-exts-versions.sh.in

However, we're in a bit of a paradox that the nix expressions live in the same repo

So, it would be optimal of we had a pre-commit hook that will run this updater.

Another small issue is that updating versions numbers must be accompanied by updating various sha256 hashes that are computed by nix at evaluation time. This means that wherever the sync runs, nix needs to be installed. And, it means that it should happen prior to a PR commit being saved and opened.

One idea is that there may be a way to create a simple http service that can do this as part of the pre-commit hook + pre-commit hook could then have local scripting to modify the code in place prior to saving the commit (then a user doesn't need nix on their machine for this step, and possibly for future steps)

Alternatively we can choose a point where start asking people to install nix on their machines, but we would need to solve #936 first for that to happen

@samrose samrose self-assigned this Apr 5, 2024
@samrose samrose added the enhancement New feature or request label Apr 5, 2024
@samrose
Copy link
Contributor Author

samrose commented Jun 10, 2024

closing for now will revisit

@samrose samrose closed this as completed Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant