Skip to content
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

Update query project when switching datasources #41

Merged
merged 3 commits into from
Sep 18, 2023
Merged

Conversation

DHedgecock
Copy link
Member

@DHedgecock DHedgecock commented Sep 15, 2023

What does this PR do?

Adds checks that the configured query projectName matches the current datasource instance projectName configuration. This resolves two current issues:

  1. Switching between instances of the plugin when editing a query currently fails to update the query's project name to match.
  2. Using a template variable for the query datasource currently fails to update the query's project name to match.

Closes #33

How does this impact users?

Enables users to install multiple copies of the plugin with different projects configured for each copy. These copies of the plugin can then be used in a dashboard template variable, or to simplify switching between projects in the editor query mode by treating them as different datasources.

What needed to change in the code and why?

Checks on the query projectName were added to the query editor and the datasource request handler because the datasource project name can change without the query itself changing.

How did you test this?

Locally tested using a template variable setup.

Code review notes

none

@DHedgecock DHedgecock self-assigned this Sep 18, 2023
@DHedgecock DHedgecock marked this pull request as ready for review September 18, 2023 13:28
@DHedgecock DHedgecock merged commit 56e9d41 into main Sep 18, 2023
1 check passed
@DHedgecock DHedgecock deleted the project-switching branch September 18, 2023 16:01
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.

Lightstep Project Not Updating Automatically On Datasource Change
2 participants