fix: respect --keep-original-ids for dashboard with drills#14
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughThis PR changes drill-to-dashboard ID mapping so legacy dashboard IDs are preserved when ChangesKeep Original IDs for Drill-to-Dashboard Mapping
Estimated code review effort: 2 (Simple) | ~12 minutes Sequence Diagram(s)sequenceDiagram
participant Test as test_dashboard_drill_to_dashboard_keep_original_ids
participant Builder as CloudDashboardsBuilder
participant Ctx as dashboards_context_keep_ids
Test->>Builder: process_legacy_dashboards(legacy_json, skip_deploy=True)
Builder->>Ctx: check keep_original_ids
alt keep_original_ids true
Ctx-->>Builder: preserve legacy_id
else keep_original_ids false
Ctx-->>Builder: derive cloud id
end
Builder-->>Test: cloud dashboards with resolved drill ids
Test->>Test: assert dicts_are_equal(actual, expected)
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/test_dashboards.py`:
- Line 133: The comparison loop in the dashboard test uses zip(actual_sorted,
expected_sorted) without strict checking, so mismatched lengths could be
silently ignored. Update the zip call in the test that iterates over
actual_sorted and expected_sorted to use strict=True so the assertion fails when
the lists differ in size.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c2fdef25-802c-46a4-81a0-d241f07005c5
📒 Files selected for processing (5)
src/gooddata_legacy2cloud/dashboards/cloud_dashboards_builder.pytests/data/dashboards/legacy_objects/objects_by_uri.jsontests/data/dashboards/test_cases/dashboard_with_drills_keep_original_ids_cloud.jsontests/data/dashboards/test_cases/dashboard_with_drills_keep_original_ids_legacy.jsontests/test_dashboards.py
bd304f8 to
ab12caa
Compare
JIRA: SVS-1334
Summary by CodeRabbit
New Features
Bug Fixes
Tests