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: adding additional configs and colors for queryHistory #14995

Merged
merged 4 commits into from Jun 7, 2021

Conversation

AAfghahi
Copy link
Member

@AAfghahi AAfghahi commented Jun 4, 2021

SUMMARY

Some of the statuses in Query History did not have the proper configs and colors, this PR fixes that. Changes were suggested in:
#14885

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Should be like:
image

TESTING INSTRUCTIONS

Go to the QueryHistory tab in sql lab, make sure that

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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 4, 2021

Codecov Report

Merging #14995 (c4b82a6) into master (c8cf4b6) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14995      +/-   ##
==========================================
- Coverage   77.68%   77.68%   -0.01%     
==========================================
  Files         965      965              
  Lines       49535    49538       +3     
  Branches     6268     6268              
==========================================
  Hits        38482    38482              
- Misses      10852    10855       +3     
  Partials      201      201              
Flag Coverage Δ
javascript 72.63% <0.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...rontend/src/SqlLab/components/QueryTable/index.jsx 61.64% <0.00%> (-2.65%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c8cf4b6...c4b82a6. Read the comment docs.

@michellethomas
Copy link
Contributor

Thanks for the quick fix, I'll test the View results test case with this fix.

@AAfghahi
Copy link
Member Author

AAfghahi commented Jun 4, 2021

ok! Let me know how it looks, and we can get it merged afterwards.

Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

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

LGTM, will wait for @michellethomas to test so we can merge.

@pull-request-size pull-request-size bot added size/M and removed size/S labels Jun 4, 2021
@AAfghahi
Copy link
Member Author

AAfghahi commented Jun 4, 2021

@betodealmeida michelle and I went through this on zoom, and it is now working for her.

name={statusAttributes[q.state].config.name}
status={statusAttributes[q.state].config.status}
/>
{q.state && (
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible for q.state to be undefined? You added this when we were testing, is this still needed?

Copy link
Member Author

@AAfghahi AAfghahi Jun 4, 2021

Choose a reason for hiding this comment

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

no, I changed it back, ty.

@pull-request-size pull-request-size bot added size/S and removed size/M labels Jun 4, 2021
@hughhhh hughhhh merged commit 7f4e036 into apache:master Jun 7, 2021
john-bodley pushed a commit to airbnb/superset-fork that referenced this pull request Jun 7, 2021
)

* added additional configs and colors for queryHistory

* added condition to status icon

* Update superset-frontend/src/SqlLab/components/QueryTable/index.jsx

* Update superset-frontend/src/SqlLab/components/QueryTable/index.jsx

(cherry picked from commit 7f4e036)
@michellethomas
Copy link
Contributor

Hi @AAfghahi thanks so much for getting this fix in. I think there's some cleanup todo from this issue to make sure it doesn't happen again. How do you want me to keep track of the suggestions gh issue?

It would be nice to either make sure that any possible sqllab query states that are not in statusAttributes will be flagged in CI or if the code in QueryTable can handle unknown states (states not listed in statusAttributes). It could be good to add tests for different query states, and it looks like the fetching type isn't included in QueryState.

@AAfghahi
Copy link
Member Author

AAfghahi commented Jun 8, 2021

@michellethomas Hello, sorry for the late reply. Thank you so much for these thoughts and suggestions, I agree with all of them.

I am comfortable keeping this PR open as a tracking mechanism, we can also create an issue as a collection.

I will change the code tomorrow to handle unknown states, and will also add tests. Though, the tests may have to wait till next week, because the rest of this sprint I need to focus on a feature that we are rolling out (if that is ok). I'll add fetching into QueryState tomorrow (one of the reasons it wasn't even including earlier was because we didn't know it existed!).

amitmiran137 added a commit to nielsen-oss/superset that referenced this pull request Jun 8, 2021
* upstream/master:
  fix(explore): Datepicker glitch on hover outside the modal (apache#15033)
  Add ming-height to empty tab (apache#14878)
  Remove nowrap (apache#14954)
  display all metric results in editor (apache#15031)
  feat: Add "is_select_query" method to base engine spec to make it possible to override it (apache#15013)
  fix(dashboard): custom css should be removed on unmount (apache#15025)
  feat(filter-box): hide druid options if druid not enabled (apache#14921)
  fix: adding additional configs and colors for queryHistory (apache#14995)
  chore: rename 'Source' to 'Database' for consistency (apache#15021)
  chore(ci): fix ci conflict (apache#15016)
  fix(native-filters): avoid double load on initialization (apache#15012)
  feat(native-filters): Support default to first value in select filter (apache#14869)
  docs: required information for OAuth2 configuration (apache#15010)
  Update index.mdx (apache#14990)
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
)

* added additional configs and colors for queryHistory

* added condition to status icon

* Update superset-frontend/src/SqlLab/components/QueryTable/index.jsx

* Update superset-frontend/src/SqlLab/components/QueryTable/index.jsx
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
)

* added additional configs and colors for queryHistory

* added condition to status icon

* Update superset-frontend/src/SqlLab/components/QueryTable/index.jsx

* Update superset-frontend/src/SqlLab/components/QueryTable/index.jsx
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
)

* added additional configs and colors for queryHistory

* added condition to status icon

* Update superset-frontend/src/SqlLab/components/QueryTable/index.jsx

* Update superset-frontend/src/SqlLab/components/QueryTable/index.jsx
@mistercrunch mistercrunch added the 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels label Mar 12, 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/S 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants