From 0d799b026bd6fdc613a83c36b9f47bd82efcd4c8 Mon Sep 17 00:00:00 2001 From: scbedd <45376673+scbedd@users.noreply.github.com> Date: Wed, 23 Feb 2022 11:36:38 -0800 Subject: [PATCH 1/5] patching conda version to current. removing pin of azure-mgmt-resources --- eng/conda_env.yml | 2 +- eng/conda_test_requirements.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/eng/conda_env.yml b/eng/conda_env.yml index 4c674de246a3..b432e880cdbb 100644 --- a/eng/conda_env.yml +++ b/eng/conda_env.yml @@ -1,2 +1,2 @@ variables: - AZURESDK_CONDA_VERSION: '2021.05.01b1' + AZURESDK_CONDA_VERSION: '2021.12.01' diff --git a/eng/conda_test_requirements.txt b/eng/conda_test_requirements.txt index 78d7ca62136e..b359bbbf5b7c 100644 --- a/eng/conda_test_requirements.txt +++ b/eng/conda_test_requirements.txt @@ -1,5 +1,4 @@ # install from root of repo -azure-mgmt-resource==20.0.0 aiohttp>=3.0; python_version >= '3.5' tools/azure-devtools tools/azure-sdk-tools From 3c1ab42b096a91fe3ade01d49a0434eea9c5ac1f Mon Sep 17 00:00:00 2001 From: scbedd <45376673+scbedd@users.noreply.github.com> Date: Fri, 27 May 2022 15:32:15 -0700 Subject: [PATCH 2/5] ensure that we parameterize all docker files in the repo --- sdk/eventhub/azure-eventhub/stress/Dockerfile | 7 ++++--- .../azure-identity/tests/azure-functions/Dockerfile | 6 ++++++ .../tests/managed-identity-live/Dockerfile | 11 ++++++++--- sdk/servicebus/azure-servicebus/stress/Dockerfile | 7 ++++--- tools/Dockerfile | 8 ++++++-- 5 files changed, 28 insertions(+), 11 deletions(-) diff --git a/sdk/eventhub/azure-eventhub/stress/Dockerfile b/sdk/eventhub/azure-eventhub/stress/Dockerfile index 05c55e17da28..de521bb3bf45 100644 --- a/sdk/eventhub/azure-eventhub/stress/Dockerfile +++ b/sdk/eventhub/azure-eventhub/stress/Dockerfile @@ -1,6 +1,7 @@ -# syntax=docker/dockerfile:1 - -FROM python:3.8-slim-buster +# internal users should provide MCR registry to build via 'docker build . --build-arg REGISTRY="mcr.microsoft.com/mirror/docker/library/"' +# public OSS users should simply leave this argument blank or ignore its presence entirely +ARG REGISTRY="" +FROM ${REGISTRY}python:3.8-slim-buster WORKDIR /app diff --git a/sdk/identity/azure-identity/tests/azure-functions/Dockerfile b/sdk/identity/azure-identity/tests/azure-functions/Dockerfile index 04c4001ea683..95e998be0373 100644 --- a/sdk/identity/azure-identity/tests/azure-functions/Dockerfile +++ b/sdk/identity/azure-identity/tests/azure-functions/Dockerfile @@ -3,6 +3,12 @@ # Licensed under the MIT License. # ------------------------------------ # docker can't tell when the repo has changed and will therefore cache this layer + +# internal users should provide MCR registry to build via 'docker build . --build-arg REGISTRY="mcr.microsoft.com/mirror/docker/library/"' +# public OSS users should simply leave this argument blank or ignore its presence entirely +ARG REGISTRY="" +FROM ${REGISTRY}python:3.8-slim-buster + FROM alpine/git as repo RUN git clone https://github.com/Azure/azure-sdk-for-python --single-branch --depth 1 /azure-sdk-for-python diff --git a/sdk/identity/azure-identity/tests/managed-identity-live/Dockerfile b/sdk/identity/azure-identity/tests/managed-identity-live/Dockerfile index 13631a3010db..0b170e344eab 100644 --- a/sdk/identity/azure-identity/tests/managed-identity-live/Dockerfile +++ b/sdk/identity/azure-identity/tests/managed-identity-live/Dockerfile @@ -2,14 +2,19 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + +# internal users should provide MCR registry to build via 'docker build . --build-arg REGISTRY="mcr.microsoft.com/mirror/docker/library/"' +# public OSS users should simply leave this argument blank or ignore its presence entirely +ARG REGISTRY="" ARG PYTHON_VERSION=3.9 # docker can't tell when the repo has changed and will therefore cache this layer -FROM alpine/git as repo -RUN git clone https://github.com/Azure/azure-sdk-for-python --single-branch --depth 1 /azure-sdk-for-python +FROM ${REGISTRY}alpine:3.14 as repo +RUN apk --no-cache add git +RUN git clone https://github.com/Azure/azure-sdk-for-python --single-branch --depth 1 /azure-sdk-for-python -FROM python:${PYTHON_VERSION}-slim +FROM ${REGISTRY}python:${PYTHON_VERSION}-slim COPY --from=repo /azure-sdk-for-python/sdk/identity /sdk/identity COPY --from=repo /azure-sdk-for-python/sdk/core/azure-core /sdk/core/azure-core diff --git a/sdk/servicebus/azure-servicebus/stress/Dockerfile b/sdk/servicebus/azure-servicebus/stress/Dockerfile index 2fd60803a44b..f13d54baff04 100644 --- a/sdk/servicebus/azure-servicebus/stress/Dockerfile +++ b/sdk/servicebus/azure-servicebus/stress/Dockerfile @@ -1,6 +1,7 @@ -# syntax=docker/dockerfile:1 - -FROM python:3.8-slim-buster +# internal users should provide MCR registry to build via 'docker build . --build-arg REGISTRY="mcr.microsoft.com/mirror/docker/library/"' +# public OSS users should simply leave this argument blank or ignore its presence entirely +ARG REGISTRY="" +FROM ${REGISTRY}python:3.8-slim-buster WORKDIR /app diff --git a/tools/Dockerfile b/tools/Dockerfile index 27a3832ee341..aed1c4eba7ed 100644 --- a/tools/Dockerfile +++ b/tools/Dockerfile @@ -1,5 +1,9 @@ -FROM ubuntu -MAINTAINER zikalino +# internal users should provide MCR registry to build via 'docker build . --build-arg REGISTRY="mcr.microsoft.com/mirror/docker/library/"' +# public OSS users should simply leave this argument blank or ignore its presence entirely +ARG REGISTRY="" +FROM ${REGISTRY}ubuntu:20.04 +LABEL MAINTAINER=zikalino \ + MAINTAINER=scbedd RUN apt-get update RUN apt-get install -y git curl gnupg vim python3 python3-pip git software-properties-common apt-transport-https wget python3-venv nodejs npm libunwind-dev From 83fa8bb0076e50f17aadaffe0dc1bf77b705b1c1 Mon Sep 17 00:00:00 2001 From: scbedd <45376673+scbedd@users.noreply.github.com> Date: Fri, 27 May 2022 15:35:57 -0700 Subject: [PATCH 3/5] PR feedback --- sdk/identity/azure-identity/tests/azure-functions/Dockerfile | 4 ++-- .../azure-identity/tests/managed-identity-live/Dockerfile | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/sdk/identity/azure-identity/tests/azure-functions/Dockerfile b/sdk/identity/azure-identity/tests/azure-functions/Dockerfile index 95e998be0373..28ec1cf4df62 100644 --- a/sdk/identity/azure-identity/tests/azure-functions/Dockerfile +++ b/sdk/identity/azure-identity/tests/azure-functions/Dockerfile @@ -7,9 +7,9 @@ # internal users should provide MCR registry to build via 'docker build . --build-arg REGISTRY="mcr.microsoft.com/mirror/docker/library/"' # public OSS users should simply leave this argument blank or ignore its presence entirely ARG REGISTRY="" -FROM ${REGISTRY}python:3.8-slim-buster -FROM alpine/git as repo +FROM ${REGISTRY}alpine:3.14 as repo +RUN apk --no-cache add git RUN git clone https://github.com/Azure/azure-sdk-for-python --single-branch --depth 1 /azure-sdk-for-python diff --git a/sdk/identity/azure-identity/tests/managed-identity-live/Dockerfile b/sdk/identity/azure-identity/tests/managed-identity-live/Dockerfile index 0b170e344eab..69daa0fd76ac 100644 --- a/sdk/identity/azure-identity/tests/managed-identity-live/Dockerfile +++ b/sdk/identity/azure-identity/tests/managed-identity-live/Dockerfile @@ -10,7 +10,6 @@ ARG PYTHON_VERSION=3.9 # docker can't tell when the repo has changed and will therefore cache this layer FROM ${REGISTRY}alpine:3.14 as repo - RUN apk --no-cache add git RUN git clone https://github.com/Azure/azure-sdk-for-python --single-branch --depth 1 /azure-sdk-for-python From d8aadeae87932da49cb33ef5f88a2aa54dd96ab4 Mon Sep 17 00:00:00 2001 From: scbedd <45376673+scbedd@users.noreply.github.com> Date: Fri, 27 May 2022 15:59:42 -0700 Subject: [PATCH 4/5] ensuring that we aren't breaking spellcheck --- .vscode/cspell.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index ef956cced460..dfe86f5322d6 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -494,7 +494,8 @@ "nlocals", "kwonlyargcount", "dcid", - "startf" + "startf", + "dpkg" ] } ], From 4e6b815abc18bb14deca094ce1ad1b74d2945644 Mon Sep 17 00:00:00 2001 From: Scott Beddall Date: Thu, 2 Jun 2022 13:47:32 -0700 Subject: [PATCH 5/5] ensure that the word 'dpkg' doesn't break analyze --- .vscode/cspell.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index dfe86f5322d6..2b7e12e65b80 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -152,6 +152,7 @@ "deserialization", "docfx", "dotenv", + "dpkg", "DWORD", "eastus", "eckey",