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

Make GoogleCloudSystem.find_templates more memory-efficient by using a filter #466

Conversation

ogajduse
Copy link
Member

Problem statement

  • wrapanapi queries the whole project for templates instead of asking the GCE API for a subset of templates.

Solution

  • expose the filter expression argument that is passed to the GCE API that filters the templates based on the expression provided

Notes

GCE documentation: https://googleapis.github.io/google-api-python-client/docs/dyn/compute_v1.images.html#list

@mshriver mshriver added enhancement Google Related to GCE labels Jul 16, 2023
@rplevka
Copy link

rplevka commented Jul 17, 2023

I'll just add to this that the main motivation behind this was to cut the RAM usage for querying projects with tons of templates in it.

Copy link
Contributor

@JacobCallahan JacobCallahan left a comment

Choose a reason for hiding this comment

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

ACK. @mshriver can you retrigger the pre-commit check, or would you like to merge anyway?

@ogajduse
Copy link
Member Author

ACK. @mshriver can you retrigger the pre-commit check, or would you like to merge anyway?

There is no pre-commit check if there is no pre-commit config. 😎

=====> /tmp/tmpsly93lps/.pre-commit-config.yaml is not a file

@JacobCallahan JacobCallahan merged commit 09c58d7 into RedHatQE:master Jul 17, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Google Related to GCE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants