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

Explicitly version node and prisma in the migrate image #879

Merged
merged 2 commits into from
Mar 27, 2024

Conversation

chrislomaxjones
Copy link
Contributor

@chrislomaxjones chrislomaxjones commented Mar 27, 2024

What does this change?

  • Use the node:20.11.1-alpine image, which matches the .nvmrc.
  • Use [email protected], which matches the rest of the service-catalogue (specifically packages/common/package.json).

Thanks @akash1810 for the heads up.

Why?

The versions of software used in the image should be the same as those used in the rest of the repo.

How has it been verified?

Tested on CODE via #883

@chrislomaxjones chrislomaxjones requested review from a team as code owners March 27, 2024 14:29
@chrislomaxjones chrislomaxjones force-pushed the clj/tweak-prisma-migrate-image branch from 958af7d to 689f79f Compare March 27, 2024 14:30
@chrislomaxjones chrislomaxjones force-pushed the clj/tweak-prisma-migrate-image branch 4 times, most recently from 220792c to 7e0ef79 Compare March 27, 2024 17:26
@chrislomaxjones chrislomaxjones force-pushed the clj/tweak-prisma-migrate-image branch from 7e0ef79 to 6652bf0 Compare March 27, 2024 18:05
@chrislomaxjones
Copy link
Contributor Author

This will require a subsequent PR bumping the commit hash, such as #883.

Copy link
Member

@akash1810 akash1810 left a comment

Choose a reason for hiding this comment

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

We should address the TODO ASAP.

Comment on lines +12 to +13
# TODO: Keep the version automatically in sync with common/package.json
RUN npm install [email protected]
Copy link
Member

Choose a reason for hiding this comment

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

Suspect this'll get annoying very quickly as Dependabot updates Prisma every week...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point 👍

Simplest route might be to just COPY ./packages/common/package.json ... and RUN npm install. A multi-stage build could be used to drop all of the dependencies we don't care about.

@chrislomaxjones chrislomaxjones merged commit cdd0348 into main Mar 27, 2024
3 checks passed
@chrislomaxjones chrislomaxjones deleted the clj/tweak-prisma-migrate-image branch March 27, 2024 18:12
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