APPZ-2108 Renaming account breaks dashboards#64
Open
Gavriel-M wants to merge 4 commits intomain-logziofrom
Open
APPZ-2108 Renaming account breaks dashboards#64Gavriel-M wants to merge 4 commits intomain-logziofrom
Gavriel-M wants to merge 4 commits intomain-logziofrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request addresses issues related to variable hydration and datasource selection, particularly to fix problems when renaming accounts breaks dashboards (APPZ-2108). The main changes ensure variable default values are correctly handled during rehydration, improve how variable-based datasources are recognized and mapped, and clean up unused imports.
Variable hydration improvements:
hydrateVariableDefinitionStatesusage inVariableProvider.tsxto always use an empty object forinitialParamsduring variable definition rehydration, ensuring default values are respected and preventing issues when account names change.hydrationUtils.test.tsto verify that default values are used wheninitialValuesare empty and that initial values override defaults when present.Datasource variable selection fixes:
DatasourceSelect.tsxto recognize datasource variables by checking both display names and selector names, ensuring that variable-based datasources are correctly included in the options even after renaming.datasourceSelectValueToSelectorinDatasourceSelect.tsxto match variables to datasource selectors using both datasource names and selector names, increasing robustness when resolving variable values to selectors.Code cleanup:
parseVariablesimport fromDatasourceSelect.tsx.Note
Low Risk
Scoped to UI datasource selection/variable mapping logic with no auth/data mutation; main risk is subtle mismatches in variable-to-datasource resolution affecting dashboards.
Overview
Fixes datasource-variable handling in
DatasourceSelect.tsxso variable-backed datasources remain selectable/resolvable even when display names change.Variable options are now included when the variable value matches either a datasource display name or its underlying
selector.name, anddatasourceSelectValueToSelectorresolves variables by matching against both fields; also removes the unusedparseVariablesimport by directly extracting the variable name from the$-prefixed value.Written by Cursor Bugbot for commit 8b7be6d. This will update automatically on new commits. Configure here.