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

GraphQL inventory doesn't actually cache results #462

Open
thebamaman opened this issue Dec 5, 2024 · 1 comment
Open

GraphQL inventory doesn't actually cache results #462

thebamaman opened this issue Dec 5, 2024 · 1 comment

Comments

@thebamaman
Copy link

Bug Report
SOFTWARE VERSIONS
Collection:

Tried with both 4.5.1 and 5.4.0

SUMMARY

The GraphQL inventory configuration and code both list as Cacheable, yet in no part of the module does it actually attempt to cache the results of the query, or read from an available inventory cache. This is in contrast to the REST inventory module.

STEPS TO REPRODUCE

In the inventory configuration (or envvars), use 'cache: True' with something like 'cache_plugin: jsonfile' and 'cache_connection: '.
Run with ansible-inventory. REST inventory creates cache files, graphql does not.

EXPECTED RESULTS

some form of cached inventory in the jsonfile path

ACTUAL RESULTS

The jsonfile directory was created, but no files are created.
Note I tried multiple different cache types (jsonfile, redis, mongo), all the same behavior.

@joewesch
Copy link
Contributor

Thanks for the report. I was made to believe caching was mostly a plug-and-play addition, but it seems I'll need to dig into this more.

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

No branches or pull requests

2 participants