You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "giftig (via GitHub)" <gi...@apache.org> on 2023/06/19 11:36:47 UTC
[GitHub] [superset] giftig opened a new pull request, #24447: fix(charts): Fix chart load task error handling
giftig opened a new pull request, #24447:
URL: https://github.com/apache/superset/pull/24447
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
The exceptions raised within this task are given internationalised messages (flask-babel), which means when the task tries to serialise the exception message to mark the job as failed, it needs to make sure they're rendered first. Cast to str to make that happen.
The underlying issue was using lazy_gettext when just using gettext would make more sense, so I've also adjusted the import in a couple of obvious places directly impacting this task to fix it at both ends.
I've left in the str cast fix as it'd require a much deeper dive to determine if any other edge cases would still result in a lazy message given the complexity of the task.
### TESTING INSTRUCTIONS
See associated issue
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
Fixes #24446
- [x] Has associated issue: #24446
- [x] 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] giftig commented on pull request #24447: fix(charts): Fix chart load task error handling
Posted by "giftig (via GitHub)" <gi...@apache.org>.
giftig commented on PR #24447:
URL: https://github.com/apache/superset/pull/24447#issuecomment-1600413192
@john-bodley yeah I see there's currently no coverage of this task at all; I'll take a look at writing something simple to cover this.
--
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] giftig commented on pull request #24447: fix(charts): Fix chart load task error handling
Posted by "giftig (via GitHub)" <gi...@apache.org>.
giftig commented on PR #24447:
URL: https://github.com/apache/superset/pull/24447#issuecomment-1600556195
I've added a unit test covering the failure scenario specifically using `lazy_gettext` in the exception as that's a worst-case scenario, but it passes ok with `gettext` or a plain string too (I thought parametrize would be a bit excessive coverage here)
--
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 #24447: fix(charts): Fix chart load task error handling
Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro merged PR #24447:
URL: https://github.com/apache/superset/pull/24447
--
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 pull request #24447: fix(charts): Fix chart load task error handling
Posted by "john-bodley (via GitHub)" <gi...@apache.org>.
john-bodley commented on PR #24447:
URL: https://github.com/apache/superset/pull/24447#issuecomment-1599182276
Thanks @giftig. Would you mind adding a unit test as well? This helps both with reviewing the PR and ensures we don't regress in the future.
--
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 #24447: fix(charts): Fix chart load task error handling
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #24447:
URL: https://github.com/apache/superset/pull/24447#issuecomment-1597036052
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/24447?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#24447](https://app.codecov.io/gh/apache/superset/pull/24447?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (1142e9c) into [master](https://app.codecov.io/gh/apache/superset/commit/3e76736874f5a7b1ca35a9f3b13cbb4bc3791f69?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (3e76736) will **decrease** coverage by `10.91%`.
> The diff coverage is `66.66%`.
> :exclamation: Current head 1142e9c differs from pull request most recent head dff9107. Consider uploading reports for the commit dff9107 to get more accurate results
```diff
@@ Coverage Diff @@
## master #24447 +/- ##
===========================================
- Coverage 68.91% 58.01% -10.91%
===========================================
Files 1899 1899
Lines 73843 73843
Branches 8119 8119
===========================================
- Hits 50892 42840 -8052
- Misses 20840 28892 +8052
Partials 2111 2111
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `?` | |
| postgres | `?` | |
| presto | `53.81% <66.66%> (ø)` | |
| python | `60.57% <66.66%> (-22.75%)` | :arrow_down: |
| sqlite | `?` | |
| unit | `54.60% <66.66%> (ø)` | |
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/24447?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [superset/tasks/async\_queries.py](https://app.codecov.io/gh/apache/superset/pull/24447?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvdGFza3MvYXN5bmNfcXVlcmllcy5weQ==) | `29.33% <0.00%> (-61.34%)` | :arrow_down: |
| [superset/charts/data/commands/get\_data\_command.py](https://app.codecov.io/gh/apache/superset/pull/24447?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvY2hhcnRzL2RhdGEvY29tbWFuZHMvZ2V0X2RhdGFfY29tbWFuZC5weQ==) | `96.42% <100.00%> (-3.58%)` | :arrow_down: |
| [superset/common/query\_context\_processor.py](https://app.codecov.io/gh/apache/superset/pull/24447?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvY29tbW9uL3F1ZXJ5X2NvbnRleHRfcHJvY2Vzc29yLnB5) | `62.36% <100.00%> (-27.60%)` | :arrow_down: |
... and [296 files with indirect coverage changes](https://app.codecov.io/gh/apache/superset/pull/24447/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