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

Type options of cache plugins #8624

Merged
merged 2 commits into from
Jul 28, 2024

Conversation

felixfontein
Copy link
Collaborator

SUMMARY

Some option types were missing.

ISSUE TYPE
  • Docs Pull Request
  • Feature Pull Request
COMPONENT NAME

cache plugins

@felixfontein felixfontein added the backport-9 Automatically create a backport for the stable-9 branch label Jul 14, 2024
@ansibullbot
Copy link
Collaborator

cc @bcoca
click here for bot help

@ansibullbot ansibullbot added cache cache plugin docs plugins plugin (any type) labels Jul 14, 2024
@@ -37,13 +38,13 @@
section: defaults
_timeout:
default: 86400
type: float
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did this change to float here? And does it need to also change in ansible-core? - https://docs.ansible.com/ansible/latest/reference_appendices/config.html#cache-plugin-timeout

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The base class interprets this option as a float: https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/cache/__init__.py#L88

Since other users of that constant might assume it's an int it is probably better not to change the type of CACHE_PLUGIN_TIMEOUT, but changing it here should be ok.

@s-hertel you touched that code last, WDYT about using type: float here (and the type in general)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I changed it back to type: integer for existing type values in 46deac0, only keeping type: float when the type wasn't specified before.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm going to merge this PR in its current form, I can update it back to type: float in a follow-up if this discussion resolves positively.

@ansibullbot ansibullbot added the stale_ci CI is older than 7 days, rerun before merging label Jul 24, 2024
@ansibullbot ansibullbot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR and removed stale_ci CI is older than 7 days, rerun before merging needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Jul 27, 2024
@felixfontein felixfontein merged commit 37c8560 into ansible-collections:main Jul 28, 2024
147 checks passed
Copy link

patchback bot commented Jul 28, 2024

Backport to stable-9: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-9/37c8560542f4dd52fe695d23ebc043e52c6a6b8c/pr-8624

Backported as #8686

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein felixfontein deleted the types-cache branch July 28, 2024 11:09
patchback bot pushed a commit that referenced this pull request Jul 28, 2024
* Type options of cache plugins.

* Do not change type of _timeout for now.

(cherry picked from commit 37c8560)
@felixfontein
Copy link
Collaborator Author

@samccann thanks for reviewing this!

felixfontein added a commit that referenced this pull request Jul 28, 2024
…8686)

Type options of cache plugins (#8624)

* Type options of cache plugins.

* Do not change type of _timeout for now.

(cherry picked from commit 37c8560)

Co-authored-by: Felix Fontein <[email protected]>
aioue pushed a commit to aioue/community.general that referenced this pull request Oct 1, 2024
* Type options of cache plugins.

* Do not change type of _timeout for now.
TobiasZeuch181 pushed a commit to TobiasZeuch181/zypper_repository_add_list that referenced this pull request Oct 2, 2024
* Type options of cache plugins.

* Do not change type of _timeout for now.
Massl123 pushed a commit to Massl123/community.general that referenced this pull request Feb 7, 2025
* Type options of cache plugins.

* Do not change type of _timeout for now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-9 Automatically create a backport for the stable-9 branch cache cache plugin docs plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants