Skip to content

Conversation

@robert-bob-1
Copy link
Contributor

Pull Request

🤨 Rationale

This solves the bug for the Systems Data source
Bug 3463192: Grafana | System Data source | Refreshing data source queries before the currently running query is completed, the ongoing query is not cancelled as expected.

Whenever the user refreshes the query, the query route is called without cancelling the previous requests for the same route.

👩‍💻 Implementation

Changed the return type of the methods from Promise to Observable.
Use the Observable methods from DataSourceBase file for running the queries.
Add a getWorkspaces Observable method since this route is recalled in tests.

🧪 Testing

Manually tested That requests from the systems data source get cancelled. You can see the requests in the network tab are in red since i cancelled them from the UI
image

✅ Checklist

@robert-bob-1 robert-bob-1 force-pushed the users/robob/systemsDataSource-useObservables branch from a7cd31d to 3849740 Compare November 13, 2025 12:41
Copy link
Collaborator

@stefanc18 stefanc18 left a comment

Choose a reason for hiding this comment

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

Talked offline with Robert, he'll refactor the code to avoid duplication and ensure we have testing coverage.

Copy link
Member

@rajsite rajsite left a comment

Choose a reason for hiding this comment

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

Awaiting on current feedback to be addressed (can be reset when ready for review)

… into users/robob/systemsDataSource-useObservables
@robert-bob-1 robert-bob-1 requested a review from a team as a code owner January 27, 2026 13:10
…th correct filter and correct number of 'replace' template calls
@robert-bob-1 robert-bob-1 merged commit bafcefa into main Jan 27, 2026
2 checks passed
@robert-bob-1 robert-bob-1 deleted the users/robob/systemsDataSource-useObservables branch January 27, 2026 14:15
kartheeswaran-ni pushed a commit that referenced this pull request Jan 28, 2026
## [4.119.1](v4.119.0...v4.119.1) (2026-01-27)

### Bug Fixes

* **systems:** Cancel ongoing requests when refreshing query ([#526](#526)) ([bafcefa](bafcefa))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants