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(Explore): Undefined owners #17167

Merged
merged 2 commits into from
Oct 20, 2021
Merged

fix(Explore): Undefined owners #17167

merged 2 commits into from
Oct 20, 2021

Conversation

geido
Copy link
Member

@geido geido commented Oct 20, 2021

SUMMARY

This PR fixes the following issues:

  • Undefined owners in the Datasource modal
  • Impossible to save with the same owners

The problem arose from the fact that the data related to the owners is very inconsistent and comes in three forms:

  • On load the data is of type [{id: number; first_name: string; last_name: string;}]
  • On selection from the dropdown the data is of type [{value: number; label: string;}]
  • On save the data is of type number[]

This PR checks for the different data types to make it work. However, a deeper refactor is required to make the data consistent in both the frontend and the backend

Follow-up of #17063

BEFORE

before.mp4

AFTER

after.mp4

TESTING INSTRUCTIONS

  1. Open Explore
  2. Click on "Edit dataset"
  3. Select an owner and save
  4. Re-open the modal and check the owners

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 Oct 20, 2021

Codecov Report

Merging #17167 (1e29966) into master (e32acd2) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #17167   +/-   ##
=======================================
  Coverage   76.91%   76.91%           
=======================================
  Files        1039     1039           
  Lines       55559    55561    +2     
  Branches     7567     7570    +3     
=======================================
+ Hits        42733    42735    +2     
  Misses      12576    12576           
  Partials      250      250           
Flag Coverage Δ
javascript 70.93% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...end/src/components/Datasource/DatasourceEditor.jsx 72.10% <100.00%> (+0.19%) ⬆️
...tend/src/components/Datasource/DatasourceModal.tsx 75.38% <100.00%> (ø)

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 e32acd2...1e29966. Read the comment docs.

@michael-s-molina
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

@michael-s-molina Ephemeral environment spinning up at http://54.218.248.133:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

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.

LGTM.

@rusackas
Copy link
Member

Looks like it works in testing!

@rusackas
Copy link
Member

It would probably be a good thing to revisit this one day to make things more aligned/consistent between frontend and backend and simplify some of this logic.

@rusackas rusackas merged commit f580f6b into apache:master Oct 20, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

henryyeh pushed a commit to preset-io/superset that referenced this pull request Oct 20, 2021
* Reconcile owners data

* Fix on save

(cherry picked from commit f580f6b)
@rosemarie-chiu
Copy link
Contributor

🏷 2021.40

sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Oct 22, 2021
* Reconcile owners data

* Fix on save

(cherry picked from commit f580f6b)
@eschutho eschutho added the v1.4 label Oct 26, 2021
eschutho pushed a commit to preset-io/superset that referenced this pull request Oct 27, 2021
* Reconcile owners data

* Fix on save

(cherry picked from commit f580f6b)
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
* Reconcile owners data

* Fix on save
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.0 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 preset:2021.40 size/S v1.4 🍒 1.4.0 🍒 1.4.1 🍒 1.4.2 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants