-
Notifications
You must be signed in to change notification settings - Fork 5
fix(systems): Cancel ongoing requests when refreshing query #526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(systems): Cancel ongoing requests when refreshing query #526
Conversation
a7cd31d to
3849740
Compare
stefanc18
left a comment
There was a problem hiding this 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.
There was a problem hiding this 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
… into users/robob/systemsDataSource-useObservables
… into users/robob/systemsDataSource-useObservables
…th correct filter and correct number of 'replace' template calls
## [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))
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
getWorkspacesObservable 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

✅ Checklist