From a25ec459d8478760dc75bfd0f4cc0fffee694772 Mon Sep 17 00:00:00 2001 From: Sanne Raymaekers Date: Wed, 25 Jan 2023 10:03:31 +0100 Subject: [PATCH] CreateImageWizard: use content sources in production beta Enables package searching and custom repositories. --- src/Components/CreateImageWizard/CreateImageWizard.js | 6 +++--- src/Components/CreateImageWizard/formComponents/Packages.js | 2 +- src/Components/CreateImageWizard/steps/packages.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Components/CreateImageWizard/CreateImageWizard.js b/src/Components/CreateImageWizard/CreateImageWizard.js index c1cf55fd..12bf6c5b 100644 --- a/src/Components/CreateImageWizard/CreateImageWizard.js +++ b/src/Components/CreateImageWizard/CreateImageWizard.js @@ -242,7 +242,7 @@ const getPackageDescription = async (release, arch, repoUrls, packageName) => { let pack; // if the env is stage beta then use content-sources api // else use image-builder api - if (!insights.chrome.isProd() && insights.chrome.isBeta()) { + if (insights.chrome.isBeta()) { const data = await api.getPackagesContentSources(repoUrls, packageName); pack = data.find((pack) => packageName === pack.name); } else { @@ -440,7 +440,7 @@ const formStepHistory = (composeRequest) => { steps.push('registration'); } - if (!insights.chrome.isProd() && insights.chrome.isBeta()) { + if (insights.chrome.isBeta()) { steps.push('File system configuration', 'packages', 'repositories'); const customRepositories = @@ -472,7 +472,7 @@ const CreateImageWizard = () => { const handleClose = () => navigate(resolveRelPath('')); useEffect(() => { - if (!insights.chrome.isProd() && insights.chrome.isBeta()) { + if (insights.chrome.isBeta()) { dispatch(fetchRepositories()); } }, []); diff --git a/src/Components/CreateImageWizard/formComponents/Packages.js b/src/Components/CreateImageWizard/formComponents/Packages.js index 4b367b1b..2d51fd7d 100644 --- a/src/Components/CreateImageWizard/formComponents/Packages.js +++ b/src/Components/CreateImageWizard/formComponents/Packages.js @@ -34,7 +34,7 @@ export const RedHatPackages = ({ defaultArch }) => { const getAllPackages = async (packagesSearchName) => { // if the env is stage beta then use content-sources api // else use image-builder api - if (!insights.chrome.isProd() && insights.chrome.isBeta()) { + if (insights.chrome.isBeta()) { const distribution = getState()?.values?.release; const repoUrls = repos[distribution].map((repo) => repo.url); return await api.getPackagesContentSources(repoUrls, packagesSearchName); diff --git a/src/Components/CreateImageWizard/steps/packages.js b/src/Components/CreateImageWizard/steps/packages.js index 887044d4..a758a296 100644 --- a/src/Components/CreateImageWizard/steps/packages.js +++ b/src/Components/CreateImageWizard/steps/packages.js @@ -14,7 +14,7 @@ export default { name: 'packages', substepOf: 'Content', nextStep: () => { - if (!insights.chrome.isProd() && insights.chrome.isBeta()) { + if (insights.chrome.isBeta()) { return 'repositories'; } else { return 'image-name';