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

feat: Environment tag #20295

Merged
merged 15 commits into from
Aug 26, 2022

Conversation

reesercollins
Copy link
Contributor

@reesercollins reesercollins commented Jun 7, 2022

SUMMARY

It can often be useful to see at a glance what environment you're currently in. This configurable tag can be set to appear based on any environment variable you set. By default, it shows a tag for development or production based on FLASK_ENV.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before
image
After
image

TESTING INSTRUCTIONS

  1. Start superset in production mode. The tag should not appear
  2. Start superset in development mode. The tag should appear and say "Development"

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Jun 9, 2022

Codecov Report

Merging #20295 (394da2d) into master (96a63bc) will increase coverage by 0.00%.
The diff coverage is 81.81%.

❗ Current head 394da2d differs from pull request most recent head 0742f1e. Consider uploading reports for the commit 0742f1e to get more accurate results

@@           Coverage Diff           @@
##           master   #20295   +/-   ##
=======================================
  Coverage   66.38%   66.38%           
=======================================
  Files        1766     1766           
  Lines       67225    67236   +11     
  Branches     7136     7138    +2     
=======================================
+ Hits        44626    44635    +9     
- Misses      20774    20775    +1     
- Partials     1825     1826    +1     
Flag Coverage Δ
javascript 52.11% <60.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset-frontend/src/views/components/Menu.tsx 50.00% <ø> (ø)
...perset-frontend/src/views/components/RightMenu.tsx 63.33% <60.00%> (-0.15%) ⬇️
superset/config.py 91.50% <100.00%> (+0.02%) ⬆️
superset/views/base.py 75.80% <100.00%> (+0.43%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@rusackas
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

@rusackas Ephemeral environment spinning up at http://52.11.246.58:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

superset/config.py Outdated Show resolved Hide resolved
@rusackas
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

@rusackas Ephemeral environment spinning up at http://54.202.1.99:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@rusackas
Copy link
Member

One last nitpick here - there are some hard-coded colors, and it would be great to pull these from the SupersetTheme object, so that we can override them later with Theme overrides. Ping me on Slack if you wanna talk through the idea or how to approach it.

Copy link
Member

@lyndsiWilliams lyndsiWilliams left a comment

Choose a reason for hiding this comment

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

Hey, this looks great! Just a quick nit, also would you mind writing a test for this tag?

superset-frontend/src/views/components/RightMenu.tsx Outdated Show resolved Hide resolved
@reesercollins
Copy link
Contributor Author

Hey, this looks great! Just a quick nit, also would you mind writing a test for this tag?

There is already a quick test to make sure the tag appears in the DOM. Is that sufficient or would you like some more tests?

Copy link
Member

@lyndsiWilliams lyndsiWilliams left a comment

Choose a reason for hiding this comment

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

There is already a quick test to make sure the tag appears in the DOM. Is that sufficient or would you like some more tests?

I totally missed that test somehow, whoops! That test is definitely sufficient, thanks for updating the styles as well 😁

@rusackas rusackas merged commit 25cc789 into apache:master Aug 26, 2022
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@reesercollins reesercollins deleted the feature/CLDN-1460-upstream branch September 7, 2022 15:42
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants