-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix incorrect use of bash variable #1797
Conversation
Thank you jpagex! Just noticed that we are not running shellcheck on that script in CI. When I run it manually, it raises:
Singe quotes would probably work like this: If you'd like to get your feet wet in our nix dev environment: To add shellcheck to the postgrest-lint script, you could add
But don't worry if not, we'll add it separately otherwise :-) |
I changed to single quotes. I wanted to make the change in
Do you have an idea? |
This is one of those cases where I think expanding this "now" is actually better than "when signalled", so the shellcheck advise is not that helpful. Is it possible to disable it for this line? (In practice it doesn't make that big of a difference, but in theory the |
Well phrased! That is exactly how I felt about it. |
Yes, it doesn't make a difference in our case, and it's easier than to disable the check (which can be done with a comment, see e.g. Line 121 in 7f11c1a
Not sure what happens there - if you only change nix/style.nix it shouldn't have an impact on the other modules like nix/tests.nix that is mentioned in the trace. Do you have a branch/commit that I can take a look at? |
It happens even without adding the code to
Can it be the cause? |
I had not set up cachix with PostgREST. I will try with it and let you know if it works. |
Ok! What kind of machine are you on? The fix is good as is, I'll merge. If you'd like to contribute the nix/CI enhancement, happy to work in a separate PR! |
MacBook Pro 15-inch, 2018 Thanks for the merge. |
Ah, I don't think we've ever tested the nix environment on MacOS, only Linux and in Docker. It would be great if we got it to properly work on MacOS, at least for development without the static compilation stuff. In the meantime, @wolfgangwalther got the Nix setup to work as is on Windows with Docker: https://github.com/PostgREST/postgrest/blob/main/nix/Dockerfile . That might also work on MacOS? |
See here how to start it. |
Strange, the PR made a test fail on CI when merged into master: https://app.circleci.com/pipelines/github/PostgREST/postgrest/850/workflows/1c7c98b4-8081-4239-96a8-fef6a9fb5f1e/jobs/8487 Not sure what happened there. |
I'm pretty sure that this is a very rare race-condition that comes from running the test-suite in parallel. We had to clean up a few tests not mutating the database and probably still have some that do manipulate some sequences somehow. I'll add an issue to track and will investigate/fix at some point. I don't think this will come up again immediately. |
I just retriggered the circle ci workflow and it's passing now - without any changes. So this is really not easily reproducible. I wrote down the link to the error log in the linked issue, though. |
I just hit an edge-case in #1812, where it would be really beneficial to have |
@wolfgangwalther There is value to having that script separate I think - e.g. for users still using stack only. It's pretty easy to hardwire it into nix though: Simply replace |
Cool - will do! |
Closes: #1796