You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "michael-s-molina (via GitHub)" <gi...@apache.org> on 2025/09/11 17:56:13 UTC
[PR] fix: SQL Lab tab events [superset]
michael-s-molina opened a new pull request, #35105:
URL: https://github.com/apache/superset/pull/35105
### SUMMARY
This adds a unique `immutableId` field to the `QueryEditor` type that persists throughout the tab's lifecycle, enabling reliable event filtering and tab identification for SQL Lab extensions while maintaining backward compatibility. Previously, SQL Lab tabs could only be identified by their mutable id field, which made it difficult for extensions to reliably track events and maintain stable references to specific editor instances across state changes and persistence operations.
The addition of `immutableId` for tabs might help improving the current logic that uses mutable `id` and `tabViewId` introduced in https://github.com/apache/superset/pull/34720 to reduce re-renders. I'll let @justinpark analyze the code and check if things can be improved in a follow-up PR.
### TESTING INSTRUCTIONS
Check that the events are triggered for the correct tabs.
### ADDITIONAL INFORMATION
- [ ] 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] fix: SQL Lab tab events [superset]
Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro commented on code in PR #35105:
URL: https://github.com/apache/superset/pull/35105#discussion_r2342084269
##########
superset-frontend/src/SqlLab/fixtures.ts:
##########
@@ -188,6 +188,7 @@ export const table = {
export const defaultQueryEditor = {
version: LatestQueryEditorVersion,
id: 'dfsadfs',
+ immutableId: 'dfsadfs',
Review Comment:
Can we make these different from `id` to make sure these don't get mixed up?
--
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: SQL Lab tab events [superset]
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on PR #35105:
URL: https://github.com/apache/superset/pull/35105#issuecomment-3282380454
> I'm curious, do you know why the ids are mutable?
I think it's because they are updated when the tab is saved. @justinpark will probably know better but I'm hoping that we can improve the logic now that an immutable id is present and maybe keep the remote id in a separate variable.
--
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: SQL Lab tab events [superset]
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina merged PR #35105:
URL: https://github.com/apache/superset/pull/35105
--
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: SQL Lab tab events [superset]
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on code in PR #35105:
URL: https://github.com/apache/superset/pull/35105#discussion_r2342145674
##########
superset-frontend/src/SqlLab/fixtures.ts:
##########
@@ -188,6 +188,7 @@ export const table = {
export const defaultQueryEditor = {
version: LatestQueryEditorVersion,
id: 'dfsadfs',
+ immutableId: 'dfsadfs',
Review Comment:
Done.
--
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