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

fix: flaky test when sync metadata #21306

Merged
merged 3 commits into from
Sep 2, 2022

Conversation

zhaoyongjie
Copy link
Member

SUMMARY

trying to fix a flaky test on the master

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

@zhaoyongjie zhaoyongjie marked this pull request as ready for review September 2, 2022 07:23
@pull-request-size pull-request-size bot added size/S and removed size/XS labels Sep 2, 2022
@codecov
Copy link

codecov bot commented Sep 2, 2022

Codecov Report

Merging #21306 (e8a0b98) into master (6d65f80) will decrease coverage by 0.11%.
The diff coverage is 75.55%.

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

@@            Coverage Diff             @@
##           master   #21306      +/-   ##
==========================================
- Coverage   66.39%   66.27%   -0.12%     
==========================================
  Files        1784     1789       +5     
  Lines       68232    68291      +59     
  Branches     7263     7273      +10     
==========================================
- Hits        45305    45263      -42     
- Misses      21058    21153      +95     
- Partials     1869     1875       +6     
Flag Coverage Δ
hive ?
mysql 80.83% <77.19%> (?)
postgres 80.88% <77.19%> (+<0.01%) ⬆️
presto ?
python 80.99% <77.19%> (-0.26%) ⬇️
sqlite 79.43% <77.19%> (?)
unit ?

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

Impacted Files Coverage Δ
...hart-echarts/src/MixedTimeseries/transformProps.ts 0.00% <0.00%> (ø)
...chart-echarts/src/Timeseries/Regular/Line/index.ts 33.33% <ø> (ø)
superset-frontend/src/SqlLab/App.jsx 0.00% <0.00%> (ø)
...d/src/SqlLab/components/TabbedSqlEditors/index.jsx 54.23% <0.00%> (-0.94%) ⬇️
...ntend/src/SqlLab/components/TableElement/index.tsx 72.30% <ø> (ø)
superset-frontend/src/utils/localStorageHelpers.ts 90.00% <ø> (ø)
superset-frontend/src/views/App.tsx 0.00% <0.00%> (ø)
superset/views/core.py 75.54% <0.00%> (+0.99%) ⬆️
superset/utils/network.py 34.37% <7.69%> (-3.56%) ⬇️
...plugins/plugin-chart-echarts/src/utils/forecast.ts 93.22% <50.00%> (ø)
... and 34 more

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

Comment on lines -475 to -476
db.session.delete(table)

Copy link
Member Author

Choose a reason for hiding this comment

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

table isn't persisted.

@@ -453,7 +453,8 @@ def test_fetch_metadata_for_updated_virtual_table(self):

# make sure the columns have been mapped properly
assert len(table.columns) == 4
table.fetch_metadata(commit=False)
with db.session.no_autoflush:
Copy link
Member Author

Choose a reason for hiding this comment

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

keep the table in client memory other than writing to DB

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

Nice! LGTM

@zhaoyongjie zhaoyongjie merged commit f71ee2e into apache:master Sep 2, 2022
@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/XS 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants