You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "john-bodley (via GitHub)" <gi...@apache.org> on 2023/05/24 20:05:21 UTC
[GitHub] [superset] john-bodley opened a new pull request, #24206: chore(native-filters): Ensure consistent error handling
john-bodley opened a new pull request, #24206:
URL: https://github.com/apache/superset/pull/24206
<!---
Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
Example:
fix(dashboard): load charts correctly
-->
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### 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] michael-s-molina commented on a diff in pull request #24206: chore(native-filters): Ensure consistent error handling
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on code in PR #24206:
URL: https://github.com/apache/superset/pull/24206#discussion_r1205760572
##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx:
##########
@@ -187,13 +188,10 @@ const FilterValue: React.FC<FilterControlProps> = ({
handleFilterLoadFinish();
})
.catch((error: Response) => {
- getClientErrorObject(error).then(parsedError => {
- errorRef.current = error.errors?.[0];
+ getClientErrorObject(error).then(clientErrorObject => {
+ setError(clientErrorObject);
+ handleFilterLoadFinish();
});
- setError(
- error.message || error.error || t('Check configuration'),
Review Comment:
Looking at `getClientErrorObject` implementation, an error is always returned and it deals with the generic case as well. In my opinion it offers a more standard treatment to the exceptions.
--
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] john-bodley merged pull request #24206: chore(native-filters): Ensure consistent error handling
Posted by "john-bodley (via GitHub)" <gi...@apache.org>.
john-bodley merged PR #24206:
URL: https://github.com/apache/superset/pull/24206
--
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] michael-s-molina commented on a diff in pull request #24206: chore(native-filters): Ensure consistent error handling
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on code in PR #24206:
URL: https://github.com/apache/superset/pull/24206#discussion_r1205760572
##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx:
##########
@@ -187,13 +188,10 @@ const FilterValue: React.FC<FilterControlProps> = ({
handleFilterLoadFinish();
})
.catch((error: Response) => {
- getClientErrorObject(error).then(parsedError => {
- errorRef.current = error.errors?.[0];
+ getClientErrorObject(error).then(clientErrorObject => {
+ setError(clientErrorObject);
+ handleFilterLoadFinish();
});
- setError(
- error.message || error.error || t('Check configuration'),
Review Comment:
Looking at `getClientErrorObject` implementation, and error is always returned and it deals with the generic case as well. In my opinion it offers a more standard treatment to the exceptions.
--
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] john-bodley commented on a diff in pull request #24206: chore(native-filters): Ensure consistent error handling
Posted by "john-bodley (via GitHub)" <gi...@apache.org>.
john-bodley commented on code in PR #24206:
URL: https://github.com/apache/superset/pull/24206#discussion_r1205739303
##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx:
##########
@@ -187,13 +188,10 @@ const FilterValue: React.FC<FilterControlProps> = ({
handleFilterLoadFinish();
})
.catch((error: Response) => {
- getClientErrorObject(error).then(parsedError => {
- errorRef.current = error.errors?.[0];
+ getClientErrorObject(error).then(clientErrorObject => {
+ setError(clientErrorObject);
+ handleFilterLoadFinish();
});
- setError(
- error.message || error.error || t('Check configuration'),
Review Comment:
@michael-s-molina do we not need to preserve this messaging?
##########
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx:
##########
@@ -511,15 +511,8 @@ const FiltersConfigForm = (
});
})
.catch((error: Response) => {
- getClientErrorObject(error).then(parsedError => {
- errorRef.current = parsedError.errors?.[0];
- });
- error.json().then(body => {
Review Comment:
Similar to the previous question.
--
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 #24206: chore(native-filters): Ensure consistent error handling
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #24206:
URL: https://github.com/apache/superset/pull/24206#issuecomment-1563160072
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/24206?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#24206](https://app.codecov.io/gh/apache/superset/pull/24206?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (93b2ea8) into [master](https://app.codecov.io/gh/apache/superset/commit/2222073778b0cee193f34c2500f2c489bb2a4bbe?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (2222073) will **decrease** coverage by `0.11%`.
> The diff coverage is `73.31%`.
> :exclamation: Current head 93b2ea8 differs from pull request most recent head 18749a3. Consider uploading reports for the commit 18749a3 to get more accurate results
```diff
@@ Coverage Diff @@
## master #24206 +/- ##
==========================================
- Coverage 68.30% 68.19% -0.11%
==========================================
Files 1952 1957 +5
Lines 75432 75592 +160
Branches 8191 8221 +30
==========================================
+ Hits 51521 51553 +32
- Misses 21807 21932 +125
- Partials 2104 2107 +3
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| javascript | `54.72% <51.03%> (+0.02%)` | :arrow_up: |
| sqlite | `?` | |
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/24206?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...i-core/src/color/colorSchemes/sequential/common.ts](https://app.codecov.io/gh/apache/superset/pull/24206?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvY29sb3IvY29sb3JTY2hlbWVzL3NlcXVlbnRpYWwvY29tbW9uLnRz) | `100.00% <ø> (ø)` | |
| [...set-ui-core/src/ui-overrides/ExtensionsRegistry.ts](https://app.codecov.io/gh/apache/superset/pull/24206?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvdWktb3ZlcnJpZGVzL0V4dGVuc2lvbnNSZWdpc3RyeS50cw==) | `100.00% <ø> (ø)` | |
| [...ackages/superset-ui-core/src/utils/featureFlags.ts](https://app.codecov.io/gh/apache/superset/pull/24206?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvdXRpbHMvZmVhdHVyZUZsYWdzLnRz) | `100.00% <ø> (ø)` | |
| [...plugins/legacy-preset-chart-deckgl/src/factory.tsx](https://app.codecov.io/gh/apache/superset/pull/24206?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LWRlY2tnbC9zcmMvZmFjdG9yeS50c3g=) | `0.00% <ø> (ø)` | |
| [...preset-chart-deckgl/src/layers/Heatmap/Heatmap.tsx](https://app.codecov.io/gh/apache/superset/pull/24206?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LWRlY2tnbC9zcmMvbGF5ZXJzL0hlYXRtYXAvSGVhdG1hcC50c3g=) | `0.00% <0.00%> (ø)` | |
| [...d/plugins/legacy-preset-chart-deckgl/src/preset.js](https://app.codecov.io/gh/apache/superset/pull/24206?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LWRlY2tnbC9zcmMvcHJlc2V0Lmpz) | `100.00% <ø> (ø)` | |
| [superset-frontend/src/SqlLab/actions/sqlLab.js](https://app.codecov.io/gh/apache/superset/pull/24206?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9hY3Rpb25zL3NxbExhYi5qcw==) | `66.66% <ø> (+0.25%)` | :arrow_up: |
| [...d/src/SqlLab/components/SqlEditorLeftBar/index.tsx](https://app.codecov.io/gh/apache/superset/pull/24206?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL1NxbEVkaXRvckxlZnRCYXIvaW5kZXgudHN4) | `62.12% <ø> (+0.92%)` | :arrow_up: |
| [superset-frontend/src/SqlLab/fixtures.ts](https://app.codecov.io/gh/apache/superset/pull/24206?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9maXh0dXJlcy50cw==) | `100.00% <ø> (ø)` | |
| [...et-frontend/src/SqlLab/reducers/getInitialState.js](https://app.codecov.io/gh/apache/superset/pull/24206?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9yZWR1Y2Vycy9nZXRJbml0aWFsU3RhdGUuanM=) | `90.62% <ø> (ø)` | |
| ... and [124 more](https://app.codecov.io/gh/apache/superset/pull/24206?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | |
... and [8 files with indirect coverage changes](https://app.codecov.io/gh/apache/superset/pull/24206/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