-
Notifications
You must be signed in to change notification settings - Fork 284
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
Fixes #36436 - Don't sync generated repos to capsules #10572
Fixes #36436 - Don't sync generated repos to capsules #10572
Conversation
Issues: #36436 |
0663e97
to
d03fefe
Compare
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.
This is working fine for me! I'm not seeing any of the generated repositories get synced to the capsule.
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.
I'm cool with this!
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.
I think having a setting to toggle the importable content view would be best and solve the case of preventing the user from synchronizing it to the capsule and for a scenario like a customer can't physically get to the capsule to import the files, edge cases, then they can enable the setting and have it sync.
With how import/export is, can a customer do anything with the generated repos synced to a capsule? We'd need to make sure that use case is documented so users don't get more confused. Also, from the bug description on the Redmine, it sounds like the certs can get messed up. |
app/models/katello/content_view.rb
Outdated
:repository_import, | ||
:library_export_syncable, | ||
:repository_export_syncable]) | ||
scope :ignore_generated, ->(include_library_generated = false) { |
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.
Shouldn't this be
scope :ignore_generated, ->(include_library_generated = false) { | |
scope :ignore_generated, ->(include_library_generated: false) { |
@@ -32,7 +37,7 @@ def clear_smart_proxy_sync_histories(repo_list = []) | |||
|
|||
def combined_repos_available_to_capsule(environment = nil, content_view = nil, repository = nil) | |||
lifecycle_environment_check(environment, repository) | |||
if repository | |||
if repository && !(library_export_repo repository) |
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.
if repository && !(library_export_repo repository) | |
if repository && !(library_export_repo(repository)) |
LGTM other than the 2 suggested changes |
d03fefe
to
518dff5
Compare
:repository_import, | ||
:library_export_syncable, | ||
:repository_export_syncable]) | ||
scope :ignore_generated, ->(include_library_generated: false) { |
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.
Can you add a simple model unit test for this scope (just ensure the params are getting set correctly)
Pushed the update. |
518dff5
to
fc2f998
Compare
fc2f998
to
d874dd9
Compare
ACK |
(cherry picked from commit 70c4a6f)
(cherry picked from commit 70c4a6f)
What are the changes introduced in this pull request?
Opening this up for reviews.
Considerations taken when implementing this change?
I am not so sure if we need to ignore all generated CV repos. That's what I have here but if we want to narrow it down to all exported repos only, I can make that change.
What are the testing steps for this pull request?
In hammer do a repo export, library export, import and other operations.
These generated repos should not get synced to the capsule tied to the environment or library.