You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "villebro (via GitHub)" <gi...@apache.org> on 2023/06/16 10:14:58 UTC

[GitHub] [superset] villebro opened a new pull request, #24422: fix(sql-lab): remove redundant onChange schema property

villebro opened a new pull request, #24422:
URL: https://github.com/apache/superset/pull/24422

   ### SUMMARY
   While creating a Java Client from the the Superset OpenAPI spec with the OpenAPI codegen, a collision between the `changedOn` and `changed_on` properties in the SQL Lab `QueryRestultSchema` caused an error. This happened because it automatically converts the snake_case property to a camelCase one. This type of overlap doesn't exist in other schemas. Checking the other schemas, all the other ones are of type `fields.DateTime`, except `SliceSchema` and `ChartEntityResponseSchema`, which were `fields.String`. For this reason, the redundant `changedOn` property was removed, and the type of `changed_on` was updated to `DateTime` for `QueryResultSchema`, `SliceSchema` and `ChartEntityResponseSchema`.
   
   Furthermore, when looking at the Redux code, I noticed inconsistencies in the test fixtures + the reducer:
   - The `SouthPane` test didn't have `changed_on` in the fixture, only `changedOn`. Furthermore, the type was wrong - the fixture had an epoch, while the value is in fact an ISO8601 string (see screenshot).  These were updated.
   - The `SqlLab` fixture also showed the `changedOn` property as an epoch. However, the `changed_on` property there was in correct format, i.e. ISO-8601 string. To comply with the updated schema, `changedOn` was removed.
   - the SQL Lab reducer was comparing the ISO-8601 string value of `changedOn` with an epoch-valued `queriesLastUpdate`. I'm not sure what kind of results that resulted in, but to fix this, we now refer to `changed_on`, and convert it to epoch format first before doing the comparison.
   
   ### SCREENSHOTS
   Currently on master, the values of `changedOn` and `changed_on` are identical in the query response:
   ![image](https://github.com/apache/superset/assets/33317356/ba5df2b0-bb96-4f48-8df0-869f642f86c1)
   
   Notice how `queriesLastUpdate` is an epoch, but `changedOn` which it's being compared to in the reducer is an ISO-8601 string?
   ![image](https://github.com/apache/superset/assets/33317356/5ed2943a-b211-4fc9-91cf-65a0451cc829)
   ![image](https://github.com/apache/superset/assets/33317356/0713b926-364b-4578-9860-f4919e58e7bf)
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] 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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro merged pull request #24422: fix(sql-lab): remove redundant onChange schema property

Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro merged PR #24422:
URL: https://github.com/apache/superset/pull/24422


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] commented on pull request #24422: fix(sql-lab): remove redundant onChange schema property

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #24422:
URL: https://github.com/apache/superset/pull/24422#issuecomment-1594459805

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/24422?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#24422](https://app.codecov.io/gh/apache/superset/pull/24422?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (fb33688) into [master](https://app.codecov.io/gh/apache/superset/commit/d2b0b8eac52ad8b68639c6581a1ed174a593f564?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (d2b0b8e) will **decrease** coverage by `10.95%`.
   > The diff coverage is `73.68%`.
   
   > :exclamation: Current head fb33688 differs from pull request most recent head d89fa08. Consider uploading reports for the commit d89fa08 to get more accurate results
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #24422       +/-   ##
   ===========================================
   - Coverage   68.96%   58.02%   -10.95%     
   ===========================================
     Files        1904     1904               
     Lines       74088    73917      -171     
     Branches     8120     8119        -1     
   ===========================================
   - Hits        51096    42891     -8205     
   - Misses      20880    28915     +8035     
   + Partials     2112     2111        -1     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `?` | |
   | mysql | `?` | |
   | postgres | `?` | |
   | presto | `53.84% <70.58%> (+0.05%)` | :arrow_up: |
   | python | `60.58% <70.58%> (-22.73%)` | :arrow_down: |
   | sqlite | `?` | |
   | unit | `54.62% <70.58%> (+0.06%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://app.codecov.io/gh/apache/superset/pull/24422?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...ackages/superset-ui-core/src/utils/featureFlags.ts](https://app.codecov.io/gh/apache/superset/pull/24422?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvdXRpbHMvZmVhdHVyZUZsYWdzLnRz) | `100.00% <ø> (ø)` | |
   | [superset-frontend/src/SqlLab/fixtures.ts](https://app.codecov.io/gh/apache/superset/pull/24422?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9maXh0dXJlcy50cw==) | `100.00% <ø> (ø)` | |
   | [superset-frontend/src/SqlLab/reducers/sqlLab.js](https://app.codecov.io/gh/apache/superset/pull/24422?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9yZWR1Y2Vycy9zcWxMYWIuanM=) | `41.66% <ø> (+0.49%)` | :arrow_up: |
   | [...end/src/dashboard/components/SliceHeader/index.tsx](https://app.codecov.io/gh/apache/superset/pull/24422?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NsaWNlSGVhZGVyL2luZGV4LnRzeA==) | `90.56% <ø> (ø)` | |
   | [superset-frontend/src/pages/DatasetList/index.tsx](https://app.codecov.io/gh/apache/superset/pull/24422?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3BhZ2VzL0RhdGFzZXRMaXN0L2luZGV4LnRzeA==) | `57.76% <ø> (ø)` | |
   | [...rset-frontend/src/profile/components/Favorites.tsx](https://app.codecov.io/gh/apache/superset/pull/24422?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Byb2ZpbGUvY29tcG9uZW50cy9GYXZvcml0ZXMudHN4) | `80.00% <ø> (ø)` | |
   | [superset/charts/api.py](https://app.codecov.io/gh/apache/superset/pull/24422?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvY2hhcnRzL2FwaS5weQ==) | `51.02% <ø> (-36.06%)` | :arrow_down: |
   | [superset/config.py](https://app.codecov.io/gh/apache/superset/pull/24422?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvY29uZmlnLnB5) | `91.40% <ø> (-0.58%)` | :arrow_down: |
   | [superset/connectors/sqla/models.py](https://app.codecov.io/gh/apache/superset/pull/24422?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `74.85% <ø> (-15.59%)` | :arrow_down: |
   | [superset/dashboards/api.py](https://app.codecov.io/gh/apache/superset/pull/24422?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9hcGkucHk=) | `51.40% <ø> (-41.18%)` | :arrow_down: |
   | ... and [18 more](https://app.codecov.io/gh/apache/superset/pull/24422?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | |
   
   ... and [287 files with indirect coverage changes](https://app.codecov.io/gh/apache/superset/pull/24422/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org