-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: Add team_integrations
table
#2499
Conversation
🤖 Hasura Change Summary compared a subset of table metadata including permissions: Tracked Tables (1)
Updated Tables (1) |
97225e4
to
e150a1f
Compare
Removed vultr server and associated DNS entries |
hasura.planx.uk/metadata/tables.yaml
Outdated
columns: | ||
- id | ||
- team_id | ||
- bops_submission_url |
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.
I know this is still draft, but was thinking about an interesting question related to this after dev call yesterday & curious how you're thinking about it too !
- Do you imagine that
team_integrations
table has different values on production and staging and is discluded from data sync? - If we one day manage these values from the Editor, would folks expect to manage both their production & staging settings on production because that's where all content & settings are managed? That'd make saving to different environments very tricky!
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.
Ha! I hit these exact questions yesterday and wanted to discuss before taking this further!
I imagine these values certainly being per-environment (I've added a UNIQUE
constraint to team_id
).
We use staging secrets on Pizzas so to keep the current behaviour (Pizzas submitting to staging) we'd need to sync data from staging → Pizzas. This has a few complexities we'd need to consider - managing both staging and prod data syncs and slightly less current data on Pizzas.
Let's try and grab a few mins this morning sometime?
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.
Decisions from discussion this morning -
- A single table to track both staging and production values
- On sync, just copy staging values to staging and Pizzas
- (Future) In Editor, only expose variables for matching environment
e150a1f
to
32b025c
Compare
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.
Looks good! Let's go for a prod deploy today 🙂
## What does this PR do? - Adds new `team.getBopsSubmissionURL()` function which can be used to replace env vars in `planx-new` - Relies on theopensystemslab/planx-new#2499
What does this PR do?
team_integrations
tableWhy do we need this?
As we need to add environment details for Medway it seems sensible to start tidying this up and dropping the numerous env vars we have holding these details.
In future we could also store encrypted API keys here.
Why store
staging_*
andproduction_* values in one table?
Doing this means we don't need to manage an additional data sync from staging to Pizza environments (which currently has production data, but staging secrets). By only copying across the relevant column for the environment, we can avoid managing an additional data sync process. The slight compromise here is that if we allow the setting of these values in the Editor, we'll just need to ensure we just access the environment-appropriate column.
Next steps...
production
team_integrations
table is live onmain
but notproduction
)team.getBopsSubmissionURL()
function planx-core#212BOPS_SUBMISSION_URL_*
env vars 🗑️