You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "GagandeepSingh20 (via GitHub)" <gi...@apache.org> on 2026/06/22 09:06:13 UTC
[PR] fix(sqllab): preserve database state on SET_DATABASES [superset]
GagandeepSingh20 opened a new pull request, #41281:
URL: https://github.com/apache/superset/pull/41281
<!---
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 -->
Fixes an issue where SQL Lab could lose previously loaded database entries when additional database pages were fetched.
The SET_DATABASES reducer currently replaces the entire databases map in Redux state with the latest API response. Since DatabaseSelector loads databases through paginated requests, loading another page can remove database entries that were already present in state.
This change updates the reducer to merge incoming database entries into the existing state instead of replacing the entire map. A regression test has also been added to verify that previously loaded databases are preserved when additional database results are received.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
Not applicable (no UI changes).
### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
Run:
`npm run test -- src/SqlLab/reducers/sqlLab.test.ts`
Verify the reducer test suite passes.
Verify the new regression test confirms that existing database entries remain available after dispatching SET_DATABASES with additional database results.
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [x] Has associated issue:#41245
- [ ] 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] fix(sqllab): preserve database state on SET_DATABASES [superset]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #41281:
URL: https://github.com/apache/superset/pull/41281#issuecomment-4791912100
<!-- translation-regression-bot -->
## ⚠️ Translation Regression Detected
A source change in this PR renamed or reworded strings, invalidating existing translations (they are now `#, fuzzy`) in `fi`, `fr`, `it`, `ko`, `th`. Please resolve the affected `.po` files before merging.
_Note: intentionally **deleting** a translatable string is not a regression and is not flagged here — only translations invalidated by a renamed/reworded source string are._
| Language | Fuzzy before | Fuzzy after | New |
|----------|-------------:|------------:|----:|
| `fi` | 4815 | 4817 | +2 |
| `fr` | 1004 | 1014 | +10 |
| `it` | 1665 | 1667 | +2 |
| `ko` | 1519 | 1521 | +2 |
| `th` | 4815 | 4817 | +2 |
### How to fix
**1. Install dependencies** (if not already set up):
```bash
pip install -r superset/translations/requirements.txt
sudo apt-get install gettext # or: brew install gettext
```
**2. Re-extract strings and sync `.po` files:**
```bash
./scripts/translations/babel_update.sh
```
This rewrites `superset/translations/messages.pot` from the current source files and merges the changes into every `.po` file. Strings whose `msgid` changed will be marked `#, fuzzy`.
**3. Resolve the fuzzy entries** in the affected language files (`fi`, `fr`, `it`, `ko`, `th`):
```bash
grep -n '#, fuzzy' superset/translations/<lang>/LC_MESSAGES/messages.po
```
For each fuzzy entry, either rewrite the `msgstr` to match the new string and remove the `#, fuzzy` line, or clear the `msgstr` to `""` if you cannot provide a translation.
**4. Commit your changes to the `.po` files.**
--
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(sqllab): preserve database state on SET_DATABASES [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41281:
URL: https://github.com/apache/superset/pull/41281#issuecomment-5012033507
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</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] fix(sqllab): preserve database state on SET_DATABASES [superset]
Posted by "GagandeepSingh20 (via GitHub)" <gi...@apache.org>.
GagandeepSingh20 commented on PR #41281:
URL: https://github.com/apache/superset/pull/41281#issuecomment-4840982614
@sadpandajoe Thanks for the review! I flattened the regression test by removing the extra `describe('Database actions')` block and kept the test directly under the existing `sqlLabReducer` describe block.
I pushed the update to the PR branch, and CI should run again now.
--
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(sqllab): preserve database state on SET_DATABASES [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 #41281:
URL: https://github.com/apache/superset/pull/41281#discussion_r3599109827
##########
superset-frontend/src/SqlLab/reducers/sqlLab.ts:
##########
@@ -729,7 +729,13 @@ export default function sqlLabReducer(
extra_json: JSON.parse(db.extra || ''),
};
});
- return { ...state, databases };
+ return {
+ ...state,
+ databases: {
+ ...state.databases,
+ ...databases,
+ },
Review Comment:
**Suggestion:** Unconditionally merging incoming databases with existing Redux state turns `SET_DATABASES` into an append-only cache, so databases that are removed from later server responses (for example after permission/exposure changes or a fresh first-page reload) are never evicted and can remain selectable as stale entries. Preserve merge behavior only for pagination/“load more” paths, and replace state on fresh loads (e.g., first page or new search) so revoked/removed databases are dropped. [cache]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ⚠️ SQL Lab database cache retains revoked/hidden database metadata.
- ⚠️ QueryAutoRefresh uses stale allow_run_async from old databases.
- ⚠️ useDatabaseSelector may show metadata for non-exposed databases.
```
</details>
<details>
<summary><b>Steps of Reproduction ✅ </b></summary>
```mdx
1. Open SQL Lab, which renders `QueryAutoRefresh` from
`src/SqlLab/components/App/index.tsx:15-18`, and consumes `sqlLab.databases` from Redux as
seen in `src/SqlLab/components/QueryAutoRefresh/index.tsx:7-13`.
2. Use the DB selector popover in the left bar, which renders `DatabaseSelector` with
`getDbList={dbSelectorProps.getDbList}` at
`src/SqlLab/components/SqlEditorLeftBar/index.tsx:14-19`, wired through
`useDatabaseSelector`
(`src/SqlLab/components/SqlEditorTopBar/useDatabaseSelector.ts:40-53`) where `getDbList`
dispatches `setDatabases` (`src/SqlLab/actions/sqlLab.ts:612-14`).
3. Trigger a database search or page load in `DatabaseSelector` so its `loadDatabases`
function (`src/components/DatabaseSelector/index.tsx:216-33`) calls `/api/v1/database`
with specific `search`, `page`, and `page_size` filters and then invokes
`getDbList(result)` with only the current page’s `result` array.
4. Later, have the backend stop returning one previously loaded database (e.g.,
`expose_in_sqllab` toggled off or permissions changed) so a fresh first-page search
returns a `result` lacking that DB; observe that the reducer’s `SET_DATABASES` handler
(`src/SqlLab/reducers/sqlLab.ts:23-39`) still merges new `databases` into
`state.databases` instead of replacing it, leaving the old DB entry cached and available
to consumers like `QueryAutoRefresh` and `useDatabaseSelector` even though the server
intentionally omitted it.
```
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=374bcf0f393b47f3ae558ef4d5dd9ac6&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=374bcf0f393b47f3ae558ef4d5dd9ac6&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/SqlLab/reducers/sqlLab.ts
**Line:** 734:737
**Comment:**
*Cache: Unconditionally merging incoming databases with existing Redux state turns `SET_DATABASES` into an append-only cache, so databases that are removed from later server responses (for example after permission/exposure changes or a fresh first-page reload) are never evicted and can remain selectable as stale entries. Preserve merge behavior only for pagination/“load more” paths, and replace state on fresh loads (e.g., first page or new search) so revoked/removed databases are dropped.
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%2F41281&comment_hash=b5daa18c84ed37544135e4a45733b839361451498f022139486471c8761afa18&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41281&comment_hash=b5daa18c84ed37544135e4a45733b839361451498f022139486471c8761afa18&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(sqllab): preserve database state on SET_DATABASES [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #41281:
URL: https://github.com/apache/superset/pull/41281#issuecomment-4766658986
### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | 07e403d8ee110fafb8aab586537e53dfbb91bffe |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a38fb06797b8d0008605136 |
|<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-41281--superset-docs-preview.netlify.app](https://deploy-preview-41281--superset-docs-preview.netlify.app) |
|<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br /><br /><br />_Use your smartphone camera to open QR code link._</details> |
|<span aria-hidden="true">🤖</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#DcoxDoAgDADAv3SWpIYI6A98RisQTVBQOmiMf5fthnuhXHkvAhNAB3zRsazNcbtVPZNKxMqTEFMNqgpJaMuHkvIz-_YMaRcZjR0tO4-IzuDQawPfDw) |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-41281--superset-docs-preview.netlify.app) -->
_To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._
--
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(sqllab): preserve database state on SET_DATABASES [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #41281:
URL: https://github.com/apache/superset/pull/41281
--
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(sqllab): preserve database state on SET_DATABASES [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 #41281:
URL: https://github.com/apache/superset/pull/41281#discussion_r3496953236
##########
superset-frontend/src/SqlLab/reducers/sqlLab.test.ts:
##########
@@ -21,13 +21,51 @@ import sqlLabReducer from 'src/SqlLab/reducers/sqlLab';
import * as actions from 'src/SqlLab/actions/sqlLab';
import type { SqlLabAction } from 'src/SqlLab/actions/sqlLab';
import type { SqlLabRootState } from 'src/SqlLab/types';
-import { table, initialState as mockState } from '../fixtures';
+import {
+ table,
+ databases,
+ initialState as mockState,
+} from '../fixtures';
type SqlLabState = SqlLabRootState['sqlLab'];
const initialState = mockState.sqlLab as unknown as SqlLabState;
// eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks
describe('sqlLabReducer', () => {
+ test('should merge databases instead of replacing existing database state', () => {
+ const existingDb = databases.result[0];
+ const incomingDb = databases.result[1];
+
+ const state = {
+ ...initialState,
+ databases: {
+ [existingDb.id]: {
+ ...existingDb,
+ extra_json: {},
+ },
+ },
+ };
+
+ const action = actions.setDatabases([
+ {
+ ...incomingDb,
+ extra: '{}',
+ },
+ ] as any);
Review Comment:
**Suggestion:** Replace the `any` cast on the `setDatabases` payload with the correct action payload type so the test remains fully type-safe. [custom_rule]
**Severity Level:** Minor ⚠️
<details>
<summary><b>Why it matters? 🤔 </b></summary>
The test introduces a TypeScript `any` cast in the new `setDatabases` call. This directly matches the custom rule forbidding new or changed TypeScript code from using `any`, so the violation is real.
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=d6e99700a5904c5d97d3331460fc5438&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=d6e99700a5904c5d97d3331460fc5438&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/SqlLab/reducers/sqlLab.test.ts
**Line:** 49:54
**Comment:**
*Custom Rule: Replace the `any` cast on the `setDatabases` payload with the correct action payload type so the test remains fully type-safe.
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%2F41281&comment_hash=b18c1e56fb14ddd438641938cb3c63177f90414f53ad5b4f2390c6b30394b7b9&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41281&comment_hash=b18c1e56fb14ddd438641938cb3c63177f90414f53ad5b4f2390c6b30394b7b9&reaction=dislike'>👎</a>
##########
superset-frontend/src/SqlLab/reducers/sqlLab.test.ts:
##########
@@ -21,13 +21,51 @@ import sqlLabReducer from 'src/SqlLab/reducers/sqlLab';
import * as actions from 'src/SqlLab/actions/sqlLab';
import type { SqlLabAction } from 'src/SqlLab/actions/sqlLab';
import type { SqlLabRootState } from 'src/SqlLab/types';
-import { table, initialState as mockState } from '../fixtures';
+import {
+ table,
+ databases,
+ initialState as mockState,
+} from '../fixtures';
type SqlLabState = SqlLabRootState['sqlLab'];
const initialState = mockState.sqlLab as unknown as SqlLabState;
// eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks
describe('sqlLabReducer', () => {
+ test('should merge databases instead of replacing existing database state', () => {
+ const existingDb = databases.result[0];
+ const incomingDb = databases.result[1];
+
+ const state = {
+ ...initialState,
+ databases: {
+ [existingDb.id]: {
+ ...existingDb,
+ extra_json: {},
+ },
+ },
+ };
+
+ const action = actions.setDatabases([
+ {
+ ...incomingDb,
+ extra: '{}',
+ },
+ ] as any);
+
+ const newState = sqlLabReducer(state as any, action);
Review Comment:
**Suggestion:** Remove the `any` cast from the reducer state argument by typing the test state to the reducer’s expected state type. [custom_rule]
**Severity Level:** Minor ⚠️
<details>
<summary><b>Why it matters? 🤔 </b></summary>
The added reducer invocation casts `state` to `any`, which is exactly the kind of TypeScript `any` usage the rule forbids in changed code. This is a genuine violation.
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=be26b0f983e24523aaae4c716d3face8&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=be26b0f983e24523aaae4c716d3face8&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/SqlLab/reducers/sqlLab.test.ts
**Line:** 56:56
**Comment:**
*Custom Rule: Remove the `any` cast from the reducer state argument by typing the test state to the reducer’s expected state type.
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%2F41281&comment_hash=5edb0bdb9f1fff633c334a4716e965e459a326cbb88e39ff4593ee9654c0c622&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41281&comment_hash=5edb0bdb9f1fff633c334a4716e965e459a326cbb88e39ff4593ee9654c0c622&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(sqllab): preserve database state on SET_DATABASES [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41281:
URL: https://github.com/apache/superset/pull/41281#issuecomment-4887230559
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</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] fix(sqllab): preserve database state on SET_DATABASES [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 #41281:
URL: https://github.com/apache/superset/pull/41281#discussion_r3525182978
##########
superset-frontend/src/SqlLab/reducers/sqlLab.test.ts:
##########
@@ -21,13 +21,46 @@ import sqlLabReducer from 'src/SqlLab/reducers/sqlLab';
import * as actions from 'src/SqlLab/actions/sqlLab';
import type { SqlLabAction } from 'src/SqlLab/actions/sqlLab';
import type { SqlLabRootState } from 'src/SqlLab/types';
-import { table, initialState as mockState } from '../fixtures';
+import { table, databases, initialState as mockState } from '../fixtures';
type SqlLabState = SqlLabRootState['sqlLab'];
const initialState = mockState.sqlLab as unknown as SqlLabState;
// eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks
describe('sqlLabReducer', () => {
+ test('should merge databases instead of replacing existing database state', () => {
+ const existingDb = {
+ ...databases.result[0],
+ extra: databases.result[0].extra || '{}',
+ };
+ const existingDbId = Number(existingDb.id);
+
+ const incomingDb = {
+ ...databases.result[0],
+ id: existingDbId + 1,
+ database_name: 'new database',
+ extra: '{}',
+ };
+ const incomingDbId = Number(incomingDb.id);
+
+ const state = {
+ ...initialState,
+ databases: {
+ [existingDbId]: existingDb,
+ },
+ } as any;
Review Comment:
**Suggestion:** Replace the `any` cast on the reducer state with a concrete state type (for example, a properly typed partial or test-specific state interface) to preserve type safety. [custom_rule]
**Severity Level:** Minor ⚠️
<details>
<summary><b>Why it matters? 🤔 </b></summary>
The rule forbids new or changed TypeScript code from using `any`. This test setup explicitly casts the reducer state to `any`, so the violation is real and present in the final code.
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=f1d81619b0c14f2594705931fb580a53&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=f1d81619b0c14f2594705931fb580a53&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/SqlLab/reducers/sqlLab.test.ts
**Line:** 46:51
**Comment:**
*Custom Rule: Replace the `any` cast on the reducer state with a concrete state type (for example, a properly typed partial or test-specific state interface) to preserve type safety.
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%2F41281&comment_hash=a9a0d40a04560825f22dbd1e08370765b7f453a78964aa87c43123032d77b11a&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41281&comment_hash=a9a0d40a04560825f22dbd1e08370765b7f453a78964aa87c43123032d77b11a&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(sqllab): preserve database state on SET_DATABASES [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #41281:
URL: https://github.com/apache/superset/pull/41281#issuecomment-4827913847
@GagandeepSingh20 I think the approach looks OK... I'll take another review pass at it when CI is green, but right now, it needs a rebase to fix the flagged translation problem, and you'll need to get pre-commit to pass.
Superset uses Git pre-commit hooks courtesy of [pre-commit](https://pre-commit.com/). To install run the following:
```
pip3 install -r requirements/development.txt
pre-commit install
```
A series of checks will now run when you make a git commit.
Alternatively it is possible to run pre-commit by running pre-commit manually:
```
pre-commit run --all-files
```
--
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(sqllab): preserve database state on SET_DATABASES [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 #41281:
URL: https://github.com/apache/superset/pull/41281#discussion_r3451004172
##########
superset-frontend/src/SqlLab/reducers/sqlLab.test.ts:
##########
@@ -21,13 +21,53 @@ import sqlLabReducer from 'src/SqlLab/reducers/sqlLab';
import * as actions from 'src/SqlLab/actions/sqlLab';
import type { SqlLabAction } from 'src/SqlLab/actions/sqlLab';
import type { SqlLabRootState } from 'src/SqlLab/types';
-import { table, initialState as mockState } from '../fixtures';
+import {
+ table,
+ databases,
+ initialState as mockState,
+} from '../fixtures';
type SqlLabState = SqlLabRootState['sqlLab'];
const initialState = mockState.sqlLab as unknown as SqlLabState;
// eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks
describe('sqlLabReducer', () => {
+ describe('Database actions', () => {
+ test('should merge databases instead of replacing existing database state', () => {
+ const existingDb = databases.result[0];
+ const incomingDb = databases.result[1];
+
+ const state = {
+ ...initialState,
+ databases: {
+ [existingDb.id]: {
+ ...existingDb,
+ extra_json: {},
+ },
+ },
+ };
+
+ const action = actions.setDatabases([
+ {
+ ...incomingDb,
+ extra: '{}',
+ },
+ ] as any);
+
+ const newState = sqlLabReducer(state as any, action);
Review Comment:
**Suggestion:** Avoid casting `state` to `any`; declare `state` with the proper reducer state type so the reducer call remains fully type-checked. [custom_rule]
**Severity Level:** Minor ⚠️
<details>
<summary><b>Why it matters? 🤔 </b></summary>
This modified TypeScript test line casts `state` to `any`, which directly violates the rule against using `any` in new or changed TS/TSX code. The suggestion is therefore valid.
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=024fd0636abe4466bedac1c42c14ad90&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=024fd0636abe4466bedac1c42c14ad90&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/SqlLab/reducers/sqlLab.test.ts
**Line:** 57:57
**Comment:**
*Custom Rule: Avoid casting `state` to `any`; declare `state` with the proper reducer state type so the reducer call remains fully type-checked.
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%2F41281&comment_hash=37cbf1bcd31df8079dc9f28276105de779c08fbfd3494f2bf816c26c76d336dd&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41281&comment_hash=37cbf1bcd31df8079dc9f28276105de779c08fbfd3494f2bf816c26c76d336dd&reaction=dislike'>👎</a>
##########
superset-frontend/src/SqlLab/reducers/sqlLab.test.ts:
##########
@@ -21,13 +21,53 @@ import sqlLabReducer from 'src/SqlLab/reducers/sqlLab';
import * as actions from 'src/SqlLab/actions/sqlLab';
import type { SqlLabAction } from 'src/SqlLab/actions/sqlLab';
import type { SqlLabRootState } from 'src/SqlLab/types';
-import { table, initialState as mockState } from '../fixtures';
+import {
+ table,
+ databases,
+ initialState as mockState,
+} from '../fixtures';
type SqlLabState = SqlLabRootState['sqlLab'];
const initialState = mockState.sqlLab as unknown as SqlLabState;
// eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks
describe('sqlLabReducer', () => {
+ describe('Database actions', () => {
+ test('should merge databases instead of replacing existing database state', () => {
+ const existingDb = databases.result[0];
+ const incomingDb = databases.result[1];
+
+ const state = {
+ ...initialState,
+ databases: {
+ [existingDb.id]: {
+ ...existingDb,
+ extra_json: {},
+ },
+ },
+ };
+
+ const action = actions.setDatabases([
+ {
+ ...incomingDb,
+ extra: '{}',
+ },
+ ] as any);
Review Comment:
**Suggestion:** Remove the `any` cast on the `setDatabases` payload and type it using the action creator's expected argument type (or a specific database DTO type) so the test validates real compile-time contracts. [custom_rule]
**Severity Level:** Minor ⚠️
<details>
<summary><b>Why it matters? 🤔 </b></summary>
This is TypeScript code in a modified test file, and it uses `as any` on the `setDatabases` payload. The custom rule explicitly forbids new or modified TypeScript/TSX code from using `any`, so this is a real violation.
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=9eeaabf9a4de42f7b8c74863f21deee5&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=9eeaabf9a4de42f7b8c74863f21deee5&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/SqlLab/reducers/sqlLab.test.ts
**Line:** 50:55
**Comment:**
*Custom Rule: Remove the `any` cast on the `setDatabases` payload and type it using the action creator's expected argument type (or a specific database DTO type) so the test validates real compile-time contracts.
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%2F41281&comment_hash=48a95d2c38dd648433e073c2e4c2fb65f62b067a2cbdb96da65fce3168e8d9ec&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41281&comment_hash=48a95d2c38dd648433e073c2e4c2fb65f62b067a2cbdb96da65fce3168e8d9ec&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(sqllab): preserve database state on SET_DATABASES [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #41281:
URL: https://github.com/apache/superset/pull/41281#issuecomment-4791990832
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/41281?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 64.36%. Comparing base ([`b612f57`](https://app.codecov.io/gh/apache/superset/commit/b612f573d75717134a2e513da7f75aac10b04954?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`07e403d`](https://app.codecov.io/gh/apache/superset/commit/07e403d8ee110fafb8aab586537e53dfbb91bffe?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 104 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #41281 +/- ##
==========================================
- Coverage 64.36% 64.36% -0.01%
==========================================
Files 2653 2653
Lines 144867 144867
Branches 33421 33421
==========================================
- Hits 93250 93246 -4
- Misses 49946 49950 +4
Partials 1671 1671
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/41281/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/41281/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `68.55% <100.00%> (-0.01%)` | :arrow_down: |
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/41281?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] fix(sqllab): preserve database state on SET_DATABASES [superset]
Posted by "prathamesh04 (via GitHub)" <gi...@apache.org>.
prathamesh04 commented on PR #41281:
URL: https://github.com/apache/superset/pull/41281#issuecomment-5011308297
Hey @sadpandajoe @betodealmeida, I've independently verified this fix works. Here's my video proof showing:
1. 26 databases loaded (more than the default page_size of 20)
2. (id=26, beyond first 20 results) works without any 'database not found' warning
3. After hard reload, the tab loads cleanly with no yellow banner
[n8n_test.webm](https://github.com/user-attachments/assets/390e1031-2fbf-4ed4-9598-15fec980653c)
LGTM, looking forward to this getting merged! 🙏
--
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(sqllab): preserve database state on SET_DATABASES [superset]
Posted by "GagandeepSingh20 (via GitHub)" <gi...@apache.org>.
GagandeepSingh20 commented on PR #41281:
URL: https://github.com/apache/superset/pull/41281#issuecomment-4826812343
@rusackas Hi! Just following up on this PR since it's been a few days.
I wanted to check if there's anything else I should address on my side, or if there are any remaining concerns about the proposed fix. I'm happy to make any changes if needed.
Thanks for taking a look!
--
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(sqllab): preserve database state on SET_DATABASES [superset]
Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe commented on code in PR #41281:
URL: https://github.com/apache/superset/pull/41281#discussion_r3494811264
##########
superset-frontend/src/SqlLab/reducers/sqlLab.test.ts:
##########
@@ -21,13 +21,53 @@ import sqlLabReducer from 'src/SqlLab/reducers/sqlLab';
import * as actions from 'src/SqlLab/actions/sqlLab';
import type { SqlLabAction } from 'src/SqlLab/actions/sqlLab';
import type { SqlLabRootState } from 'src/SqlLab/types';
-import { table, initialState as mockState } from '../fixtures';
+import {
+ table,
+ databases,
+ initialState as mockState,
+} from '../fixtures';
type SqlLabState = SqlLabRootState['sqlLab'];
const initialState = mockState.sqlLab as unknown as SqlLabState;
// eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks
describe('sqlLabReducer', () => {
+ describe('Database actions', () => {
Review Comment:
Can we try to flatten this? We are moving away from describe blocks
--
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(sqllab): preserve database state on SET_DATABASES [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #41281:
URL: https://github.com/apache/superset/pull/41281#issuecomment-4791900875
Approving the CI run 🤞 @betodealmeida might be best to take a look 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
Re: [PR] fix(sqllab): preserve database state on SET_DATABASES [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 #41281:
URL: https://github.com/apache/superset/pull/41281#discussion_r3608455873
##########
superset-frontend/src/SqlLab/reducers/sqlLab.test.ts:
##########
@@ -21,13 +21,46 @@ import sqlLabReducer from 'src/SqlLab/reducers/sqlLab';
import * as actions from 'src/SqlLab/actions/sqlLab';
import type { SqlLabAction } from 'src/SqlLab/actions/sqlLab';
import type { SqlLabRootState } from 'src/SqlLab/types';
-import { table, initialState as mockState } from '../fixtures';
+import { table, databases, initialState as mockState } from '../fixtures';
Review Comment:
**Suggestion:** The `table` import is unused in this test file, which can fail CI when lint rules enforce no unused imports; remove the unused symbol from the import list. [possible bug]
<details>
<summary><b>Severity Level:</b> Minor 🧹</summary>
```mdx
- ⚠️ ESLint reports unused import in sqlLab reducer tests.
- ⚠️ CI lint step may fail, blocking PR merge.
```
</details>
<details>
<summary><b>Steps of Reproduction ✅ </b></summary>
```mdx
1. Open `superset-frontend/src/SqlLab/reducers/sqlLab.test.ts` and inspect line 24, which
imports `table`, `databases`, and `initialState as mockState` from `../fixtures`.
2. Scan the remainder of the file (lines 31–71 in the shown hunk) and confirm that only
`databases` and `mockState` are referenced in the new test, with no usage of the `table`
symbol.
3. Run the frontend lint task (ESLint) over this file, which is evidenced by the existing
`eslint-disable-next-line` comments at lines 29 and 64 indicating eslint is part of the
toolchain.
4. Observe ESLint reporting an unused import error for `table` in `sqlLab.test.ts`, which
can cause the lint step in CI to fail depending on the project's configuration.
```
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=ce094a60a99c49fd9bec99a88e20eb83&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=ce094a60a99c49fd9bec99a88e20eb83&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/SqlLab/reducers/sqlLab.test.ts
**Line:** 24:24
**Comment:**
*Possible Bug: The `table` import is unused in this test file, which can fail CI when lint rules enforce no unused imports; remove the unused symbol from the import list.
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%2F41281&comment_hash=4a6024e8e731196a1477cfd76445d32b1030b4aefbd569b5a8376ca22eac51db&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41281&comment_hash=4a6024e8e731196a1477cfd76445d32b1030b4aefbd569b5a8376ca22eac51db&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(sqllab): preserve database state on SET_DATABASES [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41281:
URL: https://github.com/apache/superset/pull/41281#issuecomment-4766644871
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(sqllab): preserve database state on SET_DATABASES [superset]
Posted by "GagandeepSingh20 (via GitHub)" <gi...@apache.org>.
GagandeepSingh20 commented on PR #41281:
URL: https://github.com/apache/superset/pull/41281#issuecomment-4916068017
I merged the latest `master` into this branch to keep the PR up to date. After that, the only remaining failing check appears to be:
`Frontend Build CI / lint-frontend`
@sadpandajoe Before making any unrelated changes, could you please advise whether this is something I should fix in this PR, or if the check needs to be rerun / handled separately?
Happy to make any required changes once confirmed.
--
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(sqllab): preserve database state on SET_DATABASES [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41281:
URL: https://github.com/apache/superset/pull/41281#issuecomment-4842460473
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</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] fix(sqllab): preserve database state on SET_DATABASES [superset]
Posted by "GagandeepSingh20 (via GitHub)" <gi...@apache.org>.
GagandeepSingh20 commented on PR #41281:
URL: https://github.com/apache/superset/pull/41281#issuecomment-4857856051
@sadpandajoe Thanks for the review and approval! I’ll wait for the workflows to be approved/run, and can update the branch if needed.
--
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