katello 4.16.0.rc1 → 4.16.0.rc2

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: a4dbecbe0ea63d269d079ba27290c0555a840d56a20ea99d819fc5b29dd4f9ce
4
- data.tar.gz: 277fec506ee6f0e7489a19215940c08d0a84f92d699aebd578a539ea1497b699
3
+ metadata.gz: f6ecb6347baf2c799dbe9d379a919b386d066fb16447ebdb7b5b940a9ae7329e
4
+ data.tar.gz: dea48f30f60751b97523e93e5d9dfa35b516d66feaeceb31808ba9b0ed0fed7b
5
5
  SHA512:
6
- metadata.gz: 045d712597dfe3cda9f5d5d654355d972894dcde66b1c9cad647cddcafd7d5d999c04f791b27da067fb1f0961be6383f4385799273ad97975f5f69e28592dc59
7
- data.tar.gz: 4586f525f1a2feb056723c321830cb384133e7b4701139281b8122c5c029e0e4bde0f6e000a9522cc27bf94abaf0f2d40afe027c76667ecd965b1702f9cd35ef
6
+ metadata.gz: a1dfd988175ae50e81a44dd84aa9fd5bc725ed5d8f53a89c15534fae391d2f50958077ba4c8b2c809287f14b50a3339594fabcf593d9aca20ffbeb446d6375cf
7
+ data.tar.gz: 4feb89b53b4727e8344ac7e03335e7dea113c3cf496430a6309116f4552e6a404b5d68df8d1a58a04c3d0a27e9125c8736ad1148f16cc746b63829145f4398d4
@@ -146,13 +146,13 @@ KT.hosts.onKatelloHostEditLoad = function(){
146
146
 
147
147
  $.each(prefixes, function(index, prefix) {
148
148
  $.each(attributes, function(attrIndex, attribute) {
149
- $('body').on('change', '#' + prefix + '_' + attribute, function () {
149
+ $('body').on('select2:select select2:unselecting', '#' + prefix + '_' + attribute, function () {
150
150
  KT.hosts.toggle_installation_medium();
151
151
  });
152
152
  });
153
153
  });
154
154
 
155
- $('body').on('change', '#content_source_id', function () {
155
+ $('body').on('select2:select select2:unselecting', '#content_source_id', function () {
156
156
  KT.hosts.contentSourceChanged();
157
157
  KT.hosts.toggle_installation_medium();
158
158
  });
@@ -266,14 +266,15 @@ KT.hosts.on_synced_content_dropdown_change = function() {
266
266
 
267
267
  KT.hosts.set_install_media_bindings = function() {
268
268
  // reset the host medium id
269
- $("#host_medium_id").on("change", KT.hosts.on_install_media_dropdown_change);
270
- $("#s2id_host_medium_id").on("change", KT.hosts.on_install_media_dropdown_change);
271
- $("#hostgroup_medium_id").on("change", KT.hosts.on_install_media_dropdown_change);
272
- $("#s2id_hostgroup_medium_id").on("change", KT.hosts.on_install_media_dropdown_change);
269
+ $("#host_medium_id").on("select2:select", KT.hosts.on_install_media_dropdown_change);
270
+ $("#s2id_host_medium_id").on("select2:select", KT.hosts.on_install_media_dropdown_change);
271
+ $("#hostgroup_medium_id").on("select2:select", KT.hosts.on_install_media_dropdown_change);
272
+ $("#s2id_hostgroup_medium_id").on("select2:select", KT.hosts.on_install_media_dropdown_change);
273
273
  };
274
-
275
274
  KT.hosts.set_synced_content_bindings = function() {
276
- KT.hosts.get_synced_content_dropdown().change(KT.hosts.on_synced_content_dropdown_change);
275
+ KT.hosts
276
+ .get_synced_content_dropdown()
277
+ .on('select2:select', KT.hosts.on_synced_content_dropdown_change);
277
278
  };
278
279
 
279
280
  KT.hosts.set_media_selection_bindings = function() {
@@ -23,7 +23,19 @@ module Katello
23
23
  end
24
24
 
25
25
  rescue_from RestClient::Exception do |e|
26
- Rails.logger.error pp_exception(e)
26
+ # Log BLOB_UNKNOWN errors as info.
27
+ # These 404s occur as part of podman push's blob lookup and should not be reported as errors.
28
+ if e.http_code == 404
29
+ body = JSON.parse(e.http_body) rescue {}
30
+ if body["errors"]&.any? { |error| error["code"] == "BLOB_UNKNOWN" }
31
+ Rails.logger.info pp_exception(e)
32
+ else
33
+ Rails.logger.error pp_exception(e)
34
+ end
35
+ else
36
+ Rails.logger.error pp_exception(e)
37
+ end
38
+
27
39
  if request_from_katello_cli?
28
40
  render json: { errors: [e.http_body] }, status: e.http_code
29
41
  else
@@ -12,6 +12,11 @@ module Actions
12
12
  solve_dependencies: solve_dependencies)
13
13
  plan_action(Actions::Pulp3::Repository::SaveVersions, extended_repo_map.values.pluck(:dest_repo),
14
14
  tasks: copy_action.output[:pulp_tasks])
15
+ repo_id_map = {}
16
+ extended_repo_map.each do |source_repos, dest_repo_map|
17
+ repo_id_map[source_repos.first.id] = dest_repo_map[:dest_repo].id if dest_repo_map[:filters].blank?
18
+ end
19
+ plan_self(repo_id_map: repo_id_map)
15
20
  end
16
21
  else
17
22
  repo_id_map = {}
@@ -42,12 +42,12 @@ module Katello
42
42
  :through => :content_view_environments
43
43
  has_many :content_facets, :class_name => "Katello::Host::ContentFacet", :through => :content_view_environment_content_facets,
44
44
  :inverse_of => :content_views
45
- has_many :hosts, :class_name => "::Host::Managed", :through => :content_facets,
45
+ has_many :hosts, -> { reorder(:id).distinct }, :class_name => "::Host::Managed", :through => :content_facets,
46
46
  :inverse_of => :content_views
47
47
 
48
48
  has_many :content_view_environment_activation_keys, :class_name => "Katello::ContentViewEnvironmentActivationKey",
49
49
  :through => :content_view_environments
50
- has_many :activation_keys, :class_name => "Katello::ActivationKey", :through => :content_view_environment_activation_keys,
50
+ has_many :activation_keys, -> { reorder(:id).distinct }, :class_name => "Katello::ActivationKey", :through => :content_view_environment_activation_keys,
51
51
  :inverse_of => :content_views
52
52
 
53
53
  has_many :hostgroup_content_facets, :class_name => "Katello::Hostgroup::ContentFacet",
@@ -1046,6 +1046,7 @@ module Katello
1046
1046
 
1047
1047
  def deb_content_url_options
1048
1048
  return '' unless version_href
1049
+ return '' if backend_service(SmartProxy.pulp_primary).version_missing_structure_content?
1049
1050
 
1050
1051
  components = deb_pulp_components.join(',')
1051
1052
  distributions = deb_pulp_distributions.join(',')
@@ -39,7 +39,7 @@ module Katello
39
39
  end
40
40
 
41
41
  def mirror_remote_options
42
- distributions = if repo.deb_using_structured_apt?
42
+ distributions = if repo.deb_using_structured_apt? && !version_missing_structure_content?
43
43
  repo.deb_pulp_distributions.join(' ')
44
44
  else
45
45
  'default'
@@ -48,11 +48,29 @@ module Katello
48
48
  super.merge({distributions: distributions})
49
49
  end
50
50
 
51
+ def version_missing_structure_content?
52
+ # There may be old pulp_deb repo versions that have no package_release_components to go with the packages.
53
+ # This could be because packages were uploaded with Katello < 4.12
54
+ # It may also affect filtered CV versions created with very old Katello versions.
55
+ # This method can identify such cases, so that we may fall back to simple publishing.
56
+ return false if repo.version_href.blank?
57
+ # We cannot just use api here, because this is sometimes the proxy api, and we always want to talk to the primary!
58
+ api_primary = self.class.instance_for_type(repo, ::SmartProxy.pulp_primary).api
59
+ version = api_primary.repository_versions_api.read(repo.version_href)
60
+ apt_content_types = version&.content_summary&.present&.keys
61
+ return apt_content_types.include?('deb.package') && !apt_content_types.include?('deb.package_release_component')
62
+ end
63
+
51
64
  def publication_options(repository)
52
65
  ss = api.signing_services_api.list(name: SIGNING_SERVICE_NAME).results
53
66
  popts = super(repository)
54
- popts.merge!({ structured: true })
55
- popts.merge!({ simple: true }) unless repository.deb_using_structured_apt?
67
+ if version_missing_structure_content?
68
+ popts.merge!({ structured: false })
69
+ popts.merge!({ simple: true })
70
+ else
71
+ popts.merge!({ structured: true })
72
+ popts.merge!({ simple: true }) unless repository.deb_using_structured_apt?
73
+ end
56
74
  popts[:signing_service] = ss[0].pulp_href if ss && ss.length == 1
57
75
  popts
58
76
  end
@@ -39,6 +39,8 @@ child :content_facet => :content_facet_attributes do
39
39
  node(:view_activation_keys) { user.can?("view_activation_keys") }
40
40
  node(:view_products) { user.can?("view_products") }
41
41
  node(:create_bookmarks) { user.can?("create_bookmarks") }
42
+ node(:view_smart_proxies) { user.can?("view_smart_proxies") }
43
+ node(:view_capsule_content) { user.can?("view_capsule_content") }
42
44
  end
43
45
  end
44
46
 
@@ -5,8 +5,9 @@
5
5
  option.kt-cv { margin-left: 1em; }
6
6
  </style>
7
7
  <% spinner_path = asset_path('spinner.gif') %>
8
+ <% can_change_content_source = User.current.can?("view_smart_proxies") && User.current.can?("view_capsule_content") %>
8
9
 
9
- <% if edit_action? && !using_hostgroups_page? && !using_discovered_hosts_page? %>
10
+ <% if edit_action? && !using_hostgroups_page? && !using_discovered_hosts_page? && can_change_content_source %>
10
11
  <div style="margin-left: 270px">
11
12
  <%= link_to _("Change content source"), "/change_host_content_source?fromPage=hostEdit&host_id=#{@host.id}&initialContentSourceId=#{@host.content_source_id}" %>
12
13
  </div>
@@ -56,6 +56,7 @@
56
56
  <select ng-hide="contentViews.length === 0 || activationKey.environment === undefined "
57
57
  id="content_view_id"
58
58
  name="content_view_id"
59
+ ng-required="activationKey.environment"
59
60
  ng-model="activationKey.content_view_id"
60
61
  ng-options="contentView.id as contentView.name for contentView in contentViews"
61
62
  autofocus>
@@ -64,7 +65,7 @@
64
65
  The selected environment contains no Content Views, please select a different environment.
65
66
  </span>
66
67
  <span class="help-block" ng-show="activationKey.environment === undefined" translate>
67
- Please select an environment.
68
+ Please select a lifecycle environment. Lifecycle environment and content view must be provided together.
68
69
  </span>
69
70
  </div>
70
71
  </span>
@@ -27,12 +27,14 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkReleaseVersi
27
27
  }
28
28
 
29
29
  $scope.selected = {
30
- release: undefined
30
+ release: ""
31
31
  };
32
32
  $scope.fetchingReleases = true;
33
33
 
34
34
  Organization.releaseVersions({id: CurrentOrganization}, function (response) {
35
35
  $scope.releases = response.results;
36
+ // Add empty string to unset the release version
37
+ $scope.releases.unshift("");
36
38
  $scope.fetchingReleases = false;
37
39
  });
38
40
 
@@ -27,7 +27,7 @@
27
27
  <i ng-show="fetchingReleases" class="fa fa-spinner inline-icon fa-spin"></i>
28
28
  <select ng-hide="fetchingReleases || releases.length === 0"
29
29
  type="select"
30
- ng-options="release for release in releases"
30
+ ng-options="release === '' ? '(unset)' : release for release in releases"
31
31
  ng-model="selected.release">
32
32
  </select>
33
33
 
@@ -1,3 +1,3 @@
1
1
  module Katello
2
- VERSION = "4.16.0.rc1".freeze
2
+ VERSION = "4.16.0.rc2".freeze
3
3
  end
@@ -31,9 +31,7 @@ const hostsIndexColumnExtensions = [
31
31
  {
32
32
  columnName: 'bootc_booted_image',
33
33
  title: (
34
- <span id="image-mode-column-title-icon">
35
- <FontAwesomeImageModeIcon title={__('Image mode / package mode')} />
36
- </span>
34
+ <Text title={__('Image mode / package mode')} ouiaId="image-mode-column-title" className="pf-c-table__text">{__('Type')}</Text>
37
35
  ),
38
36
  wrapper: (hostDetails) => {
39
37
  const imageMode = hostDetails?.content_facet_attributes?.bootc_booted_image;
@@ -22,6 +22,9 @@ const HostActionsBar = () => {
22
22
  const recalculateApplicability = ['edit_hosts', 'create_job_invocations'];
23
23
  const showRecalculate =
24
24
  can(recalculateApplicability, userPermissionsFromHostDetails({ hostDetails }));
25
+ const changeContentSource = ['view_smart_proxies', 'view_capsule_content'];
26
+ const showChangeContentSource =
27
+ can(changeContentSource, userPermissionsFromHostDetails({ hostDetails }));
25
28
 
26
29
  const refreshHostDetails = () => dispatch({
27
30
  type: 'API_GET',
@@ -62,14 +65,17 @@ const HostActionsBar = () => {
62
65
  </DropdownItem>
63
66
  )
64
67
  }
65
- <DropdownItem
66
- ouiaId="katello-change-host-content-source"
67
- key="katello-change-host-content-source"
68
- href={foremanUrl(`/change_host_content_source?host_id=${hostDetails?.id}&initialContentSourceId=${hostDetails?.content_facet_attributes?.content_source_id}`)}
69
- icon={<CubeIcon />}
70
- >
71
- {__('Change content source')}
72
- </DropdownItem>
68
+ {showChangeContentSource && (
69
+ <DropdownItem
70
+ ouiaId="katello-change-host-content-source"
71
+ key="katello-change-host-content-source"
72
+ href={foremanUrl(`/change_host_content_source?host_id=${hostDetails?.id}&initialContentSourceId=${hostDetails?.content_facet_attributes?.content_source_id}`)}
73
+ icon={<CubeIcon />}
74
+ >
75
+ {__('Change content source')}
76
+ </DropdownItem>
77
+ )
78
+ }
73
79
  </>
74
80
  );
75
81
  };
@@ -42,12 +42,9 @@ const recommendedRepositoriesSatTools = [
42
42
  ];
43
43
 
44
44
  const recommendedRepositoriesMisc = [
45
- 'satellite-capsule-6.16-for-rhel-8-x86_64-rpms',
46
- 'satellite-maintenance-6.16-for-rhel-8-x86_64-rpms',
47
- 'satellite-utils-6.16-for-rhel-8-x86_64-rpms',
48
- 'satellite-utils-6.16-for-rhel-9-x86_64-rpms',
49
- 'satellite-maintenance-6.16-for-rhel-9-x86_64-rpms',
50
- 'satellite-capsule-6.16-for-rhel-9-x86_64-rpms',
45
+ 'satellite-utils-6.17-for-rhel-9-x86_64-rpms',
46
+ 'satellite-maintenance-6.17-for-rhel-9-x86_64-rpms',
47
+ 'satellite-capsule-6.17-for-rhel-9-x86_64-rpms',
51
48
  ];
52
49
 
53
50
  const recommendedRepositorySetLables = recommendedRepositoriesRHEL
@@ -134,40 +134,42 @@ const BootedContainerImagesPage = () => {
134
134
  </>
135
135
  </Tr>
136
136
  </Thead>
137
- <Tbody>
138
- {status === STATUS.PENDING && results.length === 0 && (
139
- <Tr ouiaId="table-loading">
140
- <Td colSpan={100}>
141
- <EmptyPage
142
- message={{
143
- type: 'loading',
144
- text: __('Loading...'),
145
- }}
146
- />
147
- </Td>
148
- </Tr>
149
- )}
150
- {!(status === STATUS.PENDING) &&
151
- results.length === 0 &&
152
- !errorMessage && (
153
- <Tr ouiaId="table-empty">
137
+ {(results.length === 0 || errorMessage) && (
138
+ <Tbody>
139
+ {status === STATUS.PENDING && results.length === 0 && (
140
+ <Tr ouiaId="table-loading">
154
141
  <Td colSpan={100}>
155
142
  <EmptyPage
156
143
  message={{
157
- type: 'empty',
144
+ type: 'loading',
145
+ text: __('Loading...'),
158
146
  }}
159
147
  />
160
148
  </Td>
161
149
  </Tr>
162
- )}
163
- {errorMessage && (
164
- <Tr ouiaId="table-error">
165
- <Td colSpan={100}>
166
- <EmptyPage message={{ type: 'error', text: errorMessage }} />
167
- </Td>
168
- </Tr>
169
- )}
170
- </Tbody>
150
+ )}
151
+ {!(status === STATUS.PENDING) &&
152
+ results.length === 0 &&
153
+ !errorMessage && (
154
+ <Tr ouiaId="table-empty">
155
+ <Td colSpan={100}>
156
+ <EmptyPage
157
+ message={{
158
+ type: 'empty',
159
+ }}
160
+ />
161
+ </Td>
162
+ </Tr>
163
+ )}
164
+ {errorMessage && (
165
+ <Tr ouiaId="table-error">
166
+ <Td colSpan={100}>
167
+ <EmptyPage message={{ type: 'error', text: errorMessage }} />
168
+ </Td>
169
+ </Tr>
170
+ )}
171
+ </Tbody>
172
+ )}
171
173
  {results?.map((result, rowIndex) => {
172
174
  const { bootc_booted_image: bootcBootedImage, digests } = result;
173
175
  const isExpanded = imageIsExpanded(bootcBootedImage);
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.16.0.rc1
4
+ version: 4.16.0.rc2
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-02-20 00:00:00.000000000 Z
11
+ date: 2025-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails