-
Notifications
You must be signed in to change notification settings - Fork 0
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 failing auto migrate #990
Conversation
…sr/src/app/prisma (was prisma)
cfb53b0
to
ade5029
Compare
Ashleigh Carr, 21 min Thats right yea. You need to update the image version here service-catalogue/packages/cdk/lib/cloudquery/images.ts Lines 27 to 29 in ce52160
Akash Askoolum, 20 min That's quite the long feedback loop! Are we able to shorten it by running the container locally? You, 18 min We do not run migrations locally at the moment but Ash has a PR about it I think. Akash Askoolum, 14 min It might be possible, however, to run the prisma container ad-hoc against a new postgres database, as a way of testing changes quickly (vs pushing, waiting for CI, and deploying to CODE). You, 13 min From what I understand you would have to deploy, then change to the new image and then deploy again. Akash Askoolum, 11 min Indeed. That's quite a long feedback loop! |
…aad2c65505b8191711dd31ad87252 for test
ba56513
to
4403632
Compare
@@ -1,4 +1,6 @@ | |||
#!/bin/ash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is bin/ash a valid shell?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ash
is the default shell of in alpine linux - https://en.wikipedia.org/wiki/Almquist_shell.
Solved in new PR |
What does this change?
Changes to path to /usr/src/app/prisma as the one that is readonly false
Why?
automatic migration failed with the following message
download failed: s3://deploy-tools-dist/deploy/CODE/service-catalogue-prisma-migrations/prisma.zip to prisma/prisma.zip Could not create directory /usr/src/app/prisma: [Errno 30] Read-only file system: '/usr/src/app/prisma'
Why was this difficult to diagnose
./run-prisma-migrate.sh: line 15: prisma/node_modules/.bin/prisma: not found
seemed pretty obvious to fix but no matter what I changed in run-prisma-migrate.sh nothing made a difference.
Until I became convinced my changes did not take effect and changed the messages on the log and sure enough, they did not change.
But then I found #865
So it seems a new image is created but not used:
"
At the moment, each image gets pushed to GHCR tagged with the full commit sha, e.g.
ghcr.io/guardian/service-catalogue/prisma-migrate:sha-42771e43c3130daa7476d9e5b77455001533c557
This will be manually referenced within the CDK, when the task definition that uses this image is defined.
"
This seems non obvious.
How do we make it better, at the very least I would expect some mention in the READMEs and a comment in the run-prisma_migrate.sh about the need to manually reference a new image.