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

refactor - query parsing consolidation #9508

Open
mattheidelbaugh opened this issue May 15, 2024 · 0 comments
Open

refactor - query parsing consolidation #9508

mattheidelbaugh opened this issue May 15, 2024 · 0 comments

Comments

@mattheidelbaugh
Copy link
Contributor

mattheidelbaugh commented May 15, 2024

Describe the feature

Currently query parsing is being done both by various duplicate QueryFilter classes spread throughout the resources files and also by a central QueryParser class in utils.py that is inherited from to create query parsers for EBS Snapshots, IAM Policies, and Cloud Directories. I believe this issue stems from there never having been a distinction made between query filters and query parameters. Most enum spec functions support query parameters to perform server-side filtering of results. A few of these functions (such as describe_instances for ec2) also offer a Filters parameter which takes a list of Name, Values dictionaries and allows you to perform server-side filtering for a much larger list of parameters. Because these two different types of queries were never distinguished, a lot of unnecessary and confusing translations between dictionaries and lists of Name, Values dictionaries are being done and many potential server-side queries are not supported.

It seems to me that all query parsing should be centralized into the QueryParser class, thus greatly simplifying a lot of this code and providing a number of new server-side query possibilities such as CreationTime.

Extra information or context

No response

@mattheidelbaugh mattheidelbaugh changed the title Query Parsing Consolidation refactor - query parsing consolidation May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant