-
Notifications
You must be signed in to change notification settings - Fork 16
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
upgrade typeorm to 0.3.x, clean up config and build #934
Conversation
4c5ce1c
to
cd8b358
Compare
This came dangerously close to making me try out migrating to prisma. Typeorm gets to live another |
455a200
to
34cd1de
Compare
eab60d4
to
e96f334
Compare
https://typeorm.io/changelog#breaking-changes-2 this commit addresses find(), findOne(), and similar methods changes TODO: migrate from manager/connection to DataSource (https://typeorm.io/changelog#deprecations) [no ci]
TODO: test setup is still broken [no ci]
I think this functions more or less the same as the previous setup with createConnection * some minor clean up in terms of the setup routine
changed the server/.env generation from envsubst to sed and includes remaining server secrets (DB_PASSWORD which is needed for datasource.ts SECRET_KEY and MAIL_API_KEY which were previously read in from a file) assumes that if .env exists it should not be overwritten. this does mean managing additions to the versioned .env.template manually..
mirrors improvements in comses/comses.net#696 * use one shared .env for all non-secret config (replaces server/.env and client/.../config.ts) * continue to use files for secrets, but with docker compose secrets * move base_url mapping to shared/settings.ts from `configure` script * replace server/deploy/ with top level deploy dir * clean up anything unused or unecessary from Makefile
e96f334
to
9485200
Compare
prisma looks interesting and a simpler way to map JS things to a database than typeorm which is one of those bring-familiar-abstractions-from-another-implementation (Hibernate / JPA / C# Entity Framework) to typescript |
on staging |
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.
LGTM though I think we should finish up the shared/src/settings.ts refactor and figure out why staging (and presumably production) isn't rendering RELEASE_VERSION
properly
@@ -93,7 +93,7 @@ ccarra1@asu.edu | |||
© 2020-{{ currentYear }} | |||
<a href="https://www.azregents.edu/">Arizona Board of Regents</a> | | |||
|
|||
<a :href="constants.GITHUB_URL">{{ constants.BUILD_ID }}</a> | |||
<a :href="constants.GITHUB_URL">{{ constants.RELEASE_VERSION }}</a> |
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.
for some reason this isn't being rendered properly on staging deployment, shows up as "unknown". Perhaps the shared/settings environment isn't being set at runtime?
should probably fully merge Constants into shared/src/settings
as per its FIXME tag
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.
oh yeah I think it needs access to these at build time for them to be available. I'll try and do this with vite's support for env vars https://vitejs.dev/guide/env-and-mode
- use vite import.meta.env for things on the client that come from .env * would've been nice to just integrate this into shared/settings such that when called from the client, import.meta.env would be used instead of process.env but this is extremely difficult to do - Constants -> settings - add $settings vue global for accessing shared settings easier
b5bb5e8
to
5123a09
Compare
vite needs the actual .env file in order to statically replace import.meta.env values
shared settings and env vars should be fixed now. I haven't looked into the problems with upgrading yet |
thanks Scott! LGTM, we can deal with dependency upgrades later |
API changes:
https://typeorm.io/changelog#breaking-changes-2
DataSource, connection/manager deprecation:
https://typeorm.io/changelog#deprecations
resolves virtualcommons/planning#65