katello 4.13.0.rc1 → 4.13.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +334 -23
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +8 -0
- data/app/controllers/katello/api/v2/repositories_controller.rb +1 -1
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +7 -2
- data/app/lib/actions/katello/organization/manifest_delete.rb +6 -1
- data/app/lib/actions/katello/repository/create.rb +17 -11
- data/app/lib/actions/katello/repository/create_root.rb +4 -2
- data/app/lib/actions/katello/repository/discover.rb +11 -4
- data/app/lib/actions/katello/upstream_subscriptions/bind_entitlement.rb +1 -1
- data/app/lib/actions/pulp3/orchestration/orphan_cleanup/remove_orphans.rb +1 -0
- data/app/lib/actions/pulp3/orphan_cleanup/purge_completed_tasks.rb +15 -0
- data/app/lib/actions/pulp3/repository/create_publication.rb +4 -0
- data/app/lib/katello/repo_discovery.rb +4 -190
- data/app/lib/katello/resources/discovery/container.rb +127 -0
- data/app/lib/katello/resources/discovery/yum.rb +95 -0
- data/app/lib/katello/util/http_helper.rb +15 -0
- data/app/models/732bd3db9f64c621c64d2be4f2a838727aac0845.patch +61 -0
- data/app/models/katello/content_view.rb +2 -0
- data/app/models/katello/glue/pulp/repos.rb +8 -1
- data/app/models/katello/repository.rb +5 -1
- data/app/models/katello/repository.rb.bak +978 -0
- data/app/models/katello/root_repository.rb +14 -2
- data/app/models/katello/trace_status.rb +1 -1
- data/app/services/katello/pulp3/api/core.rb +8 -0
- data/app/services/katello/pulp3/api/docker.rb +4 -0
- data/app/services/katello/pulp3/content_view_version/import_validator.rb.bak +166 -0
- data/app/services/katello/pulp3/content_view_version/importable_repositories.rb.bak +164 -0
- data/app/services/katello/pulp3/repository/yum.rb +1 -6
- data/app/services/katello/repository_type.rb +1 -1
- data/app/views/foreman/smart_proxies/_content_tab.html.erb +3 -1
- data/config/initializers/monkeys.rb +0 -1
- data/db/migrate/20240520142245_add_container_push_props_to_repo.rb +7 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/checksum.service.js +6 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +0 -3
- data/lib/katello/plugin.rb +12 -0
- data/lib/katello/repository_types/docker.rb +1 -0
- data/lib/katello/repository_types/yum.rb +1 -0
- data/lib/katello/tasks/update_repository_expiry.rake +114 -0
- data/lib/katello/version.rb +1 -1
- data/lib/katello.rb +0 -2
- data/locale/bn/katello.po.time_stamp +0 -0
- data/locale/bn_IN/katello.po.time_stamp +0 -0
- data/locale/ca/katello.po.time_stamp +0 -0
- data/locale/cs/katello.po.time_stamp +0 -0
- data/locale/cs_CZ/katello.po.time_stamp +0 -0
- data/locale/de/katello.po.time_stamp +0 -0
- data/locale/de_AT/katello.po.time_stamp +0 -0
- data/locale/de_DE/katello.po.time_stamp +0 -0
- data/locale/el/katello.po.time_stamp +0 -0
- data/locale/en/katello.po.time_stamp +0 -0
- data/locale/en_GB/katello.po.time_stamp +0 -0
- data/locale/en_US/katello.po.time_stamp +0 -0
- data/locale/es/katello.po.time_stamp +0 -0
- data/locale/et_EE/katello.po.time_stamp +0 -0
- data/locale/fr/katello.po.time_stamp +0 -0
- data/locale/gl/katello.po.time_stamp +0 -0
- data/locale/gu/katello.po.time_stamp +0 -0
- data/locale/he_IL/katello.po.time_stamp +0 -0
- data/locale/hi/katello.po.time_stamp +0 -0
- data/locale/id/katello.po.time_stamp +0 -0
- data/locale/it/katello.po.time_stamp +0 -0
- data/locale/ja/katello.po.time_stamp +0 -0
- data/locale/ka/katello.po.time_stamp +0 -0
- data/locale/kn/katello.po.time_stamp +0 -0
- data/locale/ko/katello.po.time_stamp +0 -0
- data/locale/ml_IN/katello.po.time_stamp +0 -0
- data/locale/mr/katello.po.time_stamp +0 -0
- data/locale/nl_NL/katello.po.time_stamp +0 -0
- data/locale/or/katello.po.time_stamp +0 -0
- data/locale/pa/katello.po.time_stamp +0 -0
- data/locale/pl/katello.po.time_stamp +0 -0
- data/locale/pl_PL/katello.po.time_stamp +0 -0
- data/locale/pt/katello.po.time_stamp +0 -0
- data/locale/pt_BR/katello.po.time_stamp +0 -0
- data/locale/ro/katello.po.time_stamp +0 -0
- data/locale/ro_RO/katello.po.time_stamp +0 -0
- data/locale/ru/katello.po.time_stamp +0 -0
- data/locale/sl/katello.po.time_stamp +0 -0
- data/locale/sv_SE/katello.po.time_stamp +0 -0
- data/locale/ta/katello.po.time_stamp +0 -0
- data/locale/ta_IN/katello.po.time_stamp +0 -0
- data/locale/te/katello.po.time_stamp +0 -0
- data/locale/tr/katello.po.time_stamp +0 -0
- data/locale/vi/katello.po.time_stamp +0 -0
- data/locale/vi_VN/katello.po.time_stamp +0 -0
- data/locale/zh/katello.po.time_stamp +0 -0
- data/locale/zh_CN/katello.po.time_stamp +0 -0
- data/locale/zh_TW/katello.po.time_stamp +0 -0
- data/package.json +0 -1
- data/webpack/components/Content/ContentTable.js +0 -1
- data/webpack/components/Content/__tests__/__snapshots__/ContentTable.test.js.snap +0 -1
- data/webpack/global_test_setup.js.bak +59 -0
- data/webpack/scenes/ModuleStreams/ModuleStreamsPage.js +33 -39
- data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamPage.test.js +4 -2
- data/webpack/scenes/ModuleStreams/__tests__/__snapshots__/ModuleStreamsTable.test.js.snap +0 -1
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +4 -2
- metadata +87 -28
- data/lib/monkeys/anemone.rb +0 -33
- data/webpack/utils/__tests__/useParamsWithHash.test.js +0 -22
- data/webpack/utils/paramsFromHash.js +0 -16
- data/webpack/utils/useUrlParams.js +0 -14
data/lib/katello.rb
CHANGED
@@ -8,7 +8,6 @@ require "gettext_i18n_rails"
|
|
8
8
|
require "foreman-tasks"
|
9
9
|
require "foreman_remote_execution"
|
10
10
|
require "rest_client"
|
11
|
-
require "anemone"
|
12
11
|
require "securerandom"
|
13
12
|
|
14
13
|
require "deface"
|
@@ -21,7 +20,6 @@ require lib_foreman if Dir.exist?(lib_foreman)
|
|
21
20
|
|
22
21
|
require File.expand_path("../engines/bastion/lib/bastion", File.dirname(__FILE__))
|
23
22
|
require File.expand_path("../engines/bastion_katello/lib/bastion_katello", File.dirname(__FILE__))
|
24
|
-
require "monkeys/anemone"
|
25
23
|
|
26
24
|
module Katello
|
27
25
|
require "katello/version"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/package.json
CHANGED
@@ -0,0 +1,59 @@
|
|
1
|
+
import nock from 'nock';
|
2
|
+
import checkForOuiaIds from './ouia_id_check';
|
3
|
+
|
4
|
+
// runs before each test to make sure console.error output will
|
5
|
+
// fail a test (i.e. default PropType missing). Check the error
|
6
|
+
// output and traceback for actual error.
|
7
|
+
const originalConsoleError = global.console.error;
|
8
|
+
global.console.error = (error, stack) => {
|
9
|
+
originalConsoleError(error); // ensure error is printed to console, comment
|
10
|
+
// in case of ouia-id check
|
11
|
+
|
12
|
+
/* Uncomment block below to filter out PF4 ouiaId errors */
|
13
|
+
// const ignore = ['in ForwardRef (created by Tabs)',
|
14
|
+
// 'in Button (created by Label)', 'created by _default',
|
15
|
+
// 'created by PaginationOptionsMenu', 'created by TypeAheadItems',
|
16
|
+
// 'The prop `ouiaId` is marked as required in `Modal`, but its value is `undefined`',
|
17
|
+
// 'created by WizardHeader', 'created by Navigation',
|
18
|
+
// 'created by ActionsColumn', 'created by InactiveText', 'created by Select',
|
19
|
+
// 'created by Context.Consumer', 'created by DualListSelector'];
|
20
|
+
|
21
|
+
/* eslint-disable-next-line no-console */
|
22
|
+
if (stack) console.log(stack); // Prints out original stack trace
|
23
|
+
|
24
|
+
/* Uncomment block below to filter out PF4 ouiaId errors */
|
25
|
+
// if (error && !ignore.some(e => error.includes(e))) {
|
26
|
+
// originalConsoleError(error); // ensure error is printed to console
|
27
|
+
// console.log(stack); // Prints out original stack trace
|
28
|
+
// }
|
29
|
+
|
30
|
+
throw new Error(error); // comment this and uncomment the next line when checking for ouia ids
|
31
|
+
// if (!error.includes('Failed prop type')) throw new Error(error);
|
32
|
+
};
|
33
|
+
|
34
|
+
// Increase jest timeout as some tests using multiple http mocks can time out on CI systems.
|
35
|
+
jest.setTimeout(process.env.JEST_TIMEOUT || 15000);
|
36
|
+
|
37
|
+
// uncomment this to see if tests are trying to make real API requests
|
38
|
+
// beforeAll(() => {
|
39
|
+
// nock.disableNetConnect();
|
40
|
+
// });
|
41
|
+
|
42
|
+
afterAll(() => {
|
43
|
+
jest.resetModules();
|
44
|
+
if (global.gc) global.gc();
|
45
|
+
});
|
46
|
+
|
47
|
+
beforeEach(() => {
|
48
|
+
if (!nock.isActive()) { nock.activate(); }
|
49
|
+
});
|
50
|
+
|
51
|
+
// To see where you need to add ouiaIds:
|
52
|
+
// 1. uncomment this and the import above
|
53
|
+
checkForOuiaIds();
|
54
|
+
// 2. (optional) uncomment the line in global.console.error function above
|
55
|
+
|
56
|
+
afterEach(() => {
|
57
|
+
nock.cleanAll();
|
58
|
+
});
|
59
|
+
|
@@ -1,59 +1,53 @@
|
|
1
|
-
import React, {
|
1
|
+
import React, { useState, useEffect } from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
|
-
import
|
3
|
+
import { useUrlParams } from 'foremanReact/components/PF4/TableIndexPage/Table/TableHooks';
|
4
4
|
import { translate as __ } from 'foremanReact/common/I18n';
|
5
5
|
import { orgId } from '../../services/api';
|
6
6
|
import TableSchema from '../ModuleStreams/ModuleStreamsTableSchema';
|
7
7
|
import GenericContentPage from '../../components/Content/GenericContentPage';
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
const ModuleStreamsPage = (props) => {
|
10
|
+
const { searchParam } = useUrlParams();
|
11
|
+
const [searchQuery, setSearchQuery] = useState(searchParam || '');
|
12
|
+
const { getModuleStreams } = props;
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
};
|
17
|
-
}
|
18
|
-
|
19
|
-
componentDidMount() {
|
20
|
-
this.props.getModuleStreams({
|
21
|
-
search: this.state.searchQuery,
|
14
|
+
useEffect(() => {
|
15
|
+
getModuleStreams({
|
16
|
+
search: searchQuery,
|
22
17
|
});
|
23
|
-
}
|
18
|
+
}, [getModuleStreams, searchQuery]);
|
24
19
|
|
25
|
-
onPaginationChange = (pagination) => {
|
26
|
-
|
20
|
+
const onPaginationChange = (pagination) => {
|
21
|
+
props.getModuleStreams({
|
27
22
|
...pagination,
|
28
23
|
});
|
29
24
|
};
|
30
25
|
|
31
|
-
onSearch = (search) => {
|
32
|
-
|
26
|
+
const onSearch = (search) => {
|
27
|
+
props.getModuleStreams({ search });
|
33
28
|
};
|
34
29
|
|
35
|
-
updateSearchQuery = (
|
36
|
-
|
30
|
+
const updateSearchQuery = (newSearchQuery) => {
|
31
|
+
setSearchQuery(newSearchQuery);
|
37
32
|
};
|
38
33
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
}
|
34
|
+
const { moduleStreams } = props;
|
35
|
+
return (
|
36
|
+
<GenericContentPage
|
37
|
+
header={__('Module Streams')}
|
38
|
+
content={moduleStreams}
|
39
|
+
tableSchema={TableSchema}
|
40
|
+
onSearch={onSearch}
|
41
|
+
autocompleteEndpoint="/katello/api/v2/module_streams"
|
42
|
+
autocompleteQueryParams={{ organization_id: orgId() }}
|
43
|
+
bookmarkController="katello_module_streams"
|
44
|
+
updateSearchQuery={updateSearchQuery}
|
45
|
+
initialInputValue={searchQuery}
|
46
|
+
onPaginationChange={onPaginationChange}
|
47
|
+
/>
|
48
|
+
);
|
49
|
+
};
|
50
|
+
|
57
51
|
|
58
52
|
ModuleStreamsPage.propTypes = {
|
59
53
|
location: PropTypes.shape({
|
@@ -1,19 +1,21 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { shallow } from 'enzyme';
|
3
3
|
import toJson from 'enzyme-to-json';
|
4
|
+
import * as hooks from 'foremanReact/components/PF4/TableIndexPage/Table/TableHooks';
|
4
5
|
import ModuleStreamsPage from '../ModuleStreamsPage';
|
5
6
|
import GenericContentPage from '../../../components/Content/GenericContentPage';
|
6
7
|
|
7
8
|
describe('Module streams page', () => {
|
8
9
|
it('should render and contain appropiate components', async () => {
|
9
10
|
const moduleStreams = {};
|
10
|
-
|
11
|
+
jest.spyOn(hooks, 'useUrlParams').mockImplementation(() => ({
|
12
|
+
searchParam: '',
|
13
|
+
}));
|
11
14
|
const getModuleStreams = () => {};
|
12
15
|
|
13
16
|
const wrapper = shallow(<ModuleStreamsPage
|
14
17
|
moduleStreams={moduleStreams}
|
15
18
|
getModuleStreams={getModuleStreams}
|
16
|
-
location={mockLocation}
|
17
19
|
/>);
|
18
20
|
|
19
21
|
expect(toJson(wrapper)).toMatchSnapshot();
|
@@ -137,6 +137,8 @@ class ManageManifestModal extends Component {
|
|
137
137
|
return name;
|
138
138
|
};
|
139
139
|
|
140
|
+
const manifestExpiredMessage = manifestExpirationDate ? __('Your manifest expired on {expirationDate}. To continue using Red Hat content, import a new manifest.') : __('Your manifest has expired. To continue using Red Hat content, import a new manifest.');
|
141
|
+
|
140
142
|
return (
|
141
143
|
<ForemanModal id={MANAGE_MANIFEST_MODAL_ID} title={__('Manage Manifest')}>
|
142
144
|
<Tabs id="manifest-history-tabs">
|
@@ -181,7 +183,7 @@ class ManageManifestModal extends Component {
|
|
181
183
|
title={__('Manifest expired')}
|
182
184
|
>
|
183
185
|
<FormattedMessage
|
184
|
-
defaultMessage={
|
186
|
+
defaultMessage={manifestExpiredMessage}
|
185
187
|
values={{
|
186
188
|
expirationDate: new Date(manifestExpirationDate).toDateString(),
|
187
189
|
}}
|
@@ -198,7 +200,7 @@ class ManageManifestModal extends Component {
|
|
198
200
|
{getManifestName()}
|
199
201
|
</Col>
|
200
202
|
</Row>
|
201
|
-
{isManifestImported && manifestExpirationDate &&
|
203
|
+
{isManifestImported && Boolean(manifestExpirationDate) &&
|
202
204
|
<Row>
|
203
205
|
<Col sm={5} />
|
204
206
|
<Col sm={7}>
|