From 16a808807486476834e75483b7780fb622bee6da Mon Sep 17 00:00:00 2001 From: ytimocin Date: Fri, 19 Jul 2024 12:46:00 -0700 Subject: [PATCH] Adding multi arch container image generation for magpie and testrp Signed-off-by: ytimocin --- .github/workflows/build.yaml | 39 +++--- build/build.mk | 48 +++++-- build/docker.mk | 53 ++++---- deploy/images/applications-rp/Dockerfile | 17 +-- deploy/images/controller/Dockerfile | 11 +- deploy/images/ucpd/Dockerfile | 11 +- .../testdata/corerp-kubernetes-cli-run.bicep | 4 +- test/magpiego/Dockerfile | 28 ++--- test/magpiego/go.mod | 41 +++--- test/magpiego/go.sum | 117 ++++++++---------- test/testrp/Dockerfile | 29 ++--- 11 files changed, 209 insertions(+), 189 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9101d3a67c6..34b5d4f0ab1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,7 +4,7 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software @@ -31,12 +31,12 @@ on: - release/* permissions: - id-token: write # Required for requesting the JWT - contents: write # Required for creating releases - issues: write # Required for creating comments - checks: write # Required for updating check runs + id-token: write # Required for requesting the JWT + contents: write # Required for creating releases + issues: write # Required for creating comments + checks: write # Required for updating check runs pull-requests: write # Required for updating pull requests - packages: write # Required for uploading the package + packages: write # Required for uploading the package concurrency: # Cancel the previously triggered build for only PR build. @@ -45,8 +45,8 @@ concurrency: env: # Go version to install - GOVER: '1.22.2' - + GOVER: "1.22.2" + # gotestsum version - see: https://github.com/gotestyourself/gotestsum GOTESTSUMVERSION: 1.10.0 @@ -54,7 +54,7 @@ env: GHCR_ACTOR: rad-ci-bot # Container registry url for GitHub container registry. - CONTAINER_REGISTRY: 'ghcr.io/radius-project' + CONTAINER_REGISTRY: "ghcr.io/radius-project" # Local file path to the release binaries. RELEASE_PATH: ./release @@ -105,8 +105,8 @@ jobs: - name: Run make test (unit tests) if: matrix.target_arch == 'amd64' && matrix.target_os == 'linux' env: - GOTESTSUM_OPTS: '--junitfile ./dist/unit_test/results.xml' - GOTEST_OPTS: '-race -coverprofile ./dist/unit_test/ut_coverage.out' + GOTESTSUM_OPTS: "--junitfile ./dist/unit_test/results.xml" + GOTEST_OPTS: "-race -coverprofile ./dist/unit_test/ut_coverage.out" run: | mkdir -p ./dist/unit_test go install gotest.tools/gotestsum@v${{ env.GOTESTSUMVERSION }} @@ -125,9 +125,9 @@ jobs: # Always is required here to make sure this target runs even when tests fail. if: always() && matrix.target_arch == 'amd64' && matrix.target_os == 'linux' with: - test_group_name: 'Unit Tests' - artifact_name: 'unit_test_results' - result_directory: 'dist/unit_test/' + test_group_name: "Unit Tests" + artifact_name: "unit_test_results" + result_directory: "dist/unit_test/" - name: Copy cli binaries to release (unix-like) if: matrix.target_os != 'windows' run: | @@ -190,7 +190,6 @@ jobs: platforms: linux/amd64,linux/arm64,linux/arm/v7 - name: Push container images (latest) run: | - make docker-test-image-build && make docker-test-image-push make docker-multi-arch-push if: (github.ref == 'refs/heads/main') # push image to latest on merge to main env: @@ -198,7 +197,6 @@ jobs: DOCKER_TAG_VERSION: latest - name: Build container images (PR) # Don't push on PR, agent will not have permission. run: | - make docker-test-image-build make docker-multi-arch-build if: github.event_name == 'pull_request' env: @@ -206,7 +204,6 @@ jobs: DOCKER_TAG_VERSION: ${{ env.REL_VERSION }} # includes PR number - name: Push container images (release) run: | - make docker-test-image-build && make docker-test-image-push make docker-multi-arch-push if: startsWith(github.ref, 'refs/tags/v') # push image on tag env: @@ -215,7 +212,7 @@ jobs: build-and-push-helm-chart: name: Helm chart build - needs: ['build-and-push-images'] + needs: ["build-and-push-images"] runs-on: ubuntu-latest # Don't push on PR, agent will not have permission. if: github.repository == 'radius-project/radius' && ((startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')) @@ -226,14 +223,14 @@ jobs: OCI_REGISTRY: ghcr.io # We only push the chart on pushes to main or to a tag. The versioning logic will select the right # version for us. - OCI_REPOSITORY: 'radius-project/helm-chart' + OCI_REPOSITORY: "radius-project/helm-chart" steps: - name: Checkout uses: actions/checkout@v4 - name: Install helm uses: azure/setup-helm@v4 with: - version: 'v3.11.1' + version: "v3.11.1" - name: Parse release version and set environment variables run: python ./.github/scripts/get_release_version.py - name: Run Helm linter @@ -264,7 +261,7 @@ jobs: publish-release: name: Publish GitHub Release - needs: ['build-and-push-cli'] + needs: ["build-and-push-cli"] runs-on: ubuntu-latest if: github.repository == 'radius-project/radius' && startsWith(github.ref, 'refs/tags/v') env: diff --git a/build/build.mk b/build/build.mk index 169271d8e65..dd09dbc8da1 100644 --- a/build/build.mk +++ b/build/build.mk @@ -21,12 +21,16 @@ GOOS ?= $(shell go env GOOS) GOARCH ?= $(shell go env GOARCH) GOPATH := $(shell go env GOPATH) +# Set GOBIN environment variable. +# If it is not set, use GOPATH/bin. ifeq (,$(shell go env GOBIN)) GOBIN=$(shell go env GOPATH)/bin else GOBIN=$(shell go env GOBIN) endif +# Check Operating System and set binary extension, +# and golangci-lint binary name. ifeq ($(GOOS),windows) BINARY_EXT = .exe GOLANGCI_LINT:=golangci-lint.exe @@ -34,6 +38,9 @@ else GOLANGCI_LINT:=golangci-lint endif +# Check if DEBUG is set to 1 or not. +# If DEBUG is set to 1, then build debug binaries. +# If DEBUG is not set, then build release binaries. ifeq ($(origin DEBUG), undefined) BUILDTYPE_DIR:=release GCFLAGS:="" @@ -45,7 +52,10 @@ else GCFLAGS:="all=-N -l" endif +# Linker flags: https://cmake.org/cmake/help/latest/envvar/LDFLAGS.html. LDFLAGS := "-s -w -X $(BASE_PACKAGE_NAME)/pkg/version.channel=$(REL_CHANNEL) -X $(BASE_PACKAGE_NAME)/pkg/version.release=$(REL_VERSION) -X $(BASE_PACKAGE_NAME)/pkg/version.commit=$(GIT_COMMIT) -X $(BASE_PACKAGE_NAME)/pkg/version.version=$(GIT_VERSION) -X $(BASE_PACKAGE_NAME)/pkg/version.chartVersion=$(CHART_VERSION)" + +# Combination of flags into GOARGS. GOARGS := -v -gcflags $(GCFLAGS) -ldflags $(LDFLAGS) export GO111MODULE ?= on @@ -87,23 +97,43 @@ define generatePlatformBuildTarget build-$(3)-$(1)-$(2): $(eval BINS_OUT_DIR_$(1)_$(2) := $(OUT_DIR)/$(1)_$(2)/$(BUILDTYPE_DIR)) @echo "$(ARROW) Building $(3) on $(1)/$(2) to $(BINS_OUT_DIR_$(1)_$(2))/$(3)$(BINARY_EXT)" - GOOS=$(1) GOARCH=$(2) go build \ + cd $(4) && GOOS=$(1) GOARCH=$(2) go build \ -v \ -gcflags $(GCFLAGS) \ - -ldflags=$(LDFLAGS) \ - -o $(BINS_OUT_DIR_$(1)_$(2))/$(3)$(BINARY_EXT) \ - $(4)/ + -ldflags $(LDFLAGS) \ + -o $(CURDIR)/$(BINS_OUT_DIR_$(1)_$(2))/$(3)$(BINARY_EXT) endef # defines a target for each binary GOOSES := darwin linux windows GOARCHES := amd64 arm arm64 -BINARIES := docgen rad applications-rp ucpd controller -$(foreach ITEM,$(BINARIES),$(eval $(call generateBuildTarget,$(ITEM),./cmd/$(ITEM)))) -$(foreach ARCH,$(GOARCHES),$(foreach OS,$(GOOSES),$(foreach ITEM,$(BINARIES),$(eval $(call generatePlatformBuildTarget,$(OS),$(ARCH),$(ITEM),./cmd/$(ITEM)))))) -# list of 'outputs' to build for all binaries -BINARY_TARGETS:=$(foreach ITEM,$(BINARIES),build-$(ITEM)) +# List of binaries to build. +# Format: binaryName:binaryMainDirectory +# Example: docgen:./cmd/docgen +BINARIES := docgen:./cmd/docgen \ + rad:./cmd/rad \ + applications-rp:./cmd/applications-rp \ + ucpd:./cmd/ucpd \ + controller:./cmd/controller \ + testrp:./test/testrp \ + magpiego:./test/magpiego + +# This function parses binary name and entrypoint from an item in the BINARIES list. +define parseBinary +$(eval NAME := $(shell echo $(1) | cut -d: -f1)) +$(eval ENTRYPOINT := $(shell echo $(1) | cut -d: -f2)) +endef + +# Generate build targets for each binary. +$(foreach ITEM,$(BINARIES),$(eval $(call parseBinary,$(ITEM)) $(call generateBuildTarget,$(NAME),$(ENTRYPOINT)))) + +# Generate platform build targets for each binary and each platform. +# This will generate a target for each combination of OS and ARCH for each item in the BINARIES list. +$(foreach ARCH,$(GOARCHES),$(foreach OS,$(GOOSES),$(foreach ITEM,$(BINARIES),$(eval $(call parseBinary,$(ITEM)) $(call generatePlatformBuildTarget,$(OS),$(ARCH),$(NAME),$(ENTRYPOINT)))))) + +# Generate a `build` target for each item in the BINARIES list. +BINARY_TARGETS := $(foreach ITEM,$(BINARIES),$(eval $(call parseBinary,$(ITEM))) build-$(NAME)) .PHONY: build-binaries build-binaries: $(BINARY_TARGETS) ## Builds all go binaries. diff --git a/build/docker.mk b/build/docker.mk index 20bbc27993e..3b161fd653c 100644 --- a/build/docker.mk +++ b/build/docker.mk @@ -23,7 +23,8 @@ IMAGE_SRC?=https://github.com/radius-project/radius # Generate a target for each image we define # Params: # $(1): the image name for the target -# $(2): the Dockerfile path +# $(2): the context directory +# $(3): the Dockerfile path define generateDockerTargets ifeq ($(strip $(4)),go) .PHONY: docker-build-$(1) @@ -97,50 +98,48 @@ configure-buildx: docker buildx inspect --builder radius-builder --bootstrap; \ fi -# defines a target for each image -DOCKER_IMAGES := ucpd applications-rp controller - -$(foreach IMAGE,$(DOCKER_IMAGES),$(eval $(call generateDockerTargets,$(IMAGE),.,./deploy/images/$(IMAGE)/Dockerfile, go))) - -# multi arch container image targets for each binaries -$(foreach IMAGE,$(DOCKER_IMAGES),$(eval $(call generateDockerMultiArches,$(IMAGE),.,./deploy/images/$(IMAGE)/Dockerfile))) +# Define a target for each image with name and Dockerfile location +APPS_MAP := ucpd:./deploy/images/ucpd \ + applications-rp:./deploy/images/applications-rp \ + controller:./deploy/images/controller \ + testrp:./test/testrp \ + magpiego:./test/magpiego + +# Function to extract the name and the directory of the Dockerfile from the app string +define parseApp +$(eval NAME := $(shell echo $(1) | cut -d: -f1)) +$(eval DIR := $(shell echo $(1) | cut -d: -f2)) +endef -# magpie comes from our test directory. -$(eval $(call generateDockerTargets,magpiego,./test/magpiego/,./test/magpiego/Dockerfile)) +# This command will dynamically generate the targets for each image in the APPS_MAP list. +$(foreach APP,$(APPS_MAP),$(eval $(call parseApp,$(APP)) $(call generateDockerTargets,$(NAME),.,$(DIR)/Dockerfile,go))) -# testrp comes from our test directory. -$(eval $(call generateDockerTargets,testrp,./test/testrp/,./test/testrp/Dockerfile)) +# This command will dynamically generate the multi-arch targets for each image in the APPS_MAP list. +$(foreach APP,$(APPS_MAP),$(eval $(call parseApp,$(APP)) $(call generateDockerMultiArches,$(NAME),.,$(DIR)/Dockerfile))) # list of 'outputs' to build all images -DOCKER_BUILD_TARGETS:=$(foreach IMAGE,$(DOCKER_IMAGES),docker-build-$(IMAGE)) +DOCKER_BUILD_TARGETS := $(foreach APP,$(APPS_MAP),$(eval $(call parseApp,$(APP))) docker-build-$(NAME)) # list of 'outputs' to push all images -DOCKER_PUSH_TARGETS:=$(foreach IMAGE,$(DOCKER_IMAGES),docker-push-$(IMAGE)) +DOCKER_PUSH_TARGETS := $(foreach APP,$(APPS_MAP),$(eval $(call parseApp,$(APP))) docker-push-$(NAME)) # list of 'outputs' to build all multi arch images -DOCKER_BUILD_MULTI_TARGETS:=$(foreach IMAGE,$(DOCKER_IMAGES),docker-multi-arch-build-$(IMAGE)) +DOCKER_BUILD_MULTI_TARGETS := $(foreach APP,$(APPS_MAP),$(eval $(call parseApp,$(APP))) docker-multi-arch-build-$(NAME)) # list of 'outputs' to push all multi arch images -DOCKER_PUSH_MULTI_TARGETS:=$(foreach IMAGE,$(DOCKER_IMAGES),docker-multi-arch-push-$(IMAGE)) - -# targets to build test images -.PHONY: docker-test-image-build -docker-test-image-build: docker-build-magpiego docker-build-testrp ## Builds all test Docker images. - -.PHONY: docker-test-image-push -docker-test-image-push: docker-push-magpiego docker-push-testrp ## Pushes all test Docker images. +DOCKER_PUSH_MULTI_TARGETS := $(foreach APP,$(APPS_MAP),$(eval $(call parseApp,$(APP))) docker-multi-arch-push-$(NAME)) # targets to build development images .PHONY: docker-build -docker-build: $(DOCKER_BUILD_TARGETS) docker-test-image-build ## Builds all Docker images. +docker-build: $(DOCKER_BUILD_TARGETS) ## Builds all Docker images. .PHONY: docker-push -docker-push: $(DOCKER_PUSH_TARGETS) docker-test-image-push ## Pushes all Docker images (without building). +docker-push: $(DOCKER_PUSH_TARGETS) ## Pushes all Docker images (without building). # targets to build and push multi arch images. If you run this target in your machine, # ensure you have qemu and buildx installed by running make configure-buildx. .PHONY: docker-multi-arch-build -docker-multi-arch-build: $(DOCKER_BUILD_MULTI_TARGETS) ## Builds all non-test docker images for multiple architectures. +docker-multi-arch-build: $(DOCKER_BUILD_MULTI_TARGETS) ## Builds all docker images for multiple architectures. .PHONY: docker-multi-arch-push -docker-multi-arch-push: $(DOCKER_PUSH_MULTI_TARGETS) ## Pushes all non-test docker images for multiple architectures after building. +docker-multi-arch-push: $(DOCKER_PUSH_MULTI_TARGETS) ## Pushes all docker images for multiple architectures after building. diff --git a/deploy/images/applications-rp/Dockerfile b/deploy/images/applications-rp/Dockerfile index 7c93ee307e9..a7f6cd17874 100644 --- a/deploy/images/applications-rp/Dockerfile +++ b/deploy/images/applications-rp/Dockerfile @@ -1,22 +1,25 @@ -# Note: Using Alpine image to enable Git installation for Terraform module downloads. +# Use Alpine image to enable Git installation for Terraform module downloads. # Switch to distroless when Terraform execution is moved to a separate container. -FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.18 +FROM alpine:3.20 -ARG TARGETPLATFORM ARG TARGETARCH # Install ca-certificates and Git (required for Terraform module downloads) -RUN apk --no-cache add ca-certificates git - -# Create non-root user -RUN addgroup -g 65532 rpuser && \ +# Create non-root user in a single RUN command to minimize layers +RUN apk --no-cache add ca-certificates git && \ + addgroup -g 65532 rpuser && \ adduser -u 65532 -G rpuser -s /bin/sh -D rpuser WORKDIR / +# Copy the application binary COPY ./linux_${TARGETARCH:-amd64}/release/applications-rp / +# Set the user to non-root USER rpuser +# Expose the application port EXPOSE 8080 + +# Set the entrypoint to the application binary ENTRYPOINT ["/applications-rp"] diff --git a/deploy/images/controller/Dockerfile b/deploy/images/controller/Dockerfile index f5747f58395..739b1d607ef 100644 --- a/deploy/images/controller/Dockerfile +++ b/deploy/images/controller/Dockerfile @@ -1,12 +1,17 @@ -# Note: distroless already includes ca-certificates -FROM --platform=${TARGETPLATFORM:-linux/amd64} gcr.io/distroless/static:nonroot +# Use distroless image which already includes ca-certificates +FROM gcr.io/distroless/static:nonroot -ARG TARGETPLATFORM +# Argument for target architecture ARG TARGETARCH +# Set the working directory WORKDIR / +# Copy the application binary for the specified architecture COPY ./linux_${TARGETARCH:-amd64}/release/controller / +# Set the user to non-root (65532:65532 is the default non-root user in distroless) USER 65532:65532 + +# Set the entrypoint to the application binary ENTRYPOINT ["/controller"] diff --git a/deploy/images/ucpd/Dockerfile b/deploy/images/ucpd/Dockerfile index e334aa56ee3..44ff6e5be32 100644 --- a/deploy/images/ucpd/Dockerfile +++ b/deploy/images/ucpd/Dockerfile @@ -1,12 +1,17 @@ -# Note: distroless already includes ca-certificates -FROM --platform=${TARGETPLATFORM:-linux/amd64} gcr.io/distroless/static:nonroot +# Use distroless image which already includes ca-certificates +FROM gcr.io/distroless/static:nonroot -ARG TARGETPLATFORM +# Argument for target architecture ARG TARGETARCH +# Set the working directory WORKDIR / +# Copy the application binary for the specified architecture COPY ./linux_${TARGETARCH:-amd64}/release/ucpd / +# Set the user to non-root (65532:65532 is the default non-root user in distroless) USER 65532:65532 + +# Set the entrypoint to the application binary ENTRYPOINT ["/ucpd"] diff --git a/test/functional-portable/cli/noncloud/testdata/corerp-kubernetes-cli-run.bicep b/test/functional-portable/cli/noncloud/testdata/corerp-kubernetes-cli-run.bicep index 9a5c4f43960..9c3626f7494 100644 --- a/test/functional-portable/cli/noncloud/testdata/corerp-kubernetes-cli-run.bicep +++ b/test/functional-portable/cli/noncloud/testdata/corerp-kubernetes-cli-run.bicep @@ -12,10 +12,10 @@ resource container 'Applications.Core/containers@2023-10-01-preview' = { application: application container: { image: magpieimage - command: ['/bin/sh'] + command: [ '/bin/sh' ] // The test looks for this specific output, keep in sync with the CLI run test! - args: ['-c', 'while true; do echo "hello from the streaming logs!"; sleep 10;done'] + args: [ '-c', 'while true; do echo "hello from the streaming logs!"; sleep 10;done' ] } } } diff --git a/test/magpiego/Dockerfile b/test/magpiego/Dockerfile index 680c8a94a4e..86568bea20b 100644 --- a/test/magpiego/Dockerfile +++ b/test/magpiego/Dockerfile @@ -1,21 +1,13 @@ -# Issues on M1 mac: https://github.com/docker/for-mac/issues/5831 -# it is a multistage docker creation for small magpie image -FROM --platform=${TARGETPLATFORM:-linux/amd64} golang:1.22-alpine -WORKDIR /usr/src/tmpapp +FROM golang:1.22-alpine -# Download necessary Go modules -COPY go.mod ./ -COPY go.sum ./ -RUN go mod download -COPY bindings ./bindings -COPY *.go ./ -# create the go binary -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o magpiego . +# Argument for target architecture +ARG TARGETARCH -FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3 -WORKDIR /usr/src/app -COPY --from=0 /usr/src/tmpapp/magpiego ./ -EXPOSE 3000 +# Set the working directory +WORKDIR / -#command to start the magpie as a server to listen at port 3000 -CMD [ "./magpiego" ] \ No newline at end of file +# Copy the application binary for the specified architecture +COPY ./linux_${TARGETARCH:-amd64}/release/magpiego / + +# Set the entrypoint to the application binary +ENTRYPOINT ["/magpiego"] diff --git a/test/magpiego/go.mod b/test/magpiego/go.mod index 59cd418af50..16b3722569b 100644 --- a/test/magpiego/go.mod +++ b/test/magpiego/go.mod @@ -3,48 +3,49 @@ module github.com/radius-project/radius/test/magpiego go 1.22 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.6.0 - github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus v1.7.0 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 + github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus v1.7.1 github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v1.1.0 - github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.1 + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.4.0 github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 - github.com/dapr/go-sdk v1.9.1 + github.com/dapr/go-sdk v1.10.1 github.com/denisenkom/go-mssqldb v0.12.3 - github.com/go-chi/chi/v5 v5.0.12 + github.com/go-chi/chi/v5 v5.1.0 github.com/go-redis/redis/v8 v8.11.5 - github.com/rabbitmq/amqp091-go v1.9.0 - go.mongodb.org/mongo-driver v1.14.0 + github.com/rabbitmq/amqp091-go v1.10.0 + go.mongodb.org/mongo-driver v1.16.0 ) require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.8.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.1 // indirect github.com/Azure/go-amqp v1.0.5 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/dapr/dapr v1.12.2 // indirect + github.com/dapr/dapr v1.13.5 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/golang-jwt/jwt/v5 v5.2.1 // indirect github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect github.com/golang-sql/sqlexp v0.1.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/klauspost/compress v1.17.4 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/montanaflynn/stats v0.7.1 // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.1.2 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect - github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect - golang.org/x/crypto v0.24.0 // indirect - golang.org/x/net v0.26.0 // indirect + github.com/youmark/pkcs8 v0.0.0-20240424034433-3c2c7870ae76 // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect + golang.org/x/crypto v0.25.0 // indirect + golang.org/x/net v0.27.0 // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.21.0 // indirect + golang.org/x/sys v0.22.0 // indirect golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240723171418-e6d459c13d2a // indirect + google.golang.org/grpc v1.65.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/test/magpiego/go.sum b/test/magpiego/go.sum index e6d288eefa4..a2f0b5c8d08 100644 --- a/test/magpiego/go.sum +++ b/test/magpiego/go.sum @@ -1,33 +1,33 @@ github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1 h1:E+OJmp2tPvt1W+amx48v1eqbjDYsgN+RzP4q16yV5eM= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.11.1/go.mod h1:a6xsAQUZg+VsS3TJ05SRp524Hs4pZ/AeFSr5ENf0Yjo= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 h1:GJHeeA2N7xrG3q30L2UXDyuWRzDM900/65j70wcM4Ww= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0/go.mod h1:l38EPgmsp71HHLq9j7De57JcKOWPyhrsW1Awm1JS6K0= github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.6.0 h1:U2rTu3Ef+7w9FHKIAXM6ZyqF3UOWJZ12zIm8zECAFfg= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.6.0/go.mod h1:9kIvujWAA58nmPmWB1m23fyWic1kYZMxD9CxaWn4Qpg= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 h1:tfLQ34V6F7tVSwoTf/4lH5sE0o6eCJuNDTmH09nDpbc= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0/go.mod h1:9kIvujWAA58nmPmWB1m23fyWic1kYZMxD9CxaWn4Qpg= github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.8.0 h1:jBQA3cKT4L2rWMpgE7Yt3Hwh2aUj8KXjIGLxjHeYNNo= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.8.0/go.mod h1:4OG6tQ9EOP/MT0NMjDlRzWoVFxfu9rN9B2X+tlSVktg= -github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus v1.7.0 h1:QISzMrspEvZj4zrrN2wlNwfum5RmnKQhQNiSujwH7oU= -github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus v1.7.0/go.mod h1:xNjFERdhyMqZncbNJSPBsTCddk5kwsUVUzELQPMj/LA= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0 h1:AifHbc4mg0x9zW52WOpKbsHaDKuRhlI7TVl47thgQ70= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0/go.mod h1:T5RfihdXtBDxt1Ch2wobif3TvzTdumDy29kahv6AV9A= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0/go.mod h1:iZDifYGJTIgIIkYRNWPENUnqx6bJ2xnSDFI2tjwZNuY= +github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus v1.7.1 h1:o/Ws6bEqMeKZUfj1RRm3mQ51O8JGU5w+Qdg2AhHib6A= +github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus v1.7.1/go.mod h1:6QAMYBAbQeeKX+REFJMZ1nFWu9XLw/PPcjYpuc9RDFs= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.6.0 h1:PiSrjRPpkQNjrM8H0WwKMnZUdu1RGMtd/LdGKUrOo+c= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.6.0/go.mod h1:oDrbWx4ewMylP7xHivfgixbfGBT6APAwsSoHRKotnIc= github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v1.1.0 h1:h4Zxgmi9oyZL2l8jeg1iRTqPloHktywWcu0nlJmo1tA= github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azsecrets v1.1.0/go.mod h1:LgLGXawqSreJz135Elog0ywTJDsm0Hz2k+N+6ZK35u8= -github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 h1:D3occbWoio4EBLkbkevetNMAVX197GkzbUMtqjGWn80= -github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0/go.mod h1:bTSOgj05NGRuHHhQwAdPnYr9TOdNmKlZTgGLL6nyAdI= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.1 h1:fXPMAmuh0gDuRDey0atC8cXBuKIlqCzCkL8sm1n9Ov0= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.1/go.mod h1:SUZc9YRRHfx2+FAQKNDGrssXehqLpxmwRv2mC/5ntj4= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.1 h1:9fXQS/0TtQmKXp8SureKouF+idbQvp7cPUxykiohnBs= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.1/go.mod h1:f+OaoSg0VQYPMqB0Jp2D54j1VHzITYcJaCNwV+k00ts= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.4.0 h1:Be6KInmFEKV81c0pOAEbRYehLMwmmGI1exuFj248AMk= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.4.0/go.mod h1:WCPBHsOXfBVnivScjs2ypRfimjEW0qPVLGgJkZlrIOA= github.com/Azure/go-amqp v1.0.5 h1:po5+ljlcNSU8xtapHTe8gIc8yHxCzC03E8afH2g1ftU= github.com/Azure/go-amqp v1.0.5/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE= github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/dapr/dapr v1.12.2 h1:6wT9zsxfpxOgAQ7wbQIP0fDGqIHK9nKrWm9qS2P0syQ= -github.com/dapr/dapr v1.12.2/go.mod h1:GN/68lUTIsvvv5MRtFmQrBvejOcaM+an4lN/zgfd4VQ= -github.com/dapr/go-sdk v1.9.1 h1:f5gV8HtGz6iBJSsh6eI+/Ews4sGC3W9gX0/oD9ANVqM= -github.com/dapr/go-sdk v1.9.1/go.mod h1:bK9bNEsC6hY3RMKh69r0nBjLqb6njeWTEGVMOgP9g20= +github.com/dapr/dapr v1.13.5 h1:GAhW30DzNKl+2DBMAERZoQH+S2hrkvl/TKsZ59FQ+xM= +github.com/dapr/dapr v1.13.5/go.mod h1:MOvHW0/l11ERywTBLm9NPcGe9x/ZQwA7gTgf8UGT4+M= +github.com/dapr/go-sdk v1.10.1 h1:g6mM2RXyGkrzsqWFfCy8rw+UAt1edQEgRaQXT+XP4PE= +github.com/dapr/go-sdk v1.10.1/go.mod h1:lPjyF/xubh35fbdNdKkxBbFxFNCmta4zmvsk0JxuUG0= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -39,10 +39,10 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cu github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/go-chi/chi/v5 v5.0.12 h1:9euLV5sTrTNTRUU9POmDUvfxyj6LAABLUcEWO+JJb4s= -github.com/go-chi/chi/v5 v5.0.12/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/go-chi/chi/v5 v5.1.0 h1:acVI1TYaD+hhedDJ3r54HyA6sExp3HfXq7QWEEY/xMw= +github.com/go-chi/chi/v5 v5.1.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= @@ -54,25 +54,18 @@ github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= -github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= -github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= @@ -92,15 +85,12 @@ github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjL github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rabbitmq/amqp091-go v1.9.0 h1:qrQtyzB4H8BQgEuJwhmVQqVHB9O4+MNDJCCAcpc3Aoo= -github.com/rabbitmq/amqp091-go v1.9.0/go.mod h1:+jPrT9iY2eLjRaMSRHUhc3z14E/l85kv/f+6luSD3pc= +github.com/rabbitmq/amqp091-go v1.10.0 h1:STpn5XsHlHGcecLmMFCtg7mqq0RnD+zFr4uzukfVhBw= +github.com/rabbitmq/amqp091-go v1.10.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= @@ -109,20 +99,25 @@ github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8= github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= -github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a h1:fZHgsYlfvtyqToslyjUt3VOPF4J7aK/3MPcK7xp3PDk= -github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a/go.mod h1:ul22v+Nro/R083muKhosV54bj5niojjWZvU8xrevuH4= +github.com/youmark/pkcs8 v0.0.0-20240424034433-3c2c7870ae76 h1:tBiBTKHnIjovYoLX/TPkcf+OjqqKGQrPtGT3Foz+Pgo= +github.com/youmark/pkcs8 v0.0.0-20240424034433-3c2c7870ae76/go.mod h1:SQliXeA7Dhkt//vS29v3zpbEwoa+zb2Cn5xj5uO4K5U= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80= -go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= -go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= +go.mongodb.org/mongo-driver v1.16.0 h1:tpRsfBJMROVHKpdGyc1BBEzzjDUWjItxbVSZ8Ls4BQ4= +go.mongodb.org/mongo-driver v1.16.0/go.mod h1:oB6AhJQvFQL4LEHyXi6aJzQJtBiTQHiAd83l0GdFaiw= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/exp v0.0.0-20240119083558-1b970713d09a h1:Q8/wZp0KX97QFTc2ywcOE0YRjZPVIx+MXInMzdvQqcA= +golang.org/x/exp v0.0.0-20240119083558-1b970713d09a/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -130,8 +125,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= @@ -144,8 +139,8 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -159,17 +154,13 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 h1:DC7wcm+i+P1rN3Ff07vL+OndGg5OhNddHyTA+ocPqYE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4/go.mod h1:eJVxU6o+4G1PSczBr85xmyvSNYAKvAYgkub40YGomFM= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240723171418-e6d459c13d2a h1:hqK4+jJZXCU4pW7jsAdGOVFIfLHQeV7LaizZKnZ84HI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240723171418-e6d459c13d2a/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= @@ -181,5 +172,5 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q= -nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= +nhooyr.io/websocket v1.8.11 h1:f/qXNc2/3DpoSZkHt1DQu6rj4zGC8JmkkLkWss0MgN0= +nhooyr.io/websocket v1.8.11/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= diff --git a/test/testrp/Dockerfile b/test/testrp/Dockerfile index 9262b7b457b..99d764bdfe7 100644 --- a/test/testrp/Dockerfile +++ b/test/testrp/Dockerfile @@ -1,19 +1,16 @@ -# Issues on M1 mac: https://github.com/docker/for-mac/issues/5831 -# it is a multistage docker creation for small magpie image -FROM --platform=${TARGETPLATFORM:-linux/amd64} golang:1.22-alpine -WORKDIR /usr/src/tmpapp +FROM gcr.io/distroless/static:nonroot -# Download necessary Go modules -COPY go.mod ./ -RUN go mod download -COPY *.go ./ -# create the go binary -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o testrp . +# Argument for target architecture +ARG TARGETARCH -FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3 -WORKDIR /usr/src/app -COPY --from=0 /usr/src/tmpapp/testrp ./ -EXPOSE 3000 +# Set the working directory +WORKDIR / -#command to start the Test RP as a server to listen at port 5000 -CMD [ "./testrp" ] +# Copy the application binary for the specified architecture +COPY ./linux_${TARGETARCH:-amd64}/release/testrp / + +# Set the user to non-root (65532:65532 is the default non-root user in distroless) +USER 65532:65532 + +# Set the entrypoint to the application binary +ENTRYPOINT ["/testrp"]