katello 4.17.1 → 4.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of katello might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 522d23e5be01ddc111e940e111a09d858a2dfa686c9cbb17ac0c883b14f224bc
4
- data.tar.gz: 6f6dc2887f0eafdd0500edeb62792318da9bd25612565fcef2027423b364d2c5
3
+ metadata.gz: 89755fa3c2987395a5af752bbf273da998d09d4f0f45029915596c04ecf60eb1
4
+ data.tar.gz: 18d7cebcfd3dc55158d2eaec48db546d9b6253ddd9d645c4560a4182dd68e19f
5
5
  SHA512:
6
- metadata.gz: 597e47e1205993f0223f0151f24accea76c030eb0a98536f9b9e05cb1d1f49341c69543bf79a4781b700fa948f6df53769dbaa44d6c54399f504362bd1729b68
7
- data.tar.gz: 263fe1e31f8469f6a7ea74c932c1fa8bab9769200d72aca0f3a94c47d5772a4a5c8c10661ea1abe0bebdcc53b416584fa17a98c1c12e1a94e8519eab4fbf93b9
6
+ metadata.gz: 9e1649be7b107364a96ddd4cd07b82b048dc50ef7046e2570ea0ca38bd5bd787360d9a072cdb77fc62fa20f20ed129f6940d9ebfbebfd50f3972c2f4bffb866d
7
+ data.tar.gz: cd12cfad7c854933a4a8418715b0d86bd920f0840d4acf42c314790e89ad531a21b258cf2fdad84c8808aa138f7f236d143c65d1d60bc1ca8a479536496ad7b8
@@ -0,0 +1,12 @@
1
+ module Actions
2
+ module Helpers
3
+ module SmartProxySyncHelper
4
+ def schedule_async_repository_proxy_sync(repository)
5
+ return unless Setting[:foreman_proxy_content_auto_sync]
6
+ if SmartProxy.unscoped.pulpcore_proxies_with_environment(repository.environment).exists?
7
+ ForemanTasks.async_task(::Actions::Katello::Repository::CapsuleSync, repository)
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
@@ -2,6 +2,8 @@ module Actions
2
2
  module Katello
3
3
  module ContentView
4
4
  class AddRollingRepoClone < Actions::EntryAction
5
+ include Helpers::SmartProxySyncHelper
6
+
5
7
  def plan(content_view, repository_ids)
6
8
  library = content_view.organization.library
7
9
  clone_ids = []
@@ -27,10 +29,8 @@ module Actions
27
29
  end
28
30
 
29
31
  def run
30
- if Setting[:foreman_proxy_content_auto_sync]
31
- ::Katello::Repository.where(id: input[:repository_ids]).each do |repo|
32
- ForemanTasks.async_task(::Actions::Katello::Repository::CapsuleSync, repo)
33
- end
32
+ ::Katello::Repository.where(id: input[:repository_ids]).each do |repository|
33
+ schedule_async_repository_proxy_sync(repository)
34
34
  end
35
35
  end
36
36
  end
@@ -20,7 +20,15 @@ module Actions
20
20
  end
21
21
 
22
22
  def run
23
- ::Katello::Repository.where(id: input[:repository_ids]).destroy_all
23
+ ::Katello::Repository.where(id: input[:repository_ids]).each do |repository|
24
+ SmartProxy.unscoped.with_repo(repository).each do |smart_proxy|
25
+ next if smart_proxy.pulp_primary?
26
+
27
+ smart_proxy.content_counts&.dig("content_view_versions", repository.content_view_version_id.to_s, "repositories")&.delete(repository.id.to_s)
28
+ smart_proxy.save
29
+ end
30
+ repository.destroy!
31
+ end
24
32
  end
25
33
  end
26
34
  end
@@ -96,8 +96,9 @@ module Actions
96
96
  end
97
97
 
98
98
  def handle_redhat_content(repository)
99
- if repository.content_view.content_view_environment(repository.environment)
100
- plan_action(Candlepin::Environment::SetContent, repository.content_view, repository.environment, repository.content_view.content_view_environment(repository.environment))
99
+ content_view_environment = repository.content_view.content_view_environment(repository.environment)
100
+ if content_view_environment && !repository.content_view.rolling?
101
+ plan_action(Candlepin::Environment::SetContent, repository.content_view, repository.environment, content_view_environment)
101
102
  end
102
103
  end
103
104
 
@@ -4,6 +4,7 @@ module Actions
4
4
  module Repository
5
5
  class ImportUpload < Actions::EntryAction
6
6
  include Helpers::RollingCVRepos
7
+ include Helpers::SmartProxySyncHelper
7
8
 
8
9
  # rubocop:disable Metrics/MethodLength
9
10
  def plan(repository, uploads, options = {})
@@ -63,9 +64,7 @@ module Actions
63
64
 
64
65
  def run
65
66
  repository = ::Katello::Repository.find(input[:repository_id])
66
- if input[:sync_capsule] && (Setting[:foreman_proxy_content_auto_sync])
67
- ForemanTasks.async_task(Katello::Repository::CapsuleSync, repository)
68
- end
67
+ schedule_async_repository_proxy_sync(repository) if input[:sync_capsule]
69
68
  output[:upload_results] = results_to_json(input[:upload_results])
70
69
  rescue ::Katello::Errors::CapsuleCannotBeReached # skip any capsules that cannot be connected to
