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

Add Optional Environment Banner #212

Merged
merged 6 commits into from
Apr 1, 2024
Merged

Conversation

qcannon
Copy link
Contributor

@qcannon qcannon commented Mar 20, 2024

Summary

Currently, if an organization uses Test Track for multiple environments (e.g. production and stage), it can be a bit difficult to discern at first glance for which environment a user is managing a given split test.

This proposed change gives users the option to set a DEPLOYMENT_ENV_LABEL variable in the .env or .env.local file, which will subsequently be rendered in a bright red banner, like so:

Screenshot 2024-03-20 at 5 23 52 PM

The banner is intentionally a tad obnoxious to make it glaringly obvious to the user which environment they are in.

When no DEPLOYMENT_ENV_LABEL variable is set, the header renders as usual:

Screenshot 2024-03-20 at 5 23 24 PM

I envision organizations using the existing state for production and the banner state for a non-production environment (or perhaps vice-versa).

/domain @Betterment/test_track_core

Copy link
Member

@smudge smudge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it! 👏

Any chance you can add a test for this? We have this with_env helper that allows us to change specific ENV vars on a per-example basis.

@qcannon
Copy link
Contributor Author

qcannon commented Mar 20, 2024

@smudge oh yes good call, and thank you for the tip on with_env helper! Pushed that change in 4438999

@qcannon qcannon requested a review from smudge March 21, 2024 13:57
@qcannon qcannon requested a review from smudge March 28, 2024 18:10
Copy link
Member

@smudge smudge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

domain LGTM && platform LGTM!

@smudge smudge merged commit 7ba7ebc into Betterment:main Apr 1, 2024
4 checks passed
@qcannon qcannon deleted the add-env-banner branch April 1, 2024 20:03
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.

None yet

2 participants