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

Use portable cache from ansible-compat #3180

Merged
merged 1 commit into from
Sep 2, 2021
Merged

Use portable cache from ansible-compat #3180

merged 1 commit into from
Sep 2, 2021

Conversation

ssbarnea
Copy link
Member

@ssbarnea ssbarnea commented Jul 7, 2021

This simplifies use of caching across multiple versions of Python.
Implementation is inspired from the the approach taken by https://github.com/apache/airflow/ project.

Related: python/mypy#1362

src/molecule/api.py Outdated Show resolved Hide resolved
setup.cfg Outdated Show resolved Hide resolved
src/molecule/compat.py Outdated Show resolved Hide resolved
ssbarnea added a commit to ansible/ansible-compat that referenced this pull request Aug 25, 2021
This should make it much easier for use to use the newer caching
functions in python across our projects.

Related: ansible/molecule#3180
ssbarnea added a commit to ansible/ansible-compat that referenced this pull request Aug 26, 2021
This should make it much easier for use to use the newer caching
functions in python across our projects.

Related: ansible/molecule#3180
@ssbarnea ssbarnea marked this pull request as ready for review August 26, 2021 07:58
@ssbarnea ssbarnea changed the title Refactor use of lru_cache Use portable cache from ansible-compat Aug 26, 2021
ssbarnea added a commit to ansible-community/molecule-docker that referenced this pull request Aug 26, 2021
ssbarnea added a commit to ansible-community/molecule-docker that referenced this pull request Aug 26, 2021
@ssbarnea ssbarnea force-pushed the fix/lru branch 2 times, most recently from e5ae0a7 to b870a60 Compare August 31, 2021 10:50
Copy link
Contributor

@tadeboro tadeboro left a comment

Choose a reason for hiding this comment

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

The cache commit seems OK, but this PR also contains setuptools cleanup which should not be part of the current batch of changes.

@ssbarnea
Copy link
Member Author

ssbarnea commented Sep 2, 2021

The cache commit seems OK, but this PR also contains setuptools cleanup which should not be part of the current batch of changes.

Sorted. Got combined by mistake while working on different changes.

ssbarnea added a commit to ansible-community/molecule-hetznercloud that referenced this pull request Sep 2, 2021
This makes the driver version with future versions of molecule,
which will no longer have the cache in them. Same kind of change
was already merged in two other drivers podman and docker.

Related: ansible/molecule#3180
ssbarnea added a commit to ansible-community/molecule-hetznercloud that referenced this pull request Sep 2, 2021
This makes the driver version with future versions of molecule,
which will no longer have the cache in them. Same kind of change
was already merged in two other drivers podman and docker.

Related: ansible/molecule#3180
This simplifies use of caching across multiple versions of Python.

Three molecule plugins required patching before this change as they
were importing the @cache from molecule.
@ssbarnea ssbarnea merged commit c6a456b into main Sep 2, 2021
@ssbarnea ssbarnea deleted the fix/lru branch September 2, 2021 12:30
ssbarnea added a commit to ansible/ansible-compat that referenced this pull request Sep 2, 2021
This should make it much easier for use to use the newer caching
functions in python across our projects.

Related: ansible/molecule#3180
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants