From 3520d9633d601c549736d9c3b461e6ec3191da6e Mon Sep 17 00:00:00 2001 From: ashnamehrotra Date: Thu, 1 Aug 2024 16:50:53 -0700 Subject: [PATCH] revert changes to fix build extension image Signed-off-by: ashnamehrotra --- Dockerfile | 4 +- Makefile | 6 +- ui/package-lock.json | 176 ++++++++++++++++++++++++++++++++----------- ui/package.json | 4 +- 4 files changed, 137 insertions(+), 53 deletions(-) diff --git a/Dockerfile b/Dockerfile index c06f618..8f8c795 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22-alpine@sha256:0d3653dd6f35159ec6e3d10263a42372f6f194c3dea0b35235d72aabde86486e AS builder +FROM golang:1.21-alpine@sha256:3fadfe4dc99c79299b248a0a35a7b47a875524ee7aaa23adaa757473464cc590 AS builder ENV CGO_ENABLED=0 WORKDIR /backend COPY backend/go.* . @@ -10,7 +10,7 @@ RUN --mount=type=cache,target=/go/pkg/mod \ --mount=type=cache,target=/root/.cache/go-build \ go build -trimpath -ldflags="-s -w" -o bin/service -FROM --platform=$BUILDPLATFORM node:22.2-alpine3.18@sha256:a46d9fcb38cae53de45b35b90f6df232342242bebc9323a417416eb67942979e AS client-builder +FROM --platform=$BUILDPLATFORM node:21.6-alpine3.18@sha256:911976032e5e174fdd8f5fb63d7089b09d59d21dba3df2728c716cbb88c7b821 AS client-builder WORKDIR /ui # cache packages in layer COPY ui/package.json /ui/package.json diff --git a/Makefile b/Makefile index 90e6745..3d29698 100644 --- a/Makefile +++ b/Makefile @@ -15,8 +15,8 @@ else version := $(COPA_VERSION) endif -build-extension: ## Build service image to be deployed as a desktop extension - docker build --tag=$(IMAGE):$(TAG) . +build-extension: prepare-buildx ## Build service image to be deployed as a desktop extension + docker buildx build --platform linux/amd64,linux/arm64 --tag=$(IMAGE):$(TAG) . install-extension: build-extension ## Install the extension docker extension install $(IMAGE):$(TAG) @@ -30,7 +30,7 @@ prepare-buildx: ## Create buildx builder for multi-arch build, if not exists push-extension: prepare-buildx ## Build & Upload extension image to hub. Do not push if tag already exists: make push-extension tag=0.1 docker pull $(IMAGE):$(TAG) && echo "Failure: Tag already exists" || docker buildx build --push --builder=$(BUILDER) --platform=linux/amd64,linux/arm64 --build-arg TAG=$(TAG) --tag=$(IMAGE):$(TAG) . -build-copa-image: +build-copa-image: prepare-buildx docker buildx build --platform linux/amd64,linux/arm64 --build-arg copa_version=$(version) -t copa-extension container/copa-extension help: ## Show this help diff --git a/ui/package-lock.json b/ui/package-lock.json index 09fbee7..6e1475b 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -12,14 +12,14 @@ "@docker/extension-api-client": "0.3.4", "@emotion/react": "11.13.0", "@emotion/styled": "11.13.0", - "@mui/material": "5.16.6", + "@mui/material": "5.10.8", "react": "^18.2.0", "react-dom": "^18.2.0" }, "devDependencies": { "@docker/extension-api-client-types": "0.3.4", "@types/jest": "^29.1.2", - "@types/node": "^22.0.2", + "@types/node": "^18.7.18", "@types/react": "^18.0.17", "@types/react-dom": "^18.0.6", "@vitejs/plugin-react": "^2.1.0", @@ -1512,6 +1512,48 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@mui/base": { + "version": "5.0.0-alpha.100", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.100.tgz", + "integrity": "sha512-bSoJEKCENtmJrJDECHUe9PiqztIUACuSskyqw9ypqE7Dz3WxL3e8puFsWBkUsz+WOCjXh4B4Xljn88Ucxxv5HA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.19.0", + "@emotion/is-prop-valid": "^1.2.0", + "@mui/types": "^7.2.0", + "@mui/utils": "^5.10.6", + "@popperjs/core": "^2.11.6", + "clsx": "^1.2.1", + "prop-types": "^15.8.1", + "react-is": "^18.2.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/base/node_modules/clsx": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", + "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/@mui/core-downloads-tracker": { "version": "5.16.6", "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.16.6.tgz", @@ -1522,21 +1564,22 @@ } }, "node_modules/@mui/material": { - "version": "5.16.6", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.16.6.tgz", - "integrity": "sha512-0LUIKBOIjiFfzzFNxXZBRAyr9UQfmTAFzbt6ziOU2FDXhorNN2o3N9/32mNJbCA8zJo2FqFU6d3dtoqUDyIEfA==", - "dependencies": { - "@babel/runtime": "^7.23.9", - "@mui/core-downloads-tracker": "^5.16.6", - "@mui/system": "^5.16.6", - "@mui/types": "^7.2.15", - "@mui/utils": "^5.16.6", - "@popperjs/core": "^2.11.8", - "@types/react-transition-group": "^4.4.10", - "clsx": "^2.1.0", - "csstype": "^3.1.3", + "version": "5.10.8", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.10.8.tgz", + "integrity": "sha512-sF/Ka0IJjGXV52zoT4xAWEqXVRjNYbIjATo9L4Q5oQC5iJpGrKJFY16uNtWWB0+vp/nayAuPGZHrxtV+t3ecdQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.19.0", + "@mui/base": "5.0.0-alpha.100", + "@mui/core-downloads-tracker": "^5.10.8", + "@mui/system": "^5.10.8", + "@mui/types": "^7.2.0", + "@mui/utils": "^5.10.6", + "@types/react-transition-group": "^4.4.5", + "clsx": "^1.2.1", + "csstype": "^3.1.1", "prop-types": "^15.8.1", - "react-is": "^18.3.1", + "react-is": "^18.2.0", "react-transition-group": "^4.4.5" }, "engines": { @@ -1544,7 +1587,7 @@ }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/mui-org" + "url": "https://opencollective.com/mui" }, "peerDependencies": { "@emotion/react": "^11.5.0", @@ -1565,6 +1608,15 @@ } } }, + "node_modules/@mui/material/node_modules/clsx": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", + "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/@mui/private-theming": { "version": "5.16.6", "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.16.6.tgz", @@ -1707,6 +1759,7 @@ "version": "2.11.8", "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/popperjs" @@ -1821,12 +1874,13 @@ } }, "node_modules/@types/node": { - "version": "22.0.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.0.2.tgz", - "integrity": "sha512-yPL6DyFwY5PiMVEwymNeqUTKsDczQBJ/5T7W/46RwLU/VH+AA8aT5TZkvBviLKLbbm0hlfftEkGrNzfRk/fofQ==", + "version": "18.19.42", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.42.tgz", + "integrity": "sha512-d2ZFc/3lnK2YCYhos8iaNIYu9Vfhr92nHiyJHRltXWjXUBjEE+A4I58Tdbnw4VhggSW+2j5y5gTrLs4biNnubg==", "dev": true, + "license": "MIT", "dependencies": { - "undici-types": "~6.11.1" + "undici-types": "~5.26.4" } }, "node_modules/@types/parse-json": { @@ -5997,10 +6051,11 @@ } }, "node_modules/undici-types": { - "version": "6.11.1", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.11.1.tgz", - "integrity": "sha512-mIDEX2ek50x0OlRgxryxsenE5XaQD4on5U2inY7RApK3SOJpofyw7uW2AyfMKkhAxXIceo2DeWGVGwyvng1GNQ==", - "dev": true + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true, + "license": "MIT" }, "node_modules/update-browserslist-db": { "version": "1.0.16", @@ -7374,28 +7429,57 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "@mui/base": { + "version": "5.0.0-alpha.100", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.100.tgz", + "integrity": "sha512-bSoJEKCENtmJrJDECHUe9PiqztIUACuSskyqw9ypqE7Dz3WxL3e8puFsWBkUsz+WOCjXh4B4Xljn88Ucxxv5HA==", + "requires": { + "@babel/runtime": "^7.19.0", + "@emotion/is-prop-valid": "^1.2.0", + "@mui/types": "^7.2.0", + "@mui/utils": "^5.10.6", + "@popperjs/core": "^2.11.6", + "clsx": "^1.2.1", + "prop-types": "^15.8.1", + "react-is": "^18.2.0" + }, + "dependencies": { + "clsx": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", + "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==" + } + } + }, "@mui/core-downloads-tracker": { "version": "5.16.6", "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.16.6.tgz", "integrity": "sha512-kytg6LheUG42V8H/o/Ptz3olSO5kUXW9zF0ox18VnblX6bO2yif1FPItgc3ey1t5ansb1+gbe7SatntqusQupg==" }, "@mui/material": { - "version": "5.16.6", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.16.6.tgz", - "integrity": "sha512-0LUIKBOIjiFfzzFNxXZBRAyr9UQfmTAFzbt6ziOU2FDXhorNN2o3N9/32mNJbCA8zJo2FqFU6d3dtoqUDyIEfA==", - "requires": { - "@babel/runtime": "^7.23.9", - "@mui/core-downloads-tracker": "^5.16.6", - "@mui/system": "^5.16.6", - "@mui/types": "^7.2.15", - "@mui/utils": "^5.16.6", - "@popperjs/core": "^2.11.8", - "@types/react-transition-group": "^4.4.10", - "clsx": "^2.1.0", - "csstype": "^3.1.3", + "version": "5.10.8", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.10.8.tgz", + "integrity": "sha512-sF/Ka0IJjGXV52zoT4xAWEqXVRjNYbIjATo9L4Q5oQC5iJpGrKJFY16uNtWWB0+vp/nayAuPGZHrxtV+t3ecdQ==", + "requires": { + "@babel/runtime": "^7.19.0", + "@mui/base": "5.0.0-alpha.100", + "@mui/core-downloads-tracker": "^5.10.8", + "@mui/system": "^5.10.8", + "@mui/types": "^7.2.0", + "@mui/utils": "^5.10.6", + "@types/react-transition-group": "^4.4.5", + "clsx": "^1.2.1", + "csstype": "^3.1.1", "prop-types": "^15.8.1", - "react-is": "^18.3.1", + "react-is": "^18.2.0", "react-transition-group": "^4.4.5" + }, + "dependencies": { + "clsx": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", + "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==" + } } }, "@mui/private-theming": { @@ -7567,12 +7651,12 @@ } }, "@types/node": { - "version": "22.0.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.0.2.tgz", - "integrity": "sha512-yPL6DyFwY5PiMVEwymNeqUTKsDczQBJ/5T7W/46RwLU/VH+AA8aT5TZkvBviLKLbbm0hlfftEkGrNzfRk/fofQ==", + "version": "18.19.42", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.42.tgz", + "integrity": "sha512-d2ZFc/3lnK2YCYhos8iaNIYu9Vfhr92nHiyJHRltXWjXUBjEE+A4I58Tdbnw4VhggSW+2j5y5gTrLs4biNnubg==", "dev": true, "requires": { - "undici-types": "~6.11.1" + "undici-types": "~5.26.4" } }, "@types/parse-json": { @@ -10540,9 +10624,9 @@ "dev": true }, "undici-types": { - "version": "6.11.1", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.11.1.tgz", - "integrity": "sha512-mIDEX2ek50x0OlRgxryxsenE5XaQD4on5U2inY7RApK3SOJpofyw7uW2AyfMKkhAxXIceo2DeWGVGwyvng1GNQ==", + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "dev": true }, "update-browserslist-db": { diff --git a/ui/package.json b/ui/package.json index a5d1f1f..a1f455d 100644 --- a/ui/package.json +++ b/ui/package.json @@ -8,7 +8,7 @@ "@docker/extension-api-client": "0.3.4", "@emotion/react": "11.13.0", "@emotion/styled": "11.13.0", - "@mui/material": "5.16.6", + "@mui/material": "5.10.8", "react": "^18.2.0", "react-dom": "^18.2.0" }, @@ -20,7 +20,7 @@ "devDependencies": { "@docker/extension-api-client-types": "0.3.4", "@types/jest": "^29.1.2", - "@types/node": "^22.0.2", + "@types/node": "^18.7.18", "@types/react": "^18.0.17", "@types/react-dom": "^18.0.6", "@vitejs/plugin-react": "^2.1.0",