Repository navigation
Conversation
Two Legacy dashboard shapes crashed the conversion:
- dashboards with no widgets have no layout key; the fallback []
was then indexed with "fluidLayout" (TypeError). Missing layout
now yields an empty Cloud layout.
- older KPI dashboards store attribute filters without
localIdentifier (KeyError). A stable "{idx}_attributeFilter" id
is generated, mirroring the existing date filter handling.
Metrics, insights and dashboards migrations also loaded the Legacy
attribute elements cache when the filtered object list was empty
(the common case for client workspaces with --client-prefix); the
slow fetch now runs only when there are objects to process.
risk: low
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Comment |
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.
Dashboard conversion crashes
Two Legacy dashboard shapes made
CloudDashboardraise, so the dashboard was not migrated at all (24 dashboards across 18 workspaces):layoutkey in Legacy. The[]fallback was then indexed with"fluidLayout"→TypeError: list indices must be integers or slices, not str. A missing layout now produces an empty Cloud layout (sections: []).localIdentifier(3×, KPI dashboards from 2020): older Legacy filter contexts don't store it →KeyError: 'localIdentifier'. A stable{idx}_attributeFilterid is generated, mirroring the existing{n}_dateFilterhandling; it is used both in the filter and inattributeFilterConfigs.Skip element cache when nothing is migrated
migrate_metrics/insights/dashboardscalledlegacy_client.initialize_attribute_elements_cache()even when the filtered object list was empty. With--client-prefix(default--without-mapped-objects default_only) most client workspaces have nothing custom to migrate, so this slow fetch was pure overhead. It now runs only when there are objects to process.Tests
tests/test_dashboards.py: two new cases,empty_dashboardanddashboard_with_attribute_filter_without_local_identifier, derived from existing sanitized fixtures.tests/test_migrate_metrics_element_cache.py: the cache is not loaded for an empty metric list and is loaded otherwise.All new tests fail on
masterwith the original errors and pass with the fix.Validation
make checkon a clean checkout: format, lint, 111 tests, type-check pass.--overwrite-existing --only-object-idsand verified in Cloud (original title, filter context, widgets).risk: low