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

chore: add talisman env var to config #24774

Merged
merged 3 commits into from
Aug 4, 2023

Conversation

eschutho
Copy link
Member

@eschutho eschutho commented Jul 21, 2023

SUMMARY

This allows us to pass the talisman config from the ephemeral docker image environment variable into the config so that we can turn off talisman for ephemerals.

The Talisman os env var for the ephemeral instance was added here: #24627

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

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

@eschutho
Copy link
Member Author

/testenv up

@github-actions
Copy link
Contributor

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

@eschutho
Copy link
Member Author

/testenv up

@codecov
Copy link

codecov bot commented Jul 22, 2023

Codecov Report

Merging #24774 (5fc61db) into master (77889b2) will increase coverage by 0.00%.
Report is 20 commits behind head on master.
The diff coverage is 78.37%.

❗ Current head 5fc61db differs from pull request most recent head b8ce892. Consider uploading reports for the commit b8ce892 to get more accurate results

@@           Coverage Diff           @@
##           master   #24774   +/-   ##
=======================================
  Coverage   68.99%   69.00%           
=======================================
  Files        1903     1906    +3     
  Lines       74073    74145   +72     
  Branches     8193     8208   +15     
=======================================
+ Hits        51108    51164   +56     
- Misses      20844    20858   +14     
- Partials     2121     2123    +2     
Flag Coverage Δ
hive 54.14% <82.92%> (+<0.01%) ⬆️
mysql 79.22% <96.34%> (+<0.01%) ⬆️
postgres 79.32% <96.51%> (+0.01%) ⬆️
presto 54.04% <82.92%> (+<0.01%) ⬆️
python 83.37% <96.51%> (+0.01%) ⬆️
sqlite 77.89% <96.34%> (+0.01%) ⬆️
unit 55.02% <83.72%> (+0.03%) ⬆️

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

Files Changed Coverage Δ
...d/packages/superset-ui-chart-controls/src/types.ts 100.00% <ø> (ø)
...s/legacy-plugin-chart-country-map/src/countries.ts 100.00% <ø> (ø)
...s/legacy-plugin-chart-heatmap/src/controlPanel.tsx 57.14% <ø> (ø)
.../legacy-plugin-chart-heatmap/src/transformProps.js 0.00% <ø> (ø)
.../legacy-plugin-chart-world-map/src/controlPanel.ts 25.00% <ø> (ø)
...egacy-plugin-chart-world-map/src/transformProps.js 0.00% <ø> (ø)
...ins/legacy-preset-chart-nvd3/src/transformProps.js 7.14% <0.00%> (-0.27%) ⬇️
...harts/src/BigNumber/BigNumberTotal/controlPanel.ts 30.00% <ø> (ø)
...rts/src/BigNumber/BigNumberTotal/transformProps.ts 0.00% <ø> (ø)
.../BigNumber/BigNumberWithTrendline/controlPanel.tsx 16.66% <ø> (ø)
... and 119 more

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link
Contributor

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

@eschutho eschutho force-pushed the elizabeth/pass_env_vars_to_config branch from f083b3a to 5530c7c Compare July 25, 2023 00:40
@@ -66,6 +66,8 @@ def get_env_variable(var_name: str, default: Optional[str] = None) -> str:
REDIS_CELERY_DB = get_env_variable("REDIS_CELERY_DB", "0")
REDIS_RESULTS_DB = get_env_variable("REDIS_RESULTS_DB", "1")

TALISMAN_ENABLED = get_env_variable("TALISMAN_ENABLED", "False")
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be defined in superset/config.py as well so in superset/views/base.py you would do conf["TASLISMAN_ENABLED"] rather than conf.get("TALISMAN_ENABLED", ...).

@@ -120,6 +120,7 @@
"ALERT_REPORTS_DEFAULT_RETENTION",
"ALERT_REPORTS_DEFAULT_WORKING_TIMEOUT",
"NATIVE_FILTER_DEFAULT_ROW_LIMIT",
"TALISMAN_ENABLED",
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need to expose this configuration variable to the frontend as there's no reference to this in the frontend?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry for the confusion. I just marked the PR as draft again. I'm just using that as a test to see if the config is being applied in the ephemeral environment or not.

@eschutho
Copy link
Member Author

/testenv up

@eschutho eschutho marked this pull request as draft July 25, 2023 20:58
@github-actions
Copy link
Contributor

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

@eschutho eschutho force-pushed the elizabeth/pass_env_vars_to_config branch 2 times, most recently from ffca5dd to bf2809c Compare August 1, 2023 18:53
@eschutho
Copy link
Member Author

eschutho commented Aug 1, 2023

/testenv up

@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2023

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

@eschutho
Copy link
Member Author

eschutho commented Aug 1, 2023

/testenv up

@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2023

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

@eschutho eschutho force-pushed the elizabeth/pass_env_vars_to_config branch from 67dd55c to 09f5686 Compare August 4, 2023 00:47
@pull-request-size pull-request-size bot added size/M and removed size/XS labels Aug 4, 2023
@eschutho
Copy link
Member Author

eschutho commented Aug 4, 2023

/testenv up

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

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

@eschutho
Copy link
Member Author

eschutho commented Aug 4, 2023

@michael-s-molina it looks like it got this to work, if you want to review.

@eschutho eschutho marked this pull request as ready for review August 4, 2023 07:07
superset/views/base.py Outdated Show resolved Hide resolved
@eschutho eschutho changed the title chore: add talisman env var to docker config chore: add talisman env var to config Aug 4, 2023
superset/views/base.py Outdated Show resolved Hide resolved
Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

Nice! Thanks for working on this and for the added tests!

@michael-s-molina
Copy link
Member

@justinpark once this PR is merged we'll be able to spin test environments again.

@eschutho eschutho merged commit d23b20e into apache:master Aug 4, 2023
29 checks passed
@eschutho eschutho deleted the elizabeth/pass_env_vars_to_config branch August 4, 2023 16:04
@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

Ephemeral environment shutdown and build artifacts deleted.

@michael-s-molina michael-s-molina added the v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch label Aug 4, 2023
michael-s-molina pushed a commit that referenced this pull request Aug 4, 2023
@mistercrunch mistercrunch added 🍒 3.0.0 🍒 3.0.1 🍒 3.0.2 🍒 3.0.3 🍒 3.0.4 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.1.0 labels Mar 8, 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 v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch 🍒 3.0.0 🍒 3.0.1 🍒 3.0.2 🍒 3.0.3 🍒 3.0.4 🚢 3.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants