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

oci: Disable active_repo_tags_cache for tests (PROJQUAY-3872) #1483

Merged
merged 1 commit into from Aug 26, 2022

Conversation

dmage
Copy link
Member

@dmage dmage commented Aug 15, 2022

The OCI Content Discovery tests requires Quay to immediately reflect tag changes in tag lists when a tag is created/deleted, so to make tests green we should disable active_repo_tags_cache.

@dmage dmage changed the title Allow to disable cache for active repository tags oci: Allow to disable cache for active repository tags Aug 15, 2022
@dmage dmage requested review from kleesc and bcaton85 August 15, 2022 21:22
@dmage dmage changed the title oci: Allow to disable cache for active repository tags oci: Allow to disable cache for active repository tags (PROJQUAY-3872) Aug 16, 2022
@dmage dmage force-pushed the disable-tag-cache branch 10 times, most recently from f760697 to eefd0b3 Compare August 25, 2022 17:22
@dmage dmage changed the title oci: Allow to disable cache for active repository tags (PROJQUAY-3872) oci: Disable active_repo_tags_cache for tests (PROJQUAY-3872) Aug 26, 2022
@@ -50,7 +50,7 @@ def get(self, key, default_value=None):
# Otherwise the key has expired or was not found. Rebuild the cache and check it again.
items = self._rebuild()
found_item = items.get(key)
if found_item is None:
if found_item is None or found_item.expired:
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this required for tests to pass?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, otherwise the in-memory cache can incorrectly return an expired item

Copy link
Contributor

@bcaton85 bcaton85 left a comment

Choose a reason for hiding this comment

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

LGTM

@dmage dmage merged commit 31e5b00 into quay:master Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants