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

Refactor repository and registry cache #1150

Open
wants to merge 1 commit into
base: refactor-verify-instance
Choose a base branch
from

Conversation

jesusbv
Copy link
Collaborator

@jesusbv jesusbv commented May 10, 2024

Description

  • Remove registry cache in the same engine that it is created
  • Get repository and registry cache paths in one place to avoid duplication

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 verified that my code follows RMT's coding standards with rubocop.
  • 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.
  • RMT's test coverage remains at 100%.
  • If my changes are non-trivial, I have added a changelog entry to notify users at package/obs/rmt-server.changes.

Other Notes

Please use this space to provide notes or thoughts to the team, such as tips on how to review/demo your changes.

@jesusbv jesusbv requested review from bear454 and rjschwei May 10, 2024 17:12
@jesusbv jesusbv self-assigned this May 10, 2024
)
# write repository cache
repository_cache_path = InstanceVerification.repository_cache_path(remote_ip, system_login, product_id)
InstanceVerification.write_cache_file(repository_cache_path) unless registry
Copy link
Member

Choose a reason for hiding this comment

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

We are already in an unless registry context, why do we need to test that again?

Also via the activations endpoint from the client side we do not send the product, because it is already known. Thus the question is whether we need the registry argument at all. If we have no product_id then we are on the registry path through the code, are we not?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good question, I was not 100% sure we could use the product identifier to differentiate between repositories/registry calls. I think we can

I will update this PR once #1149 is merged, so the changes can be applied to this one

- Remove registry cache in the same engine that it is created
- Get repository and registry cache paths in one place to avoid duplication
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants