-
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
feat: Stage specific data | NPG-7769 #486
Conversation
This is the basic structure to support stage specific data being setup in the DB.
This needs to be picked up and completed. |
@stevenj Why do we need five |
You can't have empty directories, in git so these just keep the directory hierarchy. it was the top rated answer from here: https://stackoverflow.com/questions/115983/how-do-i-add-an-empty-directory-to-a-git-repository |
@stevenj I see, tanks. |
The reason I use These directories are a special case because their names are important and part of the logic controlling if stage specific data gets applied when the database is constructed. They need to match exactly the name of the environment used by kubernetes. But IF the kubernetes stage is unknown we use You will also see that we actually had an error in our global It's certainly something worth discussing with the team though. Just laying out my rationale. |
@FelipeRosa This looks ok so far, but it's still missing the F10 data for the event table. |
0136204
to
b1a4c77
Compare
@@ -19,6 +19,7 @@ | |||
# DB_USER_PASSWORD - The password of the database user | |||
# DB_SKIP_HISTORICAL_DATA - If set, historical data will not be added to the database (optional) | |||
# DB_SKIP_TEST_DATA - If set, test data will not be added to the database (optional) | |||
# DB_SKIP_STAGE_DATA - If set, stage specific data will not be added to the database (optional) |
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.
This has the potential to get confusing. What is the difference between the three data types now? Is any of it mutually exclusive? We might want to be more specific in the comments here, otherwise it's hard to discern when you would use which type of data.
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.
Maybe we can link to the stage_data readme: https://github.com/input-output-hk/catalyst-core/blob/ddca820715d2302c62c04abbb217f604970b4639/src/event-db/stage_data/Readme.md and get that to be more explanatory?
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.
Yeah, that's a good idea. I think the readme is actually fine as is.
@@ -31,6 +32,7 @@ | |||
# SKIP_GRAPHQL_INIT - If set, graphql will not be initialized (optional) | |||
# DEBUG - If set, the script will print debug information (optional) | |||
# DEBUG_SLEEP - If set, the script will sleep for the specified number of seconds (optional) | |||
# STAGE - The stage being run. Currnelty only controls if stage specific data is applied to the DB (optional) |
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.
Typo in "currently." I also wonder if we shouldn't consider "environment" over "stage" seeing that we don't use the word "stage" anywhere else that I know of.
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 don't know what is the rationale for this but I imagine it is to not create an environment variable called environment?
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 see it's been used pretty much everywhere in the PR, so it might be a pain to change at this point. Based on the comment, though, it's not really clear that this basically means "environment" because that's what's getting passed to it (i.e. dev
, testnet
, etc.). So maybe just better documentation would be helpful.
For clarity, I'm thinking from the perspective of external users here.
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 agree with you. I've created an issue to track that (#498)
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.
…-hk/catalyst-core into feature/stage-specific-data
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.
This is all good, I just updated a couple of the times to match the F10 parameters published here:
https://docs.projectcatalyst.io/catalyst-basics/fund10/fund10-parameters
Description
Add the capability to initialize the database with stage specific data.
Allows us to easily control the setup of the deployment environments through the database via git.