Skip to content

Commit

Permalink
Merge pull request #176 from KKoukiou/sessionStorage
Browse files Browse the repository at this point in the history
storage: use sessionStorage for the communication with cockpit-storage
  • Loading branch information
KKoukiou authored Feb 16, 2024
2 parents a0c60ba + fe4a11f commit bd8274d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,9 @@ create-updates.img: bots

# test runs in kernel_t context and triggers massive amounts of SELinux
# denials; SELinux gets disabled, but would still trigger unexpected messages
# we create huge VMs, so we need to reduce parallelism on CI
integration-test: prepare-test-deps test/reference $(UPDATES_IMG)
TEST_AUDIT_NO_SELINUX=1 test/common/run-tests
J=$$((TEST_JOBS/4)); [ $$J -ge 1 ] || J=1; TEST_AUDIT_NO_SELINUX=1 test/common/run-tests --jobs $$J

test/reference: test/common
test/common/pixel-tests pull
Expand Down
15 changes: 8 additions & 7 deletions src/components/storage/ModifyStorage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ export const ModifyStorage = ({ idPrefix, onCritFail, onRescan, setShowStorage,
const targetSystemRoot = useContext(TargetSystemRootContext);
const mountPointConstraints = useMountPointConstraints();
const isEfi = mountPointConstraints?.some(c => c["required-filesystem-type"]?.v === "efi");
const cockpitAnaconda = JSON.stringify({
mount_point_prefix: targetSystemRoot,
available_devices: selectedDevices,
efi: isEfi,
});

return (
<>
Expand All @@ -41,13 +46,9 @@ export const ModifyStorage = ({ idPrefix, onCritFail, onRescan, setShowStorage,
variant="link"
icon={<WrenchIcon />}
onClick={() => {
window.localStorage.setItem("cockpit_anaconda",
JSON.stringify({
mount_point_prefix: targetSystemRoot,
available_devices: selectedDevices,
efi: isEfi,
})
);
window.sessionStorage.setItem("cockpit_anaconda", cockpitAnaconda);
// FIXME: Remove when cockpit-storaged 311 is available in Rawhide
window.localStorage.setItem("cockpit_anaconda", cockpitAnaconda);
setShowStorage(true);
}}
>
Expand Down
4 changes: 3 additions & 1 deletion test/vm.install
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ def vm_install(image, verbose, quick):
# cockpit-storaged is also available in the default rawhide compose, make sure we don't pull it from there
download_from_copr(f"packit/cockpit-project-cockpit-{cockpit_pr}", "cockpit-storaged", machine)
else:
packages_to_download += " cockpit-storaged"
# FIXME: Download cockpit-storaged from custom COPR
# till https://github.com/cockpit-project/cockpit/pull/19924#event-11785480839 is released
download_from_copr("@cockpit/main-builds", "cockpit-storaged", machine)

# Build anaconda-webui from SRPM unless we are testing a anaconda-webui PR scenario
# from a different repo, then pull it from the anaconda-webui PR COPR repo
Expand Down

0 comments on commit bd8274d

Please sign in to comment.