71
70
  end
@@ -6,6 +6,7 @@ module Actions
6
6
  extend ApipieDSL::Class
7
7
  include Helpers::Presenter
8
8
  include Helpers::RollingCVRepos
9
+ include Helpers::SmartProxySyncHelper
9
10
  include ::Actions::ObservableAction
10
11
  middleware.use Actions::Middleware::ExecuteIfContentsChanged
11
12
 
@@ -72,7 +73,7 @@ module Actions
72
73
  update_rolling_content_views_async(repo, input[:contents_changed])
73
74
  end
74
75
  repo.clear_smart_proxy_sync_histories if input[:contents_changed]
75
- ForemanTasks.async_task(Repository::CapsuleSync, repo) if Setting[:foreman_proxy_content_auto_sync]
76
+ schedule_async_repository_proxy_sync(repo)
76
77
  rescue ::Katello::Errors::CapsuleCannotBeReached # skip any capsules that cannot be connected to
77
78
  end
78
79
 
@@ -7,6 +7,7 @@ module Actions
7
7
  module Repository
8
8
  class UploadFiles < Actions::EntryAction
9
9
  include Helpers::RollingCVRepos
10
+ include Helpers::SmartProxySyncHelper
10
11
 
11
12
  def plan(repository, files, content_type = nil, options = {})
12
13
  action_subject(repository)
@@ -52,7 +53,7 @@ module Actions
52
53
 
53
54
  def run
54
55
  repository = ::Katello::Repository.find(input[:repository][:id])
55
- ForemanTasks.async_task(Repository::CapsuleSync, repository) if Setting[:foreman_proxy_content_auto_sync]
56
+ schedule_async_repository_proxy_sync(repository)
56
57
  rescue ::Katello::Errors::CapsuleCannotBeReached # skip any capsules that cannot be connected to
57
58
  end
58
59
 
@@ -4,8 +4,6 @@ module Katello
4
4
 
5
5
  CONTENT_TYPE = 'deb'.freeze
6
6
 
7
- has_many :repository_debs, :class_name => "Katello::RepositoryDeb", :dependent => :destroy, :inverse_of => :deb
8
- has_many :repositories, :through => :repository_debs, :class_name => "Katello::Repository"
9
7
  has_many :content_facet_applicable_debs, :class_name => "Katello::ContentFacetApplicableDeb",
10
8
  :dependent => :destroy, :inverse_of => :deb
11
9
  has_many :content_facets, :through => :content_facet_applicable_debs, :class_name => "Katello::Host::ContentFacet"
@@ -1,3 +1,3 @@
1
1
  module Katello
2
- VERSION = "4.17.1".freeze
2
+ VERSION = "4.17.2".freeze
3
3
  end
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katello
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.17.1
4
+ version: 4.17.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - N/A
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-07-31 00:00:00.000000000 Z
11
+ date: 2025-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -87,6 +87,9 @@ dependencies:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '9.1'
90
+ - - "<"
91
+ - !ruby/object:Gem::Version
92
+ version: 11.0.1
90
93
  type: :runtime
91
94
  prerelease: false
92
95
  version_requirements: !ruby/object:Gem::Requirement
@@ -94,6 +97,9 @@ dependencies:
94
97
  - - ">="
95
98
  - !ruby/object:Gem::Version
96
99
  version: '9.1'
100
+ - - "<"
101
+ - !ruby/object:Gem::Version
102
+ version: 11.0.1
97
103
  - !ruby/object:Gem::Dependency
98
104
  name: foreman_remote_execution
99
105
  requirement: !ruby/object:Gem::Requirement
@@ -101,6 +107,9 @@ dependencies:
101
107
  - - ">="
102
108
  - !ruby/object:Gem::Version
103
109
  version: 7.1.0
110
+ - - "<"
111
+ - !ruby/object:Gem::Version
112
+ version: 16.2.0
104
113
  type: :runtime
105
114
  prerelease: false
106
115
  version_requirements: !ruby/object:Gem::Requirement
@@ -108,6 +117,9 @@ dependencies:
108
117
  - - ">="
109
118
  - !ruby/object:Gem::Version
110
119
  version: 7.1.0
120
+ - - "<"
121
+ - !ruby/object:Gem::Version
122
+ version: 16.2.0
111
123
  - !ruby/object:Gem::Dependency
112
124
  name: dynflow
113
125
  requirement: !ruby/object:Gem::Requirement
@@ -800,6 +812,7 @@ files:
800
812
  - app/lib/actions/helpers/output_propagator.rb
801
813
  - app/lib/actions/helpers/presenter.rb
802
814
  - app/lib/actions/helpers/rolling_cv_repos.rb
815
+ - app/lib/actions/helpers/smart_proxy_sync_helper.rb
803
816
  - app/lib/actions/helpers/smart_proxy_sync_history_helper.rb
804
817
  - app/lib/actions/katello/activation_key/create.rb
805
818
  - app/lib/actions/katello/activation_key/destroy.rb
@@ -5549,7 +5562,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
5549
5562
  - !ruby/object:Gem::Version
5550
5563
  version: '0'
5551
5564
  requirements: []
5552
- rubygems_version: 3.5.22
5565
+ rubygems_version: 3.1.6
5553
5566
  signing_key:
5554
5567
  specification_version: 4
5555
5568
  summary: Content and Subscription Management plugin for Foreman