-
Notifications
You must be signed in to change notification settings - Fork 12
✨ add "Manage Admin Access" features to "Settings" page #168
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
base: master
Are you sure you want to change the base?
Conversation
The config-update workflow runs one of the scripts in bin/config_update, commits and PRs the config changes if there are any, and auto-merges that PR if it passes checks. The workflow can be triggered from op-admin-dashboard given that it has credentials to trigger workflows (which are provided through a Github app: https://github.com/settings/apps/op-config-updates) Currently, this works to add/remove admin users from the admin_access list: e-mission/op-admin-dashboard#167 (comment) Tested end-to-end from admin dash: e-mission/op-admin-dashboard#168
Add interface to update admin users list via UI. Triggers the config-update workflow on the config repo to PR changes (automerge if checks pass) Introduces env vars for GitHub App auth: CONFIG_REPO: "e-mission/nrel-openpath-deploy-configs" CONFIG_UPDATES_WORKFLOW: "config-update.yml" CONFIG_UPDATES_GH_APP_PRIVATE_KEY CONFIG_UPDATES_GH_APP_ID CONFIG_UPDATES_GH_APP_INSTALLATION_ID (CONFIG_REPO replaces CONFIG_PATH which was unused) Status of the workflow and PR are monitored in the UI. If credentials aren't set, updates will fail. Designed to support more config update actions in the future; all the functions in config_update_utils.py are generic Testing done: e-mission#168 (comment)
582b874 to
1d37911
Compare
|
For this to work on prod, we will need to provide new environment variables ( I gave @TeachMeTW the necessary values to test locally against my fork and it worked as expected, with this PR being created: JGreenlee/nrel-openpath-deploy-configs#30 |
The config-update workflow runs one of the scripts in bin/config_update, commits and PRs the config changes if there are any, and auto-merges that PR if it passes checks. The workflow can be triggered from op-admin-dashboard given that it has credentials to trigger workflows (which are provided through a Github app: https://github.com/settings/apps/op-config-updates) Currently, this works to add/remove admin users from the admin_access list: e-mission/op-admin-dashboard#167 (comment) Tested end-to-end from admin dash: e-mission/op-admin-dashboard#168
|
@JGreenlee on production, environment variables are configured using the AWS secrets manager. I see that you have already added them to the docker-compose 👍 You can provide them to @jgu2 and he can add them to the secrets manager before we merge + deploy |
shankari
left a comment
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 looked through at a high level; I wonder if you could describe why we need get_recent_workflow_run.
when we dispatch a workflow, don't we get the workflow ID? That seems more robust than checking for recent calls - what if two deployments make changes in the same 10 minutes.
Similarly, the workflow should be able to output the ID of the PR that it creates.
Unfortunately no, we don't get the workflow ID. We just get an empty OK response (204)
I tried this too, but there's no easy way to get an output value from a workflow run. |
The config-update workflow runs one of the scripts in bin/config_update, commits and PRs the config changes if there are any, and auto-merges that PR if it passes checks. The workflow can be triggered from op-admin-dashboard given that it has credentials to trigger workflows (which are provided through a Github app: https://github.com/settings/apps/op-config-updates) Currently, this works to add/remove admin users from the admin_access list: e-mission/op-admin-dashboard#167 (comment) Tested end-to-end from admin dash: e-mission/op-admin-dashboard#168
With cognito auth, the email of the authenticated user is included in the token, but before this change we didn't save it anywhere. These changes return the user email from authentication, save it as a global store, and pass it to the config-updates workflow when it is triggered, allowing us to "maintain an audit trail of who made the appropriate changes." e-mission#168 (comment)
The config-update workflow runs one of the scripts in bin/config_update, commits and PRs the config changes if there are any, and auto-merges that PR if it passes checks. The workflow can be triggered from op-admin-dashboard given that it has credentials to trigger workflows (which are provided through a Github app: https://github.com/settings/apps/op-config-updates) Currently, this works to add/remove admin users from the admin_access list: e-mission/op-admin-dashboard#167 (comment) Tested end-to-end from admin dash: e-mission/op-admin-dashboard#168
The config-update workflow runs one of the scripts in bin/config_update, commits and PRs the config changes if there are any, and auto-merges that PR if it passes checks. The workflow can be triggered from op-admin-dashboard given that it has credentials to trigger workflows (which are provided through a Github app: https://github.com/settings/apps/op-config-updates) Currently, this works to add/remove admin users from the admin_access list: e-mission/op-admin-dashboard#167 (comment) Tested end-to-end from admin dash: e-mission/op-admin-dashboard#168







Uh oh!
There was an error while loading. Please reload this page.