You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sadpandajoe (via GitHub)" <gi...@apache.org> on 2026/09/25 08:21:53 UTC
[PR] fix(versioning): resolve nightly pre-commit (next) failures — mypy UUID-annotation regression and oxfmt version-drift formatting [superset]
sadpandajoe opened a new pull request, #44648:
URL: https://github.com/apache/superset/pull/44648
### SUMMARY
Two independent, unrelated regressions were both failing the nightly `pre-commit (next)` job on master (run https://github.com/apache/superset/actions/runs/36102701456/job/107968444184, commit 599026a0e5).
1. mypy (main): PR #44424 (commit f5d663c480d) fixed the previous 23-error `UUID | None`
signature by adding `assert x is not None` narrowing after each nullable `.uuid`/
`.description` read, but wrote the intermediate variable with an explicit `: UUID`
annotation, e.g. `created_uuid: UUID = created.uuid`. mypy flags the annotated
assignment itself — `.uuid` is `UUID | None` — before the following assert gets a
chance to narrow anything, producing 19 new errors across
tests/integration_tests/versioning/{creation_row_tests,conditional_token_lock_tests,
activity_write_after_read_tests,restore_fails_closed_tests}.py. This PR drops the
redundant annotation at each of the 19 sites, matching the idiom already established
and green in tests/integration_tests/charts/version_restore_tests.py
(`chart_uuid = chart.uuid` / `assert chart_uuid is not None`).
2. oxfmt (frontend): dependabot PR #44521 (commit c691d768d2) bumped oxfmt 0.67.0 ->
0.68.0 in package.json/package-lock.json only, with no accompanying repo-wide
`oxfmt --write` pass. VersionHistoryPanel.tsx (last touched by #44181, under 0.67
output) and setupApp.ts (last touched by #42434, the original Prettier -> Oxfmt
migration) were formatted under older oxfmt rules and fail 0.68.0's --check. This
PR reformats exactly those two files with the pinned oxfmt 0.68.0; the diff is pure
whitespace/line-wrap, no logic change.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
### TESTING INSTRUCTIONS
1. `pre-commit run mypy --files tests/integration_tests/versioning/creation_row_tests.py tests/integration_tests/versioning/conditional_token_lock_tests.py tests/integration_tests/versioning/activity_write_after_read_tests.py tests/integration_tests/versioning/restore_fails_closed_tests.py` — should report no `UUID`-assignment errors.
2. `pre-commit run oxfmt-frontend --files superset-frontend/src/features/versionHistory/VersionHistoryPanel.tsx superset-frontend/src/setup/setupApp.ts` — should pass with no modifications.
### ADDITIONAL INFORMATION
- [x] Has associated issue: Fixes #44646
- [ ] 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
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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] fix(versioning): resolve nightly pre-commit (next) failures — mypy UUID-annotation regression and oxfmt version-drift formatting [superset]
Posted by "hainenber (via GitHub)" <gi...@apache.org>.
hainenber merged PR #44648:
URL: https://github.com/apache/superset/pull/44648
--
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] fix(versioning): resolve nightly pre-commit (next) failures — mypy UUID-annotation regression and oxfmt version-drift formatting [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #44648:
URL: https://github.com/apache/superset/pull/44648#issuecomment-5829339569
<!-- Bito Reply -->
The flagged issue is correct. When `timeline` is empty, the `TruncationNotice` should not be displayed, even if `truncated` is true, as there is no content to truncate. To resolve this, you should ensure the condition explicitly checks that the timeline has content before showing the notice.
Here is the corrected logic for `superset-frontend/src/features/versionHistory/VersionHistoryPanel.tsx`:
```tsx
{!hasMore && truncated && timeline.length > 0 && (
// The server clips very long histories at a fetch ceiling; without
// saying so, the last loaded page reads as the beginning of time.
<TruncationNotice role="note">
{t('Older history exists but is beyond what can be shown here.')}
</TruncationNotice>
)}
```
This change ensures the notice only appears when there is actually data to display. There are no other comments on this PR to address.
**superset-frontend/src/features/versionHistory/VersionHistoryPanel.tsx**
```
{!hasMore && truncated && timeline.length > 0 && (
// The server clips very long histories at a fetch ceiling; without
// saying so, the last loaded page reads as the beginning of time.
<TruncationNotice role="note">
{t('Older history exists but is beyond what can be shown here.')}
</TruncationNotice>
)}
```
--
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] fix(versioning): resolve nightly pre-commit (next) failures — mypy UUID-annotation regression and oxfmt version-drift formatting [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 #44648:
URL: https://github.com/apache/superset/pull/44648#discussion_r4102673845
##########
superset-frontend/src/features/versionHistory/VersionHistoryPanel.tsx:
##########
@@ -335,15 +335,13 @@ export default function VersionHistoryPanel({
</Button>
</Footer>
)}
- {!hasMore &&
- truncated &&
- timeline.length > 0 && (
- // The server clips very long histories at a fetch ceiling; without
- // saying so, the last loaded page reads as the beginning of time.
- <TruncationNotice role="note">
- {t('Older history exists but is beyond what can be shown here.')}
- </TruncationNotice>
- )}
+ {!hasMore && truncated && timeline.length > 0 && (
Review Comment:
**Suggestion:** When server-side search or visibility filtering removes every fetched record, `truncated` can remain true while `timeline` is empty, hiding the notice and showing a misleading empty state.
**Assessment:** 🟠 `Major` · 🔁 `Occurrence: Sometimes` · 🏷️ `Incorrect condition logic`
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill) [](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=11da0ce22d914823b3589661fbfd5b16&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=11da0ce22d914823b3589661fbfd5b16&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-frontend/src/features/versionHistory/VersionHistoryPanel.tsx
**Line:** 338:338
**Comment:**
*Incorrect Condition Logic: When server-side search or visibility filtering removes every fetched record, `truncated` can remain true while `timeline` is empty, hiding the notice and showing a misleading empty state.
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%2F44648&comment_hash=ce273183a8f3fe075c3396c8a78cb9925e05e536cbd25fe0fe747121886427d8&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44648&comment_hash=ce273183a8f3fe075c3396c8a78cb9925e05e536cbd25fe0fe747121886427d8&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] fix(versioning): resolve nightly pre-commit (next) failures — mypy UUID-annotation regression and oxfmt version-drift formatting [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on code in PR #44648:
URL: https://github.com/apache/superset/pull/44648#discussion_r4102751694
##########
tests/integration_tests/versioning/creation_row_tests.py:
##########
@@ -142,7 +141,7 @@ def test_mixed_create_and_edit_keeps_internal_provenance_private(self) -> None:
for record in records
)
assert all(record["action_kind"] is None for record in records)
- created_uuid: UUID = created.uuid
+ created_uuid = created.uuid
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Missing local type annotations</b></div>
<div id="fix">
Removing `from uuid import UUID` and the `: UUID` annotations on the eight `*_uuid` locals (lines 144, 170, 196, 226, 254, 274, 303, 316) drops explicit annotations from test locals, against BITO adaptive rules 13153/13598. Runtime is unaffected (PEP 526 local annotations are not evaluated), but please re-annotate, e.g. `slc_uuid: UUID | None = slc.uuid`, so the following `is not None` assert narrows for `get_activity`. ([CWE-none](https://cwe.mitre.org))
</div>
</div>
<small><i>Code Review Run #49711f</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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] fix(versioning): resolve nightly pre-commit (next) failures — mypy UUID-annotation regression and oxfmt version-drift formatting [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #44648:
URL: https://github.com/apache/superset/pull/44648#issuecomment-5829275410
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] fix(versioning): resolve nightly pre-commit (next) failures — mypy UUID-annotation regression and oxfmt version-drift formatting [superset]
Posted by "hainenber (via GitHub)" <gi...@apache.org>.
hainenber commented on PR #44648:
URL: https://github.com/apache/superset/pull/44648#issuecomment-5848093448
Seems like minor version update in `oxc` toolings needs to have a proper project-wide rerun. It's blazingly fast so shouldn't take much time. I wonder if we can restore the pre-commit CI back to all files in the past to help catching these strays even faster. @rusackas wdyt?
--
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] fix(versioning): resolve nightly pre-commit (next) failures — mypy UUID-annotation regression and oxfmt version-drift formatting [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #44648:
URL: https://github.com/apache/superset/pull/44648#issuecomment-5829341921
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/44648?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 57.14%. Comparing base ([`599026a`](https://app.codecov.io/gh/apache/superset/commit/599026a0e5a82f9728a333aea0e07b6a7bf8f771?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`7b4b93e`](https://app.codecov.io/gh/apache/superset/commit/7b4b93e5d8bae58dc289fae3204d7eee5b7b6169?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
> :exclamation: There is a different number of reports uploaded between BASE (599026a) and HEAD (7b4b93e). Click for more details.
>
> <details><summary>HEAD has 116 uploads less than BASE</summary>
>
>| Flag | BASE (599026a) | HEAD (7b4b93e) |
>|------|------|------|
>|python|90|2|
>|presto|15|1|
>|hive|15|1|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #44648 +/- ##
===========================================
- Coverage 81.10% 57.14% -23.96%
===========================================
Files 2955 2955
Lines 178385 178375 -10
Branches 41336 41332 -4
===========================================
- Hits 144680 101937 -42743
- Misses 30996 75455 +44459
+ Partials 2709 983 -1726
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/44648/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [hive](https://app.codecov.io/gh/apache/superset/pull/44648/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `36.80% <ø> (ø)` | |
| [mysql](https://app.codecov.io/gh/apache/superset/pull/44648/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [postgres](https://app.codecov.io/gh/apache/superset/pull/44648/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [presto](https://app.codecov.io/gh/apache/superset/pull/44648/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `38.70% <ø> (ø)` | |
| [python](https://app.codecov.io/gh/apache/superset/pull/44648/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `38.75% <ø> (-46.64%)` | :arrow_down: |
| [sqlite](https://app.codecov.io/gh/apache/superset/pull/44648/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unit](https://app.codecov.io/gh/apache/superset/pull/44648/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
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/44648?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