Skip to content

Fix dashboard topology context leaking between sources - #35001

Merged
harshsoni2024 merged 1 commit into
mainfrom
python-ci
Oct 10, 2026
Merged

harshsoni2024 merged 1 commit into
mainfrom
python-ci

Conversation

@IceS2

@IceS2 IceS2 commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Describe your changes:

Fixes test_redash_native_tags_persist_through_workflow[fresh] in the Python integration pipeline.

DashboardServiceSource.context was shared across source instances. The Superset test left chart 37 in that context, so the next Redash workflow referenced a chart that did not exist in its service and received HTTP 400. Create a context in each source constructor, add regression coverage for Redash-to-Redash and Superset-to-Redash isolation, and update the PowerBI test to patch the instance context.

Type of change:

  • Bug fix

High-level design:

Not applicable — small fix to context ownership.

Tests:

  • python -m pytest ingestion/tests/unit/topology/dashboard -q: 925 passed.
  • python -m pytest ingestion/tests/integration/tags/test_dashboard_stages.py -q: 6 passed against the local backend, including Redash fresh/existing/denied cases.
  • Combined dashboard suite, dashboard tag integration tests, and ingestion/tests/unit/test_ometa_utils.py with coverage: 964 passed. Dashboard base module line coverage is 83.33%; the changed constructor line is covered.
  • Context/context-manager tests, topology runner tests, and topology progress tests: 62 passed (test_context.py, test_context_manager.py, test_runner.py, test_topology_runner_progress.py, test_topology_progress_path.py).
  • Final combined run of all the above unit and integration tests: 1,026 passed (exit code 0).
  • Four new regression cases fail before the fix and pass after it; empty prior contexts, populated prior contexts, and the current source's own chart references are covered.
  • Ruff lint/format, pre-commit hooks, and git diff --check passed.
  • Wider unit checks could not complete: the full suite lacks the optional nats dependency, and broader topology runs attempt AWS metadata, Glue, and Confluent network calls blocked by the sandbox. The full integration suite was not rerun; validation uses the affected dashboard tag integration tests.

Backend API, Playwright, UI screenshots, and manual UI testing: not applicable — Python-only change.

Checklist:

  • Added regression tests for the failing scenario.
  • Ran the affected dashboard unit and integration tests locally.
  • No documentation or decision record needed for this bug fix.

@IceS2
IceS2 requested a review from a team as a code owner October 9, 2026 09:16
@IceS2 IceS2 added the skip-pr-checks Bypass PR metadata validation check label Oct 9, 2026
@IceS2
IceS2 requested review from akashverma0786 and a balanced review from Copilot October 9, 2026 09:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added Ingestion safe to test Add this label to run secure Github workflows on PRs labels Oct 9, 2026
@gitar-bot

gitar-bot Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Giving each dashboard source its own topology context prevents stale chart IDs from leaking across services, which could otherwise trigger invalid API requests.

Fixes dashboard topology context leaking between sources by creating a fresh context in each DashboardServiceSource constructor, so chart references from one workflow no longer affect the next. Regression tests cover Redash-to-Redash and Superset-to-Redash isolation. No issues found.

Review coverage

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

🤖 Auto-approval Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@harshsoni2024 harshsoni2024 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IceS2
IceS2 added this pull request to the merge queue Oct 9, 2026
@IceS2
IceS2 removed this pull request from the merge queue due to a manual request Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — manual (2026-10-09T09:30:30Z)

The entry left the queue before it was built, so no checks ran against it.

@sonarqubecloud

sonarqubecloud Bot commented Oct 9, 2026

Copy link
Copy Markdown

@harshsoni2024
harshsoni2024 added this pull request to the merge queue Oct 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — failed_checks (2026-10-09T16:36:16Z)

Blocked the queue: playwright-summary

Failed Playwright tests:

  • Features/ProfilePlatformSettings.spec.ts › learning resources: adds, edits and deletes a resource

@harshsoni2024
harshsoni2024 added this pull request to the merge queue Oct 10, 2026
Merged via the queue into main with commit 589008c Oct 10, 2026
120 of 121 checks passed
@harshsoni2024
harshsoni2024 deleted the python-ci branch October 10, 2026 07:14

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingestion safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants