Skip to content

Commit

Permalink
fix: remove linuxcontainers images
Browse files Browse the repository at this point in the history
Signed-off-by: Mason Hu <[email protected]>
  • Loading branch information
mas-who committed Jan 15, 2024
1 parent 4f1f7e1 commit 216be28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
13 changes: 0 additions & 13 deletions src/pages/images/ImageSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ const minimalJson =
"https://cloud-images.ubuntu.com/minimal/releases/streams/v1/com.ubuntu.cloud:released:download.json";
const minimalServer = "https://cloud-images.ubuntu.com/minimal/releases/";

const linuxContainersJson =
"https://images.linuxcontainers.org/streams/v1/images.json";
const linuxContainersServer = "https://images.linuxcontainers.org";

const ANY = "any";
const CONTAINER = "container";
const VM = "virtual-machine";
Expand Down Expand Up @@ -76,11 +72,6 @@ const ImageSelector: FC<Props> = ({ onSelect, onClose }) => {

const { data: settings, isLoading: isSettingsLoading } = useSettings();

const { data: linuxContainerImages = [] } = useQuery({
queryKey: [queryKeys.images, linuxContainersServer],
queryFn: () => loadImages(linuxContainersJson, linuxContainersServer),
});

const { data: canonicalImages = [], isLoading: isCiLoading } = useQuery({
queryKey: [queryKeys.images, canonicalServer],
queryFn: () => loadImages(canonicalJson, canonicalServer),
Expand Down Expand Up @@ -108,7 +99,6 @@ const ImageSelector: FC<Props> = ({ onSelect, onClose }) => {
.map(localLxdToRemoteImage)
.concat([...minimalImages].reverse().sort(byLtsFirst))
.concat([...canonicalImages].reverse().sort(byLtsFirst))
.concat(linuxContainerImages)
.filter((image) => archSupported.includes(image.arch));

const archAll = [...new Set(images.map((item) => item.arch))]
Expand Down Expand Up @@ -215,9 +205,6 @@ const ImageSelector: FC<Props> = ({ onSelect, onClose }) => {
if (item.server === minimalServer) {
return "Ubuntu Minimal";
}
if (item.server === linuxContainersServer) {
return "Linux Containers";
}
};

return {
Expand Down
7 changes: 4 additions & 3 deletions tests/helpers/instances.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ export const createInstance = async (
await page.getByLabel("Instance name").fill(instance);
await page.getByRole("button", { name: "Browse images" }).click();
await page.getByPlaceholder("Search an image").click();
await page.getByPlaceholder("Search an image").fill("alpine");
await page.getByPlaceholder("Search an image").fill("jammy");
await page
.getByRole("row", {
name: "Distribution Release Variant Type Alias Source Action",
.getByRole("row")
.filter({
hasText: "Ubuntu Minimal",
})
.getByRole("button", { name: "Select" })
.last()
Expand Down

0 comments on commit 216be28

Please sign in to comment.