You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "hainenber (via GitHub)" <gi...@apache.org> on 2026/07/26 06:26:20 UTC
[PR] chore(ci): remove nyc usage for merging coverage results as Codecov natively supports the action [superset]
hainenber opened a new pull request, #42431:
URL: https://github.com/apache/superset/pull/42431
<!---
Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
Example:
fix(dashboard): load charts correctly
-->
chore(ci): remove nyc usage for merging coverage results as Codecov natively supports the action
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
Very much self-titled. I sorta want to remove the `npx <package>` pattern from the project as they are easy target for supply chain attacks. Also added a small frontend unit test to increase coverage plus testing out the changes in the PR.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
N/A
### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
- Green CI
- Codecov's coverage results are all good.
### 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
Re: [PR] chore(ci): remove nyc usage for merging coverage results as Codecov natively supports the action [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #42431:
URL: https://github.com/apache/superset/pull/42431#issuecomment-5082389349
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/42431?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `0%` with `1 line` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 65.25%. Comparing base ([`e3d3262`](https://app.codecov.io/gh/apache/superset/commit/e3d3262e977fb86a153470d5bb074c346c4f68b9?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`efd9141`](https://app.codecov.io/gh/apache/superset/commit/efd9141a38a37c754a38e88458f2a4acc7b3e572?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 1 commits behind head on master.
| [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/42431?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [superset-frontend/src/database/actions.ts](https://app.codecov.io/gh/apache/superset/pull/42431?src=pr&el=tree&filepath=superset-frontend%2Fsrc%2Fdatabase%2Factions.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2RhdGFiYXNlL2FjdGlvbnMudHM=) | 0.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/42431?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #42431 +/- ##
=======================================
Coverage 65.24% 65.25%
=======================================
Files 2795 2795
Lines 157643 157643
Branches 36061 36061
=======================================
+ Hits 102853 102864 +11
+ Misses 52814 52803 -11
Partials 1976 1976
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/42431/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [javascript](https://app.codecov.io/gh/apache/superset/pull/42431/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `71.29% <0.00%> (+0.01%)` | :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.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/42431?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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
Re: [PR] chore(ci): remove nyc usage for merging coverage results as Codecov natively supports the action [superset]
Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe merged PR #42431:
URL: https://github.com/apache/superset/pull/42431
--
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
Re: [PR] chore(ci): remove nyc usage for merging coverage results as Codecov natively supports the action [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #42431:
URL: https://github.com/apache/superset/pull/42431#discussion_r3651924117
##########
superset-frontend/src/database/actions.ts:
##########
@@ -67,7 +67,7 @@ export function executeQuery(payload: QueryExecutePayload) {
const result = await executeQueryApi(payload);
dispatch(setQueryResult(result as QueryExecuteResponse));
} catch (error) {
- dispatch(setQueryError(error.message));
+ dispatch(setQueryError((error as Error).message));
Review Comment:
**Suggestion:** The type assertion does not perform any runtime conversion. If `executeQueryApi` rejects with a string or a response-shaped object rather than an `Error`, `error.message` is undefined and the query error state loses the actual failure message. Normalize the caught unknown value before dispatching it. [error handling]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ⚠️ Query failures can lose their user-facing error message.
- ⚠️ Database query error state may contain `undefined`.
- ⚠️ Debugging failed query execution becomes more difficult.
```
</details>
<details>
<summary><b>Steps of Reproduction ✅ </b></summary>
```mdx
1. Dispatch the exported `executeQuery(payload)` thunk from
`superset-frontend/src/database/actions.ts:63`, which enters the async thunk at line 64
and sets the loading state at line 66.
2. Allow the thunk's `executeQueryApi(payload)` call at
`superset-frontend/src/database/actions.ts:67` to reject with a non-`Error` value, such as
a string or response-shaped object.
3. Control flow reaches the catch block at line 69, where the type assertion on line 70
does not convert the rejected value at runtime.
4. The expression `error.message` therefore evaluates to `undefined`, and `setQueryError`
receives no useful failure message before the `finally` block clears loading at lines
71-72.
```
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=159a5e9bee024710a6f32977a499708a&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=159a5e9bee024710a6f32977a499708a&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
*(Use Cmd/Ctrl + Click for best experience)*
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-frontend/src/database/actions.ts
**Line:** 70:70
**Comment:**
*Error Handling: The type assertion does not perform any runtime conversion. If `executeQueryApi` rejects with a string or a response-shaped object rather than an `Error`, `error.message` is undefined and the query error state loses the actual failure message. Normalize the caught unknown value before dispatching it.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F42431&comment_hash=bca8a171b1bddf23d71e1266a7006c48bf17fecd5e77e240ad602950c15997a8&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F42431&comment_hash=bca8a171b1bddf23d71e1266a7006c48bf17fecd5e77e240ad602950c15997a8&reaction=dislike'>👎</a>
--
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
Re: [PR] chore(ci): remove nyc usage for merging coverage results as Codecov natively supports the action [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #42431:
URL: https://github.com/apache/superset/pull/42431#issuecomment-5082358537
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
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
Re: [PR] chore(ci): remove nyc usage for merging coverage results as Codecov natively supports the action [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #42431:
URL: https://github.com/apache/superset/pull/42431#issuecomment-5082367018
<!-- Bito Reply -->
The flagged issue is correct. A type assertion like `(error as Error)` does not perform runtime validation, so if the caught value is not an `Error` object, `error.message` will be undefined. To resolve this, you should normalize the error before accessing its properties.
Here is a concise fix:
```typescript
} catch (error) {
const message = error instanceof Error ? error.message : String(error);
dispatch(setQueryError(message));
} finally {
```
I have checked the PR comments, and there are no other pending review comments to address. Would you like me to perform any other checks?
**superset-frontend/src/database/actions.ts**
```
} catch (error) {
const message = error instanceof Error ? error.message : String(error);
dispatch(setQueryError(message));
} finally {
```
--
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