Skip to content
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

DEVPROD-9618 rework sharing admin config #8596

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

ybrill
Copy link
Contributor

@ybrill ybrill commented Jan 6, 2025

DEVPROD-9618

Description

The current implementation will be hard to use going forward: in your staging's local database there are a couple of documents that override the shared config.

  • looking at the admin page you wouldn't know this
  • if someone adds a field to one of those documents it'll need to be changed on everyone's staging
  • you can only override something yourself by setting it manually in the database

This PR changes this. It adds a, "Environment Overrides" section to the admin page
Screenshot 2025-01-06 at 5 24 10 PM
This way it's clear what's overridden, and you can override other things too if you need to.

As before, the shared config is a noop on prod and the main staging. A change from before is that if a config document is overridden, there will be an extra round of parsing for it (into a bson.M and back to bson.Raw). The logic for getting the overridden configuration is a lot simpler now.

Testing

I deployed this to my staging and it works.

@ybrill ybrill requested a review from a team January 6, 2025 23:23
@ybrill ybrill marked this pull request as draft January 8, 2025 17:53
@ybrill ybrill marked this pull request as ready for review January 8, 2025 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant