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

Add cache check when activating a product with SCC #1278

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

jesusbv
Copy link
Collaborator

@jesusbv jesusbv commented Jan 24, 2025

Description

When a BYOS or HYBRID system activates a product with SCC we check first if the registration code use for that activation is in the cache for that product

If there is a match in the cache and the registration code is active we do not reach to SCC, update the cache and update the system pubcloud_reg_code if reg code is new or different

If there is no match in the cache we call SCC, update the cache and update the system pubcloud_reg_code if it's new or different

If the registration code is inactive, we do not follow with the activation

  • Related Issue / Ticket / Trello card:

How to test

Change Type

Please select the correct option.

  • Bug Fix (a non-breaking change which fixes an issue)
  • New Feature (a non-breaking change which adds new functionality)
  • Documentation Update (a change which only updates documentation)

Checklist

Please check off each item if the requirement is met.

  • I have reviewed my own code and believe that it's ready for an external review.
  • I have provided comments for any hard-to-understand code.
  • I have documented the MANUAL.md file with any changes to the user experience.
  • If my changes are non-trivial, I have added a changelog entry to notify users at package/obs/rmt-server.changes.

Review

Please check out our review guidelines
and get in touch with the author to get a shared understanding of the change.

When a BYOS or HYBRID system activates a product with SCC
we check first if the registration code use for that activation
is in the cache for that product

If there is a match in the cache and the registration code is active
we do not reach to SCC, update the cache and update the system pubcloud_reg_code
if reg code is new or different

If there is no match in the cache we call SCC, update the cache and update the
system pubcloud_reg_code if it's new or different

If the registration code is inactive, we do not follow with the activation
@jesusbv jesusbv self-assigned this Jan 24, 2025
@jesusbv jesusbv mentioned this pull request Jan 24, 2025
7 tasks
@jesusbv
Copy link
Collaborator Author

jesusbv commented Jan 24, 2025

This PR needs the changes of #1275 and #1276 merged and rebased, in the meantime, will work on the tests for this PR

@jesusbv jesusbv added the 2.22 label Jan 24, 2025
jesusbv and others added 12 commits January 28, 2025 14:57
Add new methods to handle the cache in the InstanceVerification engine

Update some tests
The InstanceVerification engine is the engine responsible to handle the cache
before

We are editing the way we cache the information, so that engine gets more
methods to do so

All the places where we edit the cache should call these methods
@jesusbv jesusbv force-pushed the cache-activate-product branch 2 times, most recently from 2734619 to a7be943 Compare February 20, 2025 18:31
@jesusbv jesusbv force-pushed the cache-activate-product branch from d4f0e7e to d4a946e Compare February 20, 2025 18:45
@jesusbv jesusbv marked this pull request as ready for review February 21, 2025 11:02
@jesusbv jesusbv marked this pull request as draft February 21, 2025 11:02
@jesusbv jesusbv force-pushed the cache-activate-product branch from 707a3b6 to 5cacbb9 Compare February 21, 2025 12:50
@jesusbv jesusbv marked this pull request as ready for review February 21, 2025 13:03
@jesusbv jesusbv requested a review from rjschwei February 21, 2025 13:03
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.

2 participants