Allow back passing a list of Query objects #7979
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This is a cleanup for #7750
Motivation
#7750 changed
QueryManager
so thatqueries=...
is expected to be a list ofdict
, rather than a list ofQuery
.The motivation was that since queries are statically declared in a
queries.py
module and referenced from there, we wanted to avoid passing those references directly, and so we unwrapped everything fromQuery
to passqueries=[<dict>, ...]
.Yet by doing so we broke backwards compatibility (the PR does have a
changelog/Changed
label). Here's why:QueryManager(queries=[Query(<dict>), ...])
.QueryManager(queries=[<dict>, ...])
(and it internally converts them toQuery
).This means users won't be able to upgrade database integrations to versions released after #7750 without also upgrading their Agent to 7.24.0 (which hasn't been released yet, and won't be for a few weeks still, although RCs are available).
For my particular use case (VoltDB), it means I'm not able to write a
voltdb
that can both work on older Agents (eg 7.22.0, or whichever Agent the customer is using right now) andmaster
. Yet I'd like to avoid requiring the prospect to update their Agents to use an RC — not a very sexy requirement for a sales pitch. :-)Additional Notes
Review checklist (to be filled by reviewers)
changelog/
andintegration/
labels attached