-
Notifications
You must be signed in to change notification settings - Fork 120
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
feat: remove content access mode cache #3471
base: main
Are you sure you want to change the base?
feat: remove content access mode cache #3471
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! It generally LGTM, there are a couple of things to fix.
Regarding the failure of CertSorterTests::test_missing_installed_product
: that test is practically useless now.
The reason for this is:
- in the test setup,
StubContentAccessModeCache
was set up forCONTENT_ACCESS_MODE_CACHE
: since that stub cache had no content, the comparison inis_simple_content_access()
against "org_environment" always returned false is_simple_content_access()
now stops usingCONTENT_ACCESS_MODE_CACHE
, so it always returns true now (thus SCA)ComplianceManager
(from whichCertSorter
derives) fillsunentitled_products
based on the compliance information, which is an entitlements-only feature (seeComplianceManager._parse_server_status()
, the code guarded byis_sca
in particular)- hence
CertSorter.unentitled_products
is always empty in SCA mode
In case you are wondering: yes, the other tests that check CertSorter.unentitled_products
in any way are sort of dead now. To make them working again, ideally is_simple_content_access()
should be mocked/patched for them to return false (and thus ensure things work in entitlement mode). OTOH, dropping compliance bits is a potential further step.
Also make sure to remove the old cache file on upgrade: see the existing code in %posttrans
that removes an old cache. Simply remove the dropped cache there as well.
Or, even better, do the same approach that |
390bf68
to
c751794
Compare
This patch aims to remove references to the 'ContentAccessModeCache' and refactor/simplify related code that checks this cache since entitlement is being phased out and SCA will be the only content access mode. Resolves: CCT-619 Signed-off-by: Jason Jerome <[email protected]>
c751794
to
83ff5dd
Compare
Thanks for the detailed review! I used the approach you suggested to patch I agree that dropping the compliance bits would be a good next step. I'm leaving that out of this PR to be addressed in a separate card. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! Additional nice followups can be
- dropping
is_simple_content_access()
altogether and related code - dropping the compliance bits
Waiting for QE pre-verification.
This patch aims to remove references to the 'ContentAccessModeCache' and refactor/simplify related code that
checks this cache since entitlement is being phased out and SCA will be the only content access mode.
Resolves: CCT-619