-
Notifications
You must be signed in to change notification settings - Fork 1k
Improve fdc permissions setup #8339
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
Conversation
…, revoke users, and have sufficient permissions before diffing
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.
Some ntis and suggestions, but mostly LGTM
logger.info(clc.green("Database setup complete.")); | ||
logger.info( | ||
clc.yellow( | ||
"IMPORTANT: please uncomment 'schemaValidation: \"COMPATIBLE\"' in your dataconnect.yaml file to avoid dropping any existing tables by mistake.", |
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.
(can be in a follow up) Should we just uncomment it by default in this case? Seems like a foot gun otherwise
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.
Are you aware of an easy way to do the uncommenting?
Could you also add some Scenarios Tested in the PR description? |
This PR improves the FDC schema setup:
1- Make sure IAM user is upserted before sql:diff
2- Refactor brownfield setups to revoke owners after setup to avoid getting left with IAM roles.
3- Use transactions for schema setup commands to avoid problems when setup fails in intermediate state (e.g if we assign IAM role to firebasesuperuser then firebasesuperuser becomes IAM role and it becomes not possible to login using that role).
4- If schema is setup as brownfield then schema migration will fail without prompting the user to setup. If users decide to change their setup then they should run the setup command explicitly (this change doesn't affect fresh database, they are still automatically setup).
5- Improve messaging (tell users to turn on compate mode)
Scenarios tested: