From 6d65827ce4eba67700fc3bbe753e2615faef2644 Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Thu, 30 Jul 2026 10:50:45 -0500 Subject: [PATCH 01/17] build: update uv package index --- eng/scripts/install-dependencies.sh | 8 ++++++++ eng/scripts/test-extensions.sh | 8 ++++++++ eng/scripts/test-sdk.sh | 8 ++++++++ eng/templates/jobs/ci-dependency-check.yml | 4 ++++ eng/templates/official/jobs/ci-fc-tests.yml | 1 + 5 files changed, 29 insertions(+) diff --git a/eng/scripts/install-dependencies.sh b/eng/scripts/install-dependencies.sh index e7e0dd00..39513478 100644 --- a/eng/scripts/install-dependencies.sh +++ b/eng/scripts/install-dependencies.sh @@ -1,6 +1,14 @@ #!/bin/bash set -e +# Forward the PipAuthenticate-supplied feed URL to uv. PipAuthenticate@1 sets +# PIP_EXTRA_INDEX_URL so that pip uses the internal feed, but uv does not read +# pip's config or environment variables. Setting UV_INDEX_URL makes uv use the +# internal feed as its primary index instead of going directly to pypi.org. +if [ -n "${PIP_EXTRA_INDEX_URL:-}" ]; then + export UV_INDEX_URL="$PIP_EXTRA_INDEX_URL" +fi + # Install uv for faster dependency resolution / installation. python -m pip install --upgrade pip python -m pip install uv diff --git a/eng/scripts/test-extensions.sh b/eng/scripts/test-extensions.sh index 3bd5adea..f469e483 100644 --- a/eng/scripts/test-extensions.sh +++ b/eng/scripts/test-extensions.sh @@ -1,6 +1,14 @@ #!/bin/bash set -e +# Forward the PipAuthenticate-supplied feed URL to uv. PipAuthenticate@1 sets +# PIP_EXTRA_INDEX_URL so that pip uses the internal feed, but uv does not read +# pip's config or environment variables. Setting UV_INDEX_URL makes uv use the +# internal feed as its primary index instead of going directly to pypi.org. +if [ -n "${PIP_EXTRA_INDEX_URL:-}" ]; then + export UV_INDEX_URL="$PIP_EXTRA_INDEX_URL" +fi + python -m pip install --upgrade pip python -m pip install uv diff --git a/eng/scripts/test-sdk.sh b/eng/scripts/test-sdk.sh index cf5caf1e..cd78a0d7 100644 --- a/eng/scripts/test-sdk.sh +++ b/eng/scripts/test-sdk.sh @@ -1,6 +1,14 @@ #!/bin/bash set -e +# Forward the PipAuthenticate-supplied feed URL to uv. PipAuthenticate@1 sets +# PIP_EXTRA_INDEX_URL so that pip uses the internal feed, but uv does not read +# pip's config or environment variables. Setting UV_INDEX_URL makes uv use the +# internal feed as its primary index instead of going directly to pypi.org. +if [ -n "${PIP_EXTRA_INDEX_URL:-}" ]; then + export UV_INDEX_URL="$PIP_EXTRA_INDEX_URL" +fi + python -m pip install --upgrade pip python -m pip install uv diff --git a/eng/templates/jobs/ci-dependency-check.yml b/eng/templates/jobs/ci-dependency-check.yml index a3bdaa54..1c9b7fb0 100644 --- a/eng/templates/jobs/ci-dependency-check.yml +++ b/eng/templates/jobs/ci-dependency-check.yml @@ -54,6 +54,7 @@ jobs: displayName: 'Set necessary variables' - bash: | echo "Checking azure_functions_worker (Python < 3.13)..." + [ -n "${PIP_EXTRA_INDEX_URL:-}" ] && export UV_INDEX_URL="$PIP_EXTRA_INDEX_URL" cd workers python -m pip install --upgrade pip python -m pip install uv @@ -67,6 +68,7 @@ jobs: condition: eq(variables['proxyWorker'], false) - bash: | echo "Checking proxy_worker (Python >= 3.13)..." + [ -n "${PIP_EXTRA_INDEX_URL:-}" ] && export UV_INDEX_URL="$PIP_EXTRA_INDEX_URL" cd workers python -m pip install --upgrade pip python -m pip install uv @@ -79,6 +81,7 @@ jobs: condition: eq(variables['proxyWorker'], true) - bash: | echo "Checking V1 Library Worker (Python >= 3.13)..." + [ -n "${PIP_EXTRA_INDEX_URL:-}" ] && export UV_INDEX_URL="$PIP_EXTRA_INDEX_URL" cd runtimes/v1 python -m pip install --upgrade pip python -m pip install uv @@ -88,6 +91,7 @@ jobs: condition: eq(variables['proxyWorker'], true) - bash: | echo "Checking V2 Library Worker (Python >= 3.13)..." + [ -n "${PIP_EXTRA_INDEX_URL:-}" ] && export UV_INDEX_URL="$PIP_EXTRA_INDEX_URL" cd runtimes/v2 python -m pip install --upgrade pip python -m pip install uv diff --git a/eng/templates/official/jobs/ci-fc-tests.yml b/eng/templates/official/jobs/ci-fc-tests.yml index f85c389e..f9c79f74 100644 --- a/eng/templates/official/jobs/ci-fc-tests.yml +++ b/eng/templates/official/jobs/ci-fc-tests.yml @@ -67,6 +67,7 @@ jobs: - bash: | python -m pip install --upgrade pip python -m pip install uv + [ -n "${PIP_EXTRA_INDEX_URL:-}" ] && export UV_INDEX_URL="$PIP_EXTRA_INDEX_URL" UV_PIP="python -m uv pip install --system" $UV_PIP "setuptools<82.0" $UV_PIP -U -e ${{ parameters.PROJECT_DIRECTORY }}/[dev] From 93d55f631b0c1b5ab5cbff3e501796a4df406c59 Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Thu, 30 Jul 2026 11:10:46 -0500 Subject: [PATCH 02/17] update based on pipauth behavior --- eng/scripts/install-dependencies.sh | 15 +++++++-------- eng/scripts/test-extensions.sh | 15 +++++++-------- eng/scripts/test-sdk.sh | 15 +++++++-------- eng/templates/jobs/ci-dependency-check.yml | 12 ++++++++---- eng/templates/official/jobs/ci-fc-tests.yml | 3 ++- 5 files changed, 31 insertions(+), 29 deletions(-) diff --git a/eng/scripts/install-dependencies.sh b/eng/scripts/install-dependencies.sh index 39513478..3b1e6d92 100644 --- a/eng/scripts/install-dependencies.sh +++ b/eng/scripts/install-dependencies.sh @@ -1,18 +1,17 @@ #!/bin/bash set -e -# Forward the PipAuthenticate-supplied feed URL to uv. PipAuthenticate@1 sets -# PIP_EXTRA_INDEX_URL so that pip uses the internal feed, but uv does not read -# pip's config or environment variables. Setting UV_INDEX_URL makes uv use the -# internal feed as its primary index instead of going directly to pypi.org. -if [ -n "${PIP_EXTRA_INDEX_URL:-}" ]; then - export UV_INDEX_URL="$PIP_EXTRA_INDEX_URL" -fi - # Install uv for faster dependency resolution / installation. python -m pip install --upgrade pip python -m pip install uv +# PipAuthenticate@1 writes the authenticated feed URL to pip's config file but +# does not expose it as a plain env var (the URL contains a PAT token). uv does +# not read pip's config, so extract the URL here and forward it via UV_INDEX_URL. +_uv_index=$(python -m pip config get global.index-url 2>/dev/null || \ + python -m pip config get global.extra-index-url 2>/dev/null || true) +[ -n "$_uv_index" ] && export UV_INDEX_URL="$_uv_index" + # Use uv as a drop-in replacement for pip. `--system` installs into the active # Python environment (the agent's Python), matching previous `pip install` behavior. UV_PIP="python -m uv pip install --system" diff --git a/eng/scripts/test-extensions.sh b/eng/scripts/test-extensions.sh index f469e483..f30a864b 100644 --- a/eng/scripts/test-extensions.sh +++ b/eng/scripts/test-extensions.sh @@ -1,17 +1,16 @@ #!/bin/bash set -e -# Forward the PipAuthenticate-supplied feed URL to uv. PipAuthenticate@1 sets -# PIP_EXTRA_INDEX_URL so that pip uses the internal feed, but uv does not read -# pip's config or environment variables. Setting UV_INDEX_URL makes uv use the -# internal feed as its primary index instead of going directly to pypi.org. -if [ -n "${PIP_EXTRA_INDEX_URL:-}" ]; then - export UV_INDEX_URL="$PIP_EXTRA_INDEX_URL" -fi - python -m pip install --upgrade pip python -m pip install uv +# PipAuthenticate@1 writes the authenticated feed URL to pip's config file but +# does not expose it as a plain env var (the URL contains a PAT token). uv does +# not read pip's config, so extract the URL here and forward it via UV_INDEX_URL. +_uv_index=$(python -m pip config get global.index-url 2>/dev/null || \ + python -m pip config get global.extra-index-url 2>/dev/null || true) +[ -n "$_uv_index" ] && export UV_INDEX_URL="$_uv_index" + UV_PIP="python -m uv pip install --system" $UV_PIP "setuptools>=62,<82.0" diff --git a/eng/scripts/test-sdk.sh b/eng/scripts/test-sdk.sh index cd78a0d7..cea444bb 100644 --- a/eng/scripts/test-sdk.sh +++ b/eng/scripts/test-sdk.sh @@ -1,17 +1,16 @@ #!/bin/bash set -e -# Forward the PipAuthenticate-supplied feed URL to uv. PipAuthenticate@1 sets -# PIP_EXTRA_INDEX_URL so that pip uses the internal feed, but uv does not read -# pip's config or environment variables. Setting UV_INDEX_URL makes uv use the -# internal feed as its primary index instead of going directly to pypi.org. -if [ -n "${PIP_EXTRA_INDEX_URL:-}" ]; then - export UV_INDEX_URL="$PIP_EXTRA_INDEX_URL" -fi - python -m pip install --upgrade pip python -m pip install uv +# PipAuthenticate@1 writes the authenticated feed URL to pip's config file but +# does not expose it as a plain env var (the URL contains a PAT token). uv does +# not read pip's config, so extract the URL here and forward it via UV_INDEX_URL. +_uv_index=$(python -m pip config get global.index-url 2>/dev/null || \ + python -m pip config get global.extra-index-url 2>/dev/null || true) +[ -n "$_uv_index" ] && export UV_INDEX_URL="$_uv_index" + UV_PIP="python -m uv pip install --system" $UV_PIP "setuptools>=62,<82.0" diff --git a/eng/templates/jobs/ci-dependency-check.yml b/eng/templates/jobs/ci-dependency-check.yml index 1c9b7fb0..b552a7d4 100644 --- a/eng/templates/jobs/ci-dependency-check.yml +++ b/eng/templates/jobs/ci-dependency-check.yml @@ -54,10 +54,11 @@ jobs: displayName: 'Set necessary variables' - bash: | echo "Checking azure_functions_worker (Python < 3.13)..." - [ -n "${PIP_EXTRA_INDEX_URL:-}" ] && export UV_INDEX_URL="$PIP_EXTRA_INDEX_URL" cd workers python -m pip install --upgrade pip python -m pip install uv + _uv_index=$(python -m pip config get global.index-url 2>/dev/null || python -m pip config get global.extra-index-url 2>/dev/null || true) + [ -n "$_uv_index" ] && export UV_INDEX_URL="$_uv_index" python -m uv pip install --system "setuptools<82.0" python -m uv pip install --system . invoke cd tests @@ -68,10 +69,11 @@ jobs: condition: eq(variables['proxyWorker'], false) - bash: | echo "Checking proxy_worker (Python >= 3.13)..." - [ -n "${PIP_EXTRA_INDEX_URL:-}" ] && export UV_INDEX_URL="$PIP_EXTRA_INDEX_URL" cd workers python -m pip install --upgrade pip python -m pip install uv + _uv_index=$(python -m pip config get global.index-url 2>/dev/null || python -m pip config get global.extra-index-url 2>/dev/null || true) + [ -n "$_uv_index" ] && export UV_INDEX_URL="$_uv_index" python -m uv pip install --system . invoke cd tests python -m invoke -c test_setup build-protos @@ -81,20 +83,22 @@ jobs: condition: eq(variables['proxyWorker'], true) - bash: | echo "Checking V1 Library Worker (Python >= 3.13)..." - [ -n "${PIP_EXTRA_INDEX_URL:-}" ] && export UV_INDEX_URL="$PIP_EXTRA_INDEX_URL" cd runtimes/v1 python -m pip install --upgrade pip python -m pip install uv + _uv_index=$(python -m pip config get global.index-url 2>/dev/null || python -m pip config get global.extra-index-url 2>/dev/null || true) + [ -n "$_uv_index" ] && export UV_INDEX_URL="$_uv_index" python -m uv pip install --system . python -c "import pkgutil, importlib; [importlib.import_module(f'azure_functions_runtime_v1.{name}') for _, name, _ in pkgutil.walk_packages(['azure_functions_runtime_v1'])]" displayName: 'Python Library V1: check for missing dependencies' condition: eq(variables['proxyWorker'], true) - bash: | echo "Checking V2 Library Worker (Python >= 3.13)..." - [ -n "${PIP_EXTRA_INDEX_URL:-}" ] && export UV_INDEX_URL="$PIP_EXTRA_INDEX_URL" cd runtimes/v2 python -m pip install --upgrade pip python -m pip install uv + _uv_index=$(python -m pip config get global.index-url 2>/dev/null || python -m pip config get global.extra-index-url 2>/dev/null || true) + [ -n "$_uv_index" ] && export UV_INDEX_URL="$_uv_index" python -m uv pip install --system . python -c "import pkgutil, importlib; [importlib.import_module(f'azure_functions_runtime.{name}') for _, name, _ in pkgutil.walk_packages(['azure_functions_runtime'])]" displayName: 'Python Library V2: check for missing dependencies' diff --git a/eng/templates/official/jobs/ci-fc-tests.yml b/eng/templates/official/jobs/ci-fc-tests.yml index f9c79f74..6f4628e7 100644 --- a/eng/templates/official/jobs/ci-fc-tests.yml +++ b/eng/templates/official/jobs/ci-fc-tests.yml @@ -67,7 +67,8 @@ jobs: - bash: | python -m pip install --upgrade pip python -m pip install uv - [ -n "${PIP_EXTRA_INDEX_URL:-}" ] && export UV_INDEX_URL="$PIP_EXTRA_INDEX_URL" + _uv_index=$(python -m pip config get global.index-url 2>/dev/null || python -m pip config get global.extra-index-url 2>/dev/null || true) + [ -n "$_uv_index" ] && export UV_INDEX_URL="$_uv_index" UV_PIP="python -m uv pip install --system" $UV_PIP "setuptools<82.0" $UV_PIP -U -e ${{ parameters.PROJECT_DIRECTORY }}/[dev] From f86eef7fb9bc519afdaa2b4d220ece20604e39bc Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Thu, 30 Jul 2026 11:38:29 -0500 Subject: [PATCH 03/17] attempt 3 with logs --- eng/scripts/install-dependencies.sh | 28 ++++++++++++---- eng/scripts/test-extensions.sh | 24 ++++++++++---- eng/scripts/test-sdk.sh | 24 ++++++++++---- eng/templates/jobs/ci-dependency-check.yml | 36 ++++++++++++++++----- eng/templates/official/jobs/ci-fc-tests.yml | 9 ++++-- 5 files changed, 90 insertions(+), 31 deletions(-) diff --git a/eng/scripts/install-dependencies.sh b/eng/scripts/install-dependencies.sh index 3b1e6d92..05ada5ef 100644 --- a/eng/scripts/install-dependencies.sh +++ b/eng/scripts/install-dependencies.sh @@ -1,17 +1,31 @@ #!/bin/bash set -e +# PipAuthenticate@1 writes the feed URL to pip.conf and installs artifacts-keyring +# for auth, but does not expose the URL as a plain env var. Read it from pip.conf +# before any installs so pip (PIP_INDEX_URL) and uv (UV_INDEX_URL) both use the +# internal feed. UV_KEYRING_PROVIDER=subprocess delegates uv auth to artifacts-keyring. +echo "--- pip index configuration ---" +for _f in /etc/pip.conf "${HOME}/.config/pip/pip.conf" "${HOME}/.pip/pip.ini"; do + if [ -f "$_f" ]; then echo " found: $_f"; else echo " not found: $_f"; fi +done +_feed_url=$(grep -h -m1 -E '^\s*(extra-)?index-url\s*=' \ + /etc/pip.conf "${HOME}/.config/pip/pip.conf" "${HOME}/.pip/pip.ini" \ + 2>/dev/null | sed 's/^[^=]*=\s*//' | awk '{print $1}') +if [ -n "$_feed_url" ]; then + echo " feed URL: $(echo "$_feed_url" | sed 's|://[^@]*@|://***@|')" + echo " setting PIP_INDEX_URL, UV_INDEX_URL, UV_KEYRING_PROVIDER=subprocess" + export PIP_INDEX_URL="$_feed_url" + export UV_INDEX_URL="$_feed_url" + export UV_KEYRING_PROVIDER=subprocess +else + echo " no internal feed detected; installs will use PyPI" +fi + # Install uv for faster dependency resolution / installation. python -m pip install --upgrade pip python -m pip install uv -# PipAuthenticate@1 writes the authenticated feed URL to pip's config file but -# does not expose it as a plain env var (the URL contains a PAT token). uv does -# not read pip's config, so extract the URL here and forward it via UV_INDEX_URL. -_uv_index=$(python -m pip config get global.index-url 2>/dev/null || \ - python -m pip config get global.extra-index-url 2>/dev/null || true) -[ -n "$_uv_index" ] && export UV_INDEX_URL="$_uv_index" - # Use uv as a drop-in replacement for pip. `--system` installs into the active # Python environment (the agent's Python), matching previous `pip install` behavior. UV_PIP="python -m uv pip install --system" diff --git a/eng/scripts/test-extensions.sh b/eng/scripts/test-extensions.sh index f30a864b..3227a2cd 100644 --- a/eng/scripts/test-extensions.sh +++ b/eng/scripts/test-extensions.sh @@ -1,16 +1,26 @@ #!/bin/bash set -e +echo "--- pip index configuration ---" +for _f in /etc/pip.conf "${HOME}/.config/pip/pip.conf" "${HOME}/.pip/pip.ini"; do + if [ -f "$_f" ]; then echo " found: $_f"; else echo " not found: $_f"; fi +done +_feed_url=$(grep -h -m1 -E '^\s*(extra-)?index-url\s*=' \ + /etc/pip.conf "${HOME}/.config/pip/pip.conf" "${HOME}/.pip/pip.ini" \ + 2>/dev/null | sed 's/^[^=]*=\s*//' | awk '{print $1}') +if [ -n "$_feed_url" ]; then + echo " feed URL: $(echo "$_feed_url" | sed 's|://[^@]*@|://***@|')" + echo " setting PIP_INDEX_URL, UV_INDEX_URL, UV_KEYRING_PROVIDER=subprocess" + export PIP_INDEX_URL="$_feed_url" + export UV_INDEX_URL="$_feed_url" + export UV_KEYRING_PROVIDER=subprocess +else + echo " no internal feed detected; installs will use PyPI" +fi + python -m pip install --upgrade pip python -m pip install uv -# PipAuthenticate@1 writes the authenticated feed URL to pip's config file but -# does not expose it as a plain env var (the URL contains a PAT token). uv does -# not read pip's config, so extract the URL here and forward it via UV_INDEX_URL. -_uv_index=$(python -m pip config get global.index-url 2>/dev/null || \ - python -m pip config get global.extra-index-url 2>/dev/null || true) -[ -n "$_uv_index" ] && export UV_INDEX_URL="$_uv_index" - UV_PIP="python -m uv pip install --system" $UV_PIP "setuptools>=62,<82.0" diff --git a/eng/scripts/test-sdk.sh b/eng/scripts/test-sdk.sh index cea444bb..46a9f87e 100644 --- a/eng/scripts/test-sdk.sh +++ b/eng/scripts/test-sdk.sh @@ -1,16 +1,26 @@ #!/bin/bash set -e +echo "--- pip index configuration ---" +for _f in /etc/pip.conf "${HOME}/.config/pip/pip.conf" "${HOME}/.pip/pip.ini"; do + if [ -f "$_f" ]; then echo " found: $_f"; else echo " not found: $_f"; fi +done +_feed_url=$(grep -h -m1 -E '^\s*(extra-)?index-url\s*=' \ + /etc/pip.conf "${HOME}/.config/pip/pip.conf" "${HOME}/.pip/pip.ini" \ + 2>/dev/null | sed 's/^[^=]*=\s*//' | awk '{print $1}') +if [ -n "$_feed_url" ]; then + echo " feed URL: $(echo "$_feed_url" | sed 's|://[^@]*@|://***@|')" + echo " setting PIP_INDEX_URL, UV_INDEX_URL, UV_KEYRING_PROVIDER=subprocess" + export PIP_INDEX_URL="$_feed_url" + export UV_INDEX_URL="$_feed_url" + export UV_KEYRING_PROVIDER=subprocess +else + echo " no internal feed detected; installs will use PyPI" +fi + python -m pip install --upgrade pip python -m pip install uv -# PipAuthenticate@1 writes the authenticated feed URL to pip's config file but -# does not expose it as a plain env var (the URL contains a PAT token). uv does -# not read pip's config, so extract the URL here and forward it via UV_INDEX_URL. -_uv_index=$(python -m pip config get global.index-url 2>/dev/null || \ - python -m pip config get global.extra-index-url 2>/dev/null || true) -[ -n "$_uv_index" ] && export UV_INDEX_URL="$_uv_index" - UV_PIP="python -m uv pip install --system" $UV_PIP "setuptools>=62,<82.0" diff --git a/eng/templates/jobs/ci-dependency-check.yml b/eng/templates/jobs/ci-dependency-check.yml index b552a7d4..59d5f656 100644 --- a/eng/templates/jobs/ci-dependency-check.yml +++ b/eng/templates/jobs/ci-dependency-check.yml @@ -54,11 +54,16 @@ jobs: displayName: 'Set necessary variables' - bash: | echo "Checking azure_functions_worker (Python < 3.13)..." + _feed_url=$(grep -h -m1 -E '^\s*(extra-)?index-url\s*=' /etc/pip.conf "${HOME}/.config/pip/pip.conf" "${HOME}/.pip/pip.ini" 2>/dev/null | sed 's/^[^=]*=\s*//' | awk '{print $1}') + if [ -n "$_feed_url" ]; then + echo "Internal feed: $(echo "$_feed_url" | sed 's|://[^@]*@|://***@|')" + export PIP_INDEX_URL="$_feed_url" UV_INDEX_URL="$_feed_url" UV_KEYRING_PROVIDER=subprocess + else + echo "No internal feed detected; installs will use PyPI" + fi cd workers python -m pip install --upgrade pip python -m pip install uv - _uv_index=$(python -m pip config get global.index-url 2>/dev/null || python -m pip config get global.extra-index-url 2>/dev/null || true) - [ -n "$_uv_index" ] && export UV_INDEX_URL="$_uv_index" python -m uv pip install --system "setuptools<82.0" python -m uv pip install --system . invoke cd tests @@ -69,11 +74,16 @@ jobs: condition: eq(variables['proxyWorker'], false) - bash: | echo "Checking proxy_worker (Python >= 3.13)..." + _feed_url=$(grep -h -m1 -E '^\s*(extra-)?index-url\s*=' /etc/pip.conf "${HOME}/.config/pip/pip.conf" "${HOME}/.pip/pip.ini" 2>/dev/null | sed 's/^[^=]*=\s*//' | awk '{print $1}') + if [ -n "$_feed_url" ]; then + echo "Internal feed: $(echo "$_feed_url" | sed 's|://[^@]*@|://***@|')" + export PIP_INDEX_URL="$_feed_url" UV_INDEX_URL="$_feed_url" UV_KEYRING_PROVIDER=subprocess + else + echo "No internal feed detected; installs will use PyPI" + fi cd workers python -m pip install --upgrade pip python -m pip install uv - _uv_index=$(python -m pip config get global.index-url 2>/dev/null || python -m pip config get global.extra-index-url 2>/dev/null || true) - [ -n "$_uv_index" ] && export UV_INDEX_URL="$_uv_index" python -m uv pip install --system . invoke cd tests python -m invoke -c test_setup build-protos @@ -83,22 +93,32 @@ jobs: condition: eq(variables['proxyWorker'], true) - bash: | echo "Checking V1 Library Worker (Python >= 3.13)..." + _feed_url=$(grep -h -m1 -E '^\s*(extra-)?index-url\s*=' /etc/pip.conf "${HOME}/.config/pip/pip.conf" "${HOME}/.pip/pip.ini" 2>/dev/null | sed 's/^[^=]*=\s*//' | awk '{print $1}') + if [ -n "$_feed_url" ]; then + echo "Internal feed: $(echo "$_feed_url" | sed 's|://[^@]*@|://***@|')" + export PIP_INDEX_URL="$_feed_url" UV_INDEX_URL="$_feed_url" UV_KEYRING_PROVIDER=subprocess + else + echo "No internal feed detected; installs will use PyPI" + fi cd runtimes/v1 python -m pip install --upgrade pip python -m pip install uv - _uv_index=$(python -m pip config get global.index-url 2>/dev/null || python -m pip config get global.extra-index-url 2>/dev/null || true) - [ -n "$_uv_index" ] && export UV_INDEX_URL="$_uv_index" python -m uv pip install --system . python -c "import pkgutil, importlib; [importlib.import_module(f'azure_functions_runtime_v1.{name}') for _, name, _ in pkgutil.walk_packages(['azure_functions_runtime_v1'])]" displayName: 'Python Library V1: check for missing dependencies' condition: eq(variables['proxyWorker'], true) - bash: | echo "Checking V2 Library Worker (Python >= 3.13)..." + _feed_url=$(grep -h -m1 -E '^\s*(extra-)?index-url\s*=' /etc/pip.conf "${HOME}/.config/pip/pip.conf" "${HOME}/.pip/pip.ini" 2>/dev/null | sed 's/^[^=]*=\s*//' | awk '{print $1}') + if [ -n "$_feed_url" ]; then + echo "Internal feed: $(echo "$_feed_url" | sed 's|://[^@]*@|://***@|')" + export PIP_INDEX_URL="$_feed_url" UV_INDEX_URL="$_feed_url" UV_KEYRING_PROVIDER=subprocess + else + echo "No internal feed detected; installs will use PyPI" + fi cd runtimes/v2 python -m pip install --upgrade pip python -m pip install uv - _uv_index=$(python -m pip config get global.index-url 2>/dev/null || python -m pip config get global.extra-index-url 2>/dev/null || true) - [ -n "$_uv_index" ] && export UV_INDEX_URL="$_uv_index" python -m uv pip install --system . python -c "import pkgutil, importlib; [importlib.import_module(f'azure_functions_runtime.{name}') for _, name, _ in pkgutil.walk_packages(['azure_functions_runtime'])]" displayName: 'Python Library V2: check for missing dependencies' diff --git a/eng/templates/official/jobs/ci-fc-tests.yml b/eng/templates/official/jobs/ci-fc-tests.yml index 6f4628e7..daa4538b 100644 --- a/eng/templates/official/jobs/ci-fc-tests.yml +++ b/eng/templates/official/jobs/ci-fc-tests.yml @@ -65,10 +65,15 @@ jobs: condition: and(eq(variables.isSdkRelease, false), eq(variables.isExtensionsRelease, false), eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false)) - bash: | + _feed_url=$(grep -h -m1 -E '^\s*(extra-)?index-url\s*=' /etc/pip.conf "${HOME}/.config/pip/pip.conf" "${HOME}/.pip/pip.ini" 2>/dev/null | sed 's/^[^=]*=\s*//' | awk '{print $1}') + if [ -n "$_feed_url" ]; then + echo "Internal feed: $(echo "$_feed_url" | sed 's|://[^@]*@|://***@|')" + export PIP_INDEX_URL="$_feed_url" UV_INDEX_URL="$_feed_url" UV_KEYRING_PROVIDER=subprocess + else + echo "No internal feed detected; installs will use PyPI" + fi python -m pip install --upgrade pip python -m pip install uv - _uv_index=$(python -m pip config get global.index-url 2>/dev/null || python -m pip config get global.extra-index-url 2>/dev/null || true) - [ -n "$_uv_index" ] && export UV_INDEX_URL="$_uv_index" UV_PIP="python -m uv pip install --system" $UV_PIP "setuptools<82.0" $UV_PIP -U -e ${{ parameters.PROJECT_DIRECTORY }}/[dev] From 82010ebba045bd33d56cf29632b55e81dc7ac014 Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Thu, 30 Jul 2026 12:04:26 -0500 Subject: [PATCH 04/17] attempt 4 --- eng/scripts/install-dependencies.sh | 25 +++---------- eng/scripts/test-extensions.sh | 20 +++-------- eng/scripts/test-sdk.sh | 20 +++-------- eng/templates/jobs/ci-dependency-check.yml | 40 +++++++-------------- eng/templates/official/jobs/ci-fc-tests.yml | 10 ++---- 5 files changed, 28 insertions(+), 87 deletions(-) diff --git a/eng/scripts/install-dependencies.sh b/eng/scripts/install-dependencies.sh index 05ada5ef..ef8acf6a 100644 --- a/eng/scripts/install-dependencies.sh +++ b/eng/scripts/install-dependencies.sh @@ -1,26 +1,11 @@ #!/bin/bash set -e -# PipAuthenticate@1 writes the feed URL to pip.conf and installs artifacts-keyring -# for auth, but does not expose the URL as a plain env var. Read it from pip.conf -# before any installs so pip (PIP_INDEX_URL) and uv (UV_INDEX_URL) both use the -# internal feed. UV_KEYRING_PROVIDER=subprocess delegates uv auth to artifacts-keyring. -echo "--- pip index configuration ---" -for _f in /etc/pip.conf "${HOME}/.config/pip/pip.conf" "${HOME}/.pip/pip.ini"; do - if [ -f "$_f" ]; then echo " found: $_f"; else echo " not found: $_f"; fi -done -_feed_url=$(grep -h -m1 -E '^\s*(extra-)?index-url\s*=' \ - /etc/pip.conf "${HOME}/.config/pip/pip.conf" "${HOME}/.pip/pip.ini" \ - 2>/dev/null | sed 's/^[^=]*=\s*//' | awk '{print $1}') -if [ -n "$_feed_url" ]; then - echo " feed URL: $(echo "$_feed_url" | sed 's|://[^@]*@|://***@|')" - echo " setting PIP_INDEX_URL, UV_INDEX_URL, UV_KEYRING_PROVIDER=subprocess" - export PIP_INDEX_URL="$_feed_url" - export UV_INDEX_URL="$_feed_url" - export UV_KEYRING_PROVIDER=subprocess -else - echo " no internal feed detected; installs will use PyPI" -fi +# Route all installs through the internal Azure Artifacts feed instead of pypi.org. +export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/" +export UV_INDEX_URL="$PIP_INDEX_URL" +export UV_KEYRING_PROVIDER=subprocess +echo "Using index: $PIP_INDEX_URL" # Install uv for faster dependency resolution / installation. python -m pip install --upgrade pip diff --git a/eng/scripts/test-extensions.sh b/eng/scripts/test-extensions.sh index 3227a2cd..940a310c 100644 --- a/eng/scripts/test-extensions.sh +++ b/eng/scripts/test-extensions.sh @@ -1,22 +1,10 @@ #!/bin/bash set -e -echo "--- pip index configuration ---" -for _f in /etc/pip.conf "${HOME}/.config/pip/pip.conf" "${HOME}/.pip/pip.ini"; do - if [ -f "$_f" ]; then echo " found: $_f"; else echo " not found: $_f"; fi -done -_feed_url=$(grep -h -m1 -E '^\s*(extra-)?index-url\s*=' \ - /etc/pip.conf "${HOME}/.config/pip/pip.conf" "${HOME}/.pip/pip.ini" \ - 2>/dev/null | sed 's/^[^=]*=\s*//' | awk '{print $1}') -if [ -n "$_feed_url" ]; then - echo " feed URL: $(echo "$_feed_url" | sed 's|://[^@]*@|://***@|')" - echo " setting PIP_INDEX_URL, UV_INDEX_URL, UV_KEYRING_PROVIDER=subprocess" - export PIP_INDEX_URL="$_feed_url" - export UV_INDEX_URL="$_feed_url" - export UV_KEYRING_PROVIDER=subprocess -else - echo " no internal feed detected; installs will use PyPI" -fi +export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/" +export UV_INDEX_URL="$PIP_INDEX_URL" +export UV_KEYRING_PROVIDER=subprocess +echo "Using index: $PIP_INDEX_URL" python -m pip install --upgrade pip python -m pip install uv diff --git a/eng/scripts/test-sdk.sh b/eng/scripts/test-sdk.sh index 46a9f87e..68b7a41d 100644 --- a/eng/scripts/test-sdk.sh +++ b/eng/scripts/test-sdk.sh @@ -1,22 +1,10 @@ #!/bin/bash set -e -echo "--- pip index configuration ---" -for _f in /etc/pip.conf "${HOME}/.config/pip/pip.conf" "${HOME}/.pip/pip.ini"; do - if [ -f "$_f" ]; then echo " found: $_f"; else echo " not found: $_f"; fi -done -_feed_url=$(grep -h -m1 -E '^\s*(extra-)?index-url\s*=' \ - /etc/pip.conf "${HOME}/.config/pip/pip.conf" "${HOME}/.pip/pip.ini" \ - 2>/dev/null | sed 's/^[^=]*=\s*//' | awk '{print $1}') -if [ -n "$_feed_url" ]; then - echo " feed URL: $(echo "$_feed_url" | sed 's|://[^@]*@|://***@|')" - echo " setting PIP_INDEX_URL, UV_INDEX_URL, UV_KEYRING_PROVIDER=subprocess" - export PIP_INDEX_URL="$_feed_url" - export UV_INDEX_URL="$_feed_url" - export UV_KEYRING_PROVIDER=subprocess -else - echo " no internal feed detected; installs will use PyPI" -fi +export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/" +export UV_INDEX_URL="$PIP_INDEX_URL" +export UV_KEYRING_PROVIDER=subprocess +echo "Using index: $PIP_INDEX_URL" python -m pip install --upgrade pip python -m pip install uv diff --git a/eng/templates/jobs/ci-dependency-check.yml b/eng/templates/jobs/ci-dependency-check.yml index 59d5f656..bc5ca1de 100644 --- a/eng/templates/jobs/ci-dependency-check.yml +++ b/eng/templates/jobs/ci-dependency-check.yml @@ -54,13 +54,9 @@ jobs: displayName: 'Set necessary variables' - bash: | echo "Checking azure_functions_worker (Python < 3.13)..." - _feed_url=$(grep -h -m1 -E '^\s*(extra-)?index-url\s*=' /etc/pip.conf "${HOME}/.config/pip/pip.conf" "${HOME}/.pip/pip.ini" 2>/dev/null | sed 's/^[^=]*=\s*//' | awk '{print $1}') - if [ -n "$_feed_url" ]; then - echo "Internal feed: $(echo "$_feed_url" | sed 's|://[^@]*@|://***@|')" - export PIP_INDEX_URL="$_feed_url" UV_INDEX_URL="$_feed_url" UV_KEYRING_PROVIDER=subprocess - else - echo "No internal feed detected; installs will use PyPI" - fi + export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/" + export UV_INDEX_URL="$PIP_INDEX_URL" UV_KEYRING_PROVIDER=subprocess + echo "Using index: $PIP_INDEX_URL" cd workers python -m pip install --upgrade pip python -m pip install uv @@ -74,13 +70,9 @@ jobs: condition: eq(variables['proxyWorker'], false) - bash: | echo "Checking proxy_worker (Python >= 3.13)..." - _feed_url=$(grep -h -m1 -E '^\s*(extra-)?index-url\s*=' /etc/pip.conf "${HOME}/.config/pip/pip.conf" "${HOME}/.pip/pip.ini" 2>/dev/null | sed 's/^[^=]*=\s*//' | awk '{print $1}') - if [ -n "$_feed_url" ]; then - echo "Internal feed: $(echo "$_feed_url" | sed 's|://[^@]*@|://***@|')" - export PIP_INDEX_URL="$_feed_url" UV_INDEX_URL="$_feed_url" UV_KEYRING_PROVIDER=subprocess - else - echo "No internal feed detected; installs will use PyPI" - fi + export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/" + export UV_INDEX_URL="$PIP_INDEX_URL" UV_KEYRING_PROVIDER=subprocess + echo "Using index: $PIP_INDEX_URL" cd workers python -m pip install --upgrade pip python -m pip install uv @@ -93,13 +85,9 @@ jobs: condition: eq(variables['proxyWorker'], true) - bash: | echo "Checking V1 Library Worker (Python >= 3.13)..." - _feed_url=$(grep -h -m1 -E '^\s*(extra-)?index-url\s*=' /etc/pip.conf "${HOME}/.config/pip/pip.conf" "${HOME}/.pip/pip.ini" 2>/dev/null | sed 's/^[^=]*=\s*//' | awk '{print $1}') - if [ -n "$_feed_url" ]; then - echo "Internal feed: $(echo "$_feed_url" | sed 's|://[^@]*@|://***@|')" - export PIP_INDEX_URL="$_feed_url" UV_INDEX_URL="$_feed_url" UV_KEYRING_PROVIDER=subprocess - else - echo "No internal feed detected; installs will use PyPI" - fi + export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/" + export UV_INDEX_URL="$PIP_INDEX_URL" UV_KEYRING_PROVIDER=subprocess + echo "Using index: $PIP_INDEX_URL" cd runtimes/v1 python -m pip install --upgrade pip python -m pip install uv @@ -109,13 +97,9 @@ jobs: condition: eq(variables['proxyWorker'], true) - bash: | echo "Checking V2 Library Worker (Python >= 3.13)..." - _feed_url=$(grep -h -m1 -E '^\s*(extra-)?index-url\s*=' /etc/pip.conf "${HOME}/.config/pip/pip.conf" "${HOME}/.pip/pip.ini" 2>/dev/null | sed 's/^[^=]*=\s*//' | awk '{print $1}') - if [ -n "$_feed_url" ]; then - echo "Internal feed: $(echo "$_feed_url" | sed 's|://[^@]*@|://***@|')" - export PIP_INDEX_URL="$_feed_url" UV_INDEX_URL="$_feed_url" UV_KEYRING_PROVIDER=subprocess - else - echo "No internal feed detected; installs will use PyPI" - fi + export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/" + export UV_INDEX_URL="$PIP_INDEX_URL" UV_KEYRING_PROVIDER=subprocess + echo "Using index: $PIP_INDEX_URL" cd runtimes/v2 python -m pip install --upgrade pip python -m pip install uv diff --git a/eng/templates/official/jobs/ci-fc-tests.yml b/eng/templates/official/jobs/ci-fc-tests.yml index daa4538b..e7486e0a 100644 --- a/eng/templates/official/jobs/ci-fc-tests.yml +++ b/eng/templates/official/jobs/ci-fc-tests.yml @@ -65,13 +65,9 @@ jobs: condition: and(eq(variables.isSdkRelease, false), eq(variables.isExtensionsRelease, false), eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false)) - bash: | - _feed_url=$(grep -h -m1 -E '^\s*(extra-)?index-url\s*=' /etc/pip.conf "${HOME}/.config/pip/pip.conf" "${HOME}/.pip/pip.ini" 2>/dev/null | sed 's/^[^=]*=\s*//' | awk '{print $1}') - if [ -n "$_feed_url" ]; then - echo "Internal feed: $(echo "$_feed_url" | sed 's|://[^@]*@|://***@|')" - export PIP_INDEX_URL="$_feed_url" UV_INDEX_URL="$_feed_url" UV_KEYRING_PROVIDER=subprocess - else - echo "No internal feed detected; installs will use PyPI" - fi + export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/" + export UV_INDEX_URL="$PIP_INDEX_URL" UV_KEYRING_PROVIDER=subprocess + echo "Using index: $PIP_INDEX_URL" python -m pip install --upgrade pip python -m pip install uv UV_PIP="python -m uv pip install --system" From 6dd569b4dd24950b9bc3f49b79f79c5c200b1d53 Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Thu, 30 Jul 2026 13:07:36 -0500 Subject: [PATCH 05/17] correct index url --- eng/scripts/install-dependencies.sh | 2 +- eng/scripts/test-extensions.sh | 2 +- eng/scripts/test-sdk.sh | 2 +- eng/templates/jobs/ci-dependency-check.yml | 8 ++++---- eng/templates/official/jobs/ci-fc-tests.yml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/eng/scripts/install-dependencies.sh b/eng/scripts/install-dependencies.sh index ef8acf6a..f76dca8c 100644 --- a/eng/scripts/install-dependencies.sh +++ b/eng/scripts/install-dependencies.sh @@ -2,7 +2,7 @@ set -e # Route all installs through the internal Azure Artifacts feed instead of pypi.org. -export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/" +export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/" export UV_INDEX_URL="$PIP_INDEX_URL" export UV_KEYRING_PROVIDER=subprocess echo "Using index: $PIP_INDEX_URL" diff --git a/eng/scripts/test-extensions.sh b/eng/scripts/test-extensions.sh index 940a310c..1ca3ebdb 100644 --- a/eng/scripts/test-extensions.sh +++ b/eng/scripts/test-extensions.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/" +export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/" export UV_INDEX_URL="$PIP_INDEX_URL" export UV_KEYRING_PROVIDER=subprocess echo "Using index: $PIP_INDEX_URL" diff --git a/eng/scripts/test-sdk.sh b/eng/scripts/test-sdk.sh index 68b7a41d..e3b56219 100644 --- a/eng/scripts/test-sdk.sh +++ b/eng/scripts/test-sdk.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/" +export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/" export UV_INDEX_URL="$PIP_INDEX_URL" export UV_KEYRING_PROVIDER=subprocess echo "Using index: $PIP_INDEX_URL" diff --git a/eng/templates/jobs/ci-dependency-check.yml b/eng/templates/jobs/ci-dependency-check.yml index bc5ca1de..1d173897 100644 --- a/eng/templates/jobs/ci-dependency-check.yml +++ b/eng/templates/jobs/ci-dependency-check.yml @@ -54,7 +54,7 @@ jobs: displayName: 'Set necessary variables' - bash: | echo "Checking azure_functions_worker (Python < 3.13)..." - export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/" + export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/" export UV_INDEX_URL="$PIP_INDEX_URL" UV_KEYRING_PROVIDER=subprocess echo "Using index: $PIP_INDEX_URL" cd workers @@ -70,7 +70,7 @@ jobs: condition: eq(variables['proxyWorker'], false) - bash: | echo "Checking proxy_worker (Python >= 3.13)..." - export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/" + export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/" export UV_INDEX_URL="$PIP_INDEX_URL" UV_KEYRING_PROVIDER=subprocess echo "Using index: $PIP_INDEX_URL" cd workers @@ -85,7 +85,7 @@ jobs: condition: eq(variables['proxyWorker'], true) - bash: | echo "Checking V1 Library Worker (Python >= 3.13)..." - export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/" + export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/" export UV_INDEX_URL="$PIP_INDEX_URL" UV_KEYRING_PROVIDER=subprocess echo "Using index: $PIP_INDEX_URL" cd runtimes/v1 @@ -97,7 +97,7 @@ jobs: condition: eq(variables['proxyWorker'], true) - bash: | echo "Checking V2 Library Worker (Python >= 3.13)..." - export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/" + export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/" export UV_INDEX_URL="$PIP_INDEX_URL" UV_KEYRING_PROVIDER=subprocess echo "Using index: $PIP_INDEX_URL" cd runtimes/v2 diff --git a/eng/templates/official/jobs/ci-fc-tests.yml b/eng/templates/official/jobs/ci-fc-tests.yml index e7486e0a..037eb966 100644 --- a/eng/templates/official/jobs/ci-fc-tests.yml +++ b/eng/templates/official/jobs/ci-fc-tests.yml @@ -65,7 +65,7 @@ jobs: condition: and(eq(variables.isSdkRelease, false), eq(variables.isExtensionsRelease, false), eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false)) - bash: | - export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/" + export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/" export UV_INDEX_URL="$PIP_INDEX_URL" UV_KEYRING_PROVIDER=subprocess echo "Using index: $PIP_INDEX_URL" python -m pip install --upgrade pip From ca28f99cd60dc7719df90cb6548e48d3007e32bb Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Thu, 30 Jul 2026 13:26:32 -0500 Subject: [PATCH 06/17] correct index url pt2 --- eng/scripts/install-dependencies.sh | 2 +- eng/scripts/test-extensions.sh | 2 +- eng/scripts/test-sdk.sh | 2 +- eng/templates/jobs/ci-dependency-check.yml | 8 ++++---- eng/templates/official/jobs/ci-fc-tests.yml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/eng/scripts/install-dependencies.sh b/eng/scripts/install-dependencies.sh index f76dca8c..40770e76 100644 --- a/eng/scripts/install-dependencies.sh +++ b/eng/scripts/install-dependencies.sh @@ -2,7 +2,7 @@ set -e # Route all installs through the internal Azure Artifacts feed instead of pypi.org. -export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/" +export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" export UV_INDEX_URL="$PIP_INDEX_URL" export UV_KEYRING_PROVIDER=subprocess echo "Using index: $PIP_INDEX_URL" diff --git a/eng/scripts/test-extensions.sh b/eng/scripts/test-extensions.sh index 1ca3ebdb..ade7a4bc 100644 --- a/eng/scripts/test-extensions.sh +++ b/eng/scripts/test-extensions.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/" +export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" export UV_INDEX_URL="$PIP_INDEX_URL" export UV_KEYRING_PROVIDER=subprocess echo "Using index: $PIP_INDEX_URL" diff --git a/eng/scripts/test-sdk.sh b/eng/scripts/test-sdk.sh index e3b56219..14f90f12 100644 --- a/eng/scripts/test-sdk.sh +++ b/eng/scripts/test-sdk.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/" +export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" export UV_INDEX_URL="$PIP_INDEX_URL" export UV_KEYRING_PROVIDER=subprocess echo "Using index: $PIP_INDEX_URL" diff --git a/eng/templates/jobs/ci-dependency-check.yml b/eng/templates/jobs/ci-dependency-check.yml index 1d173897..21f10d74 100644 --- a/eng/templates/jobs/ci-dependency-check.yml +++ b/eng/templates/jobs/ci-dependency-check.yml @@ -54,7 +54,7 @@ jobs: displayName: 'Set necessary variables' - bash: | echo "Checking azure_functions_worker (Python < 3.13)..." - export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/" + export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" export UV_INDEX_URL="$PIP_INDEX_URL" UV_KEYRING_PROVIDER=subprocess echo "Using index: $PIP_INDEX_URL" cd workers @@ -70,7 +70,7 @@ jobs: condition: eq(variables['proxyWorker'], false) - bash: | echo "Checking proxy_worker (Python >= 3.13)..." - export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/" + export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" export UV_INDEX_URL="$PIP_INDEX_URL" UV_KEYRING_PROVIDER=subprocess echo "Using index: $PIP_INDEX_URL" cd workers @@ -85,7 +85,7 @@ jobs: condition: eq(variables['proxyWorker'], true) - bash: | echo "Checking V1 Library Worker (Python >= 3.13)..." - export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/" + export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" export UV_INDEX_URL="$PIP_INDEX_URL" UV_KEYRING_PROVIDER=subprocess echo "Using index: $PIP_INDEX_URL" cd runtimes/v1 @@ -97,7 +97,7 @@ jobs: condition: eq(variables['proxyWorker'], true) - bash: | echo "Checking V2 Library Worker (Python >= 3.13)..." - export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/" + export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" export UV_INDEX_URL="$PIP_INDEX_URL" UV_KEYRING_PROVIDER=subprocess echo "Using index: $PIP_INDEX_URL" cd runtimes/v2 diff --git a/eng/templates/official/jobs/ci-fc-tests.yml b/eng/templates/official/jobs/ci-fc-tests.yml index 037eb966..ed074914 100644 --- a/eng/templates/official/jobs/ci-fc-tests.yml +++ b/eng/templates/official/jobs/ci-fc-tests.yml @@ -65,7 +65,7 @@ jobs: condition: and(eq(variables.isSdkRelease, false), eq(variables.isExtensionsRelease, false), eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false)) - bash: | - export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/" + export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" export UV_INDEX_URL="$PIP_INDEX_URL" UV_KEYRING_PROVIDER=subprocess echo "Using index: $PIP_INDEX_URL" python -m pip install --upgrade pip From 528501088810056e2483eecdb4b6dbf70e0376ea Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Thu, 30 Jul 2026 13:44:25 -0500 Subject: [PATCH 07/17] hmmmm? --- eng/scripts/install-dependencies.sh | 8 ++--- eng/scripts/test-extensions.sh | 5 ++- eng/scripts/test-sdk.sh | 5 ++- eng/templates/jobs/ci-dependency-check.yml | 32 ++++++++++++------- eng/templates/jobs/ci-emulator-tests.yml | 6 ++++ eng/templates/jobs/ci-library-unit-tests.yml | 2 ++ eng/templates/jobs/ci-unit-tests.yml | 2 ++ .../official/jobs/ci-custom-image-tests.yml | 2 ++ .../jobs/ci-docker-dedicated-tests.yml | 2 ++ eng/templates/official/jobs/ci-e2e-tests.yml | 6 ++++ eng/templates/official/jobs/ci-fc-tests.yml | 8 +++-- 11 files changed, 53 insertions(+), 25 deletions(-) diff --git a/eng/scripts/install-dependencies.sh b/eng/scripts/install-dependencies.sh index 40770e76..3c7a7446 100644 --- a/eng/scripts/install-dependencies.sh +++ b/eng/scripts/install-dependencies.sh @@ -1,11 +1,11 @@ #!/bin/bash set -e -# Route all installs through the internal Azure Artifacts feed instead of pypi.org. -export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" -export UV_INDEX_URL="$PIP_INDEX_URL" +# Route uv through the internal Azure Artifacts feed. PipAuthenticate handles +# pip's auth separately; setting PIP_INDEX_URL would override that and hang. +export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" export UV_KEYRING_PROVIDER=subprocess -echo "Using index: $PIP_INDEX_URL" +echo "UV index: $UV_INDEX_URL" # Install uv for faster dependency resolution / installation. python -m pip install --upgrade pip diff --git a/eng/scripts/test-extensions.sh b/eng/scripts/test-extensions.sh index ade7a4bc..534b56f3 100644 --- a/eng/scripts/test-extensions.sh +++ b/eng/scripts/test-extensions.sh @@ -1,10 +1,9 @@ #!/bin/bash set -e -export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" -export UV_INDEX_URL="$PIP_INDEX_URL" +export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" export UV_KEYRING_PROVIDER=subprocess -echo "Using index: $PIP_INDEX_URL" +echo "UV index: $UV_INDEX_URL" python -m pip install --upgrade pip python -m pip install uv diff --git a/eng/scripts/test-sdk.sh b/eng/scripts/test-sdk.sh index 14f90f12..58fa09ea 100644 --- a/eng/scripts/test-sdk.sh +++ b/eng/scripts/test-sdk.sh @@ -1,10 +1,9 @@ #!/bin/bash set -e -export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" -export UV_INDEX_URL="$PIP_INDEX_URL" +export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" export UV_KEYRING_PROVIDER=subprocess -echo "Using index: $PIP_INDEX_URL" +echo "UV index: $UV_INDEX_URL" python -m pip install --upgrade pip python -m pip install uv diff --git a/eng/templates/jobs/ci-dependency-check.yml b/eng/templates/jobs/ci-dependency-check.yml index 21f10d74..2afddbe1 100644 --- a/eng/templates/jobs/ci-dependency-check.yml +++ b/eng/templates/jobs/ci-dependency-check.yml @@ -54,9 +54,9 @@ jobs: displayName: 'Set necessary variables' - bash: | echo "Checking azure_functions_worker (Python < 3.13)..." - export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" - export UV_INDEX_URL="$PIP_INDEX_URL" UV_KEYRING_PROVIDER=subprocess - echo "Using index: $PIP_INDEX_URL" + export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + export UV_KEYRING_PROVIDER=subprocess + echo "UV index: $UV_INDEX_URL" cd workers python -m pip install --upgrade pip python -m pip install uv @@ -67,12 +67,14 @@ jobs: cd .. python -c "import pkgutil, importlib; [importlib.import_module(f'azure_functions_worker.{name}') for _, name, _ in pkgutil.walk_packages(['azure_functions_worker'])]" displayName: 'Python Azure Functions Worker: check for missing dependencies' + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) condition: eq(variables['proxyWorker'], false) - bash: | echo "Checking proxy_worker (Python >= 3.13)..." - export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" - export UV_INDEX_URL="$PIP_INDEX_URL" UV_KEYRING_PROVIDER=subprocess - echo "Using index: $PIP_INDEX_URL" + export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + export UV_KEYRING_PROVIDER=subprocess + echo "UV index: $UV_INDEX_URL" cd workers python -m pip install --upgrade pip python -m pip install uv @@ -82,28 +84,34 @@ jobs: cd .. python -c "import pkgutil, importlib; [importlib.import_module(f'proxy_worker.{name}') for _, name, _ in pkgutil.walk_packages(['proxy_worker'])]" displayName: 'Python Proxy Worker: check for missing dependencies' + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) condition: eq(variables['proxyWorker'], true) - bash: | echo "Checking V1 Library Worker (Python >= 3.13)..." - export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" - export UV_INDEX_URL="$PIP_INDEX_URL" UV_KEYRING_PROVIDER=subprocess - echo "Using index: $PIP_INDEX_URL" + export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + export UV_KEYRING_PROVIDER=subprocess + echo "UV index: $UV_INDEX_URL" cd runtimes/v1 python -m pip install --upgrade pip python -m pip install uv python -m uv pip install --system . python -c "import pkgutil, importlib; [importlib.import_module(f'azure_functions_runtime_v1.{name}') for _, name, _ in pkgutil.walk_packages(['azure_functions_runtime_v1'])]" displayName: 'Python Library V1: check for missing dependencies' + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) condition: eq(variables['proxyWorker'], true) - bash: | echo "Checking V2 Library Worker (Python >= 3.13)..." - export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" - export UV_INDEX_URL="$PIP_INDEX_URL" UV_KEYRING_PROVIDER=subprocess - echo "Using index: $PIP_INDEX_URL" + export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + export UV_KEYRING_PROVIDER=subprocess + echo "UV index: $UV_INDEX_URL" cd runtimes/v2 python -m pip install --upgrade pip python -m pip install uv python -m uv pip install --system . python -c "import pkgutil, importlib; [importlib.import_module(f'azure_functions_runtime.{name}') for _, name, _ in pkgutil.walk_packages(['azure_functions_runtime'])]" displayName: 'Python Library V2: check for missing dependencies' + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) condition: eq(variables['proxyWorker'], true) diff --git a/eng/templates/jobs/ci-emulator-tests.yml b/eng/templates/jobs/ci-emulator-tests.yml index 10d563fa..5635c985 100644 --- a/eng/templates/jobs/ci-emulator-tests.yml +++ b/eng/templates/jobs/ci-emulator-tests.yml @@ -94,6 +94,8 @@ jobs: chmod +x eng/scripts/install-dependencies.sh eng/scripts/install-dependencies.sh $(PYTHON_VERSION) ${{ parameters.PROJECT_DIRECTORY }} displayName: 'Install Python dependencies (uv)' + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) condition: and(eq(variables.isSdkRelease, false), eq(variables.isExtensionsRelease, false), eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false)) - bash: | chmod +x eng/scripts/test-setup.sh @@ -117,6 +119,8 @@ jobs: eng/scripts/test-sdk.sh $(Pipeline.Workspace) $(PYTHON_VERSION) eng/scripts/test-setup.sh displayName: 'Install test python sdk, dependencies and the worker' + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) condition: or(eq(variables.isSdkRelease, true), eq(variables['USETESTPYTHONSDK'], true)) - task: DownloadPipelineArtifact@2 displayName: 'Download Python Extension Artifact' @@ -135,6 +139,8 @@ jobs: eng/scripts/test-extensions.sh $(Pipeline.Workspace) $(PYTHON_VERSION) $(PYTHONEXTENSIONNAME) eng/scripts/test-setup.sh displayName: 'Install test python extension, dependencies and the worker' + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) condition: or(eq(variables.isExtensionsRelease, true), eq(variables['USETESTPYTHONEXTENSIONS'], true)) - bash: | # The minimal image (1es-ubuntu-24.04-min) does not ship the Docker diff --git a/eng/templates/jobs/ci-library-unit-tests.yml b/eng/templates/jobs/ci-library-unit-tests.yml index d7d0a1a6..6e684a2d 100644 --- a/eng/templates/jobs/ci-library-unit-tests.yml +++ b/eng/templates/jobs/ci-library-unit-tests.yml @@ -48,6 +48,8 @@ jobs: chmod +x eng/scripts/install-dependencies.sh eng/scripts/install-dependencies.sh $(PYTHON_VERSION) ${{ parameters.PROJECT_DIRECTORY }} displayName: 'Install dependencies' + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) - bash: | python -m pytest -q -n auto --dist loadfile --reruns 4 --reruns-delay 5 --instafail --cov=./${{ parameters.PROJECT_DIRECTORY }} --cov-report xml --cov-branch tests/unittests displayName: "Running $(PYTHON_VERSION) Unit Tests" diff --git a/eng/templates/jobs/ci-unit-tests.yml b/eng/templates/jobs/ci-unit-tests.yml index 6db16880..caf605e7 100644 --- a/eng/templates/jobs/ci-unit-tests.yml +++ b/eng/templates/jobs/ci-unit-tests.yml @@ -97,6 +97,8 @@ jobs: chmod +x eng/scripts/install-dependencies.sh eng/scripts/install-dependencies.sh $(PYTHON_VERSION) ${{ parameters.PROJECT_DIRECTORY }} displayName: 'Install Python dependencies (uv)' + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) condition: and(eq(variables.isSdkRelease, false), eq(variables.isExtensionsRelease, false), eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false)) - bash: | chmod +x eng/scripts/test-setup.sh diff --git a/eng/templates/official/jobs/ci-custom-image-tests.yml b/eng/templates/official/jobs/ci-custom-image-tests.yml index 9592d9b1..252ed915 100644 --- a/eng/templates/official/jobs/ci-custom-image-tests.yml +++ b/eng/templates/official/jobs/ci-custom-image-tests.yml @@ -25,6 +25,8 @@ jobs: cd ${{ parameters.PROJECT_DIRECTORY }}/tests python -m invoke -c test_setup build-protos displayName: 'Install dependencies' + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) - bash: | python -m pytest --reruns 4 -vv --instafail tests/endtoend env: diff --git a/eng/templates/official/jobs/ci-docker-dedicated-tests.yml b/eng/templates/official/jobs/ci-docker-dedicated-tests.yml index 8e875ce4..5f4e4999 100644 --- a/eng/templates/official/jobs/ci-docker-dedicated-tests.yml +++ b/eng/templates/official/jobs/ci-docker-dedicated-tests.yml @@ -52,6 +52,8 @@ jobs: cd ${{ parameters.PROJECT_DIRECTORY }}/tests python -m invoke -c test_setup build-protos displayName: 'Install dependencies' + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) - bash: | python -m pytest --reruns 4 -vv --instafail tests/endtoend env: diff --git a/eng/templates/official/jobs/ci-e2e-tests.yml b/eng/templates/official/jobs/ci-e2e-tests.yml index 0ab7381c..0091068e 100644 --- a/eng/templates/official/jobs/ci-e2e-tests.yml +++ b/eng/templates/official/jobs/ci-e2e-tests.yml @@ -106,6 +106,8 @@ jobs: chmod +x eng/scripts/install-dependencies.sh eng/scripts/install-dependencies.sh $(PYTHON_VERSION) ${{ parameters.PROJECT_DIRECTORY }} displayName: 'Install Python dependencies (uv)' + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) condition: and(eq(variables.isSdkRelease, false), eq(variables.isExtensionsRelease, false), eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false)) - bash: | chmod +x eng/scripts/test-setup.sh @@ -129,6 +131,8 @@ jobs: eng/scripts/test-sdk.sh $(Pipeline.Workspace) $(PYTHON_VERSION) eng/scripts/test-setup.sh displayName: 'Install test python sdk, dependencies and the worker' + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) condition: or(eq(variables.isSdkRelease, true), eq(variables['USETESTPYTHONSDK'], true)) - task: DownloadPipelineArtifact@2 displayName: 'Download Python Extension Artifact' @@ -147,6 +151,8 @@ jobs: eng/scripts/test-extensions.sh $(Pipeline.Workspace) $(PYTHON_VERSION) $(PYTHONEXTENSIONNAME) eng/scripts/test-setup.sh displayName: 'Install test python extension, dependencies and the worker' + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) condition: or(eq(variables.isExtensionsRelease, true), eq(variables['USETESTPYTHONEXTENSIONS'], true)) - powershell: | $pipelineVarSet = "$(USETESTPYTHONSDK)" diff --git a/eng/templates/official/jobs/ci-fc-tests.yml b/eng/templates/official/jobs/ci-fc-tests.yml index ed074914..9193f34b 100644 --- a/eng/templates/official/jobs/ci-fc-tests.yml +++ b/eng/templates/official/jobs/ci-fc-tests.yml @@ -65,9 +65,9 @@ jobs: condition: and(eq(variables.isSdkRelease, false), eq(variables.isExtensionsRelease, false), eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false)) - bash: | - export PIP_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" - export UV_INDEX_URL="$PIP_INDEX_URL" UV_KEYRING_PROVIDER=subprocess - echo "Using index: $PIP_INDEX_URL" + export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + export UV_KEYRING_PROVIDER=subprocess + echo "UV index: $UV_INDEX_URL" python -m pip install --upgrade pip python -m pip install uv UV_PIP="python -m uv pip install --system" @@ -77,6 +77,8 @@ jobs: cd ${{ parameters.PROJECT_DIRECTORY }}/tests python -m invoke -c test_setup build-protos displayName: 'Install dependencies and the worker' + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) # Skip the installation stage for SDK and Extensions release branches. This stage will fail because pyproject.toml contains the updated (and unreleased) library version condition: and(eq(variables.isSdkRelease, false), eq(variables.isExtensionsRelease, false), eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false)) From 286358e72bd395441080daeece55c33c1c4e8b80 Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Thu, 30 Jul 2026 14:00:27 -0500 Subject: [PATCH 08/17] uv --- eng/scripts/install-dependencies.sh | 11 +++++-- eng/scripts/test-extensions.sh | 10 ++++-- eng/scripts/test-sdk.sh | 10 ++++-- eng/templates/jobs/ci-dependency-check.yml | 36 ++++++++++++++------- eng/templates/official/jobs/ci-fc-tests.yml | 9 ++++-- 5 files changed, 52 insertions(+), 24 deletions(-) diff --git a/eng/scripts/install-dependencies.sh b/eng/scripts/install-dependencies.sh index 3c7a7446..9e877288 100644 --- a/eng/scripts/install-dependencies.sh +++ b/eng/scripts/install-dependencies.sh @@ -3,9 +3,14 @@ set -e # Route uv through the internal Azure Artifacts feed. PipAuthenticate handles # pip's auth separately; setting PIP_INDEX_URL would override that and hang. -export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" -export UV_KEYRING_PROVIDER=subprocess -echo "UV index: $UV_INDEX_URL" +# SYSTEM_ACCESSTOKEN is mapped from $(System.AccessToken) by the pipeline step's env block. +_feed="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" +if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then + export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" +else + export UV_INDEX_URL="$_feed" +fi +echo "UV index: $(echo "$UV_INDEX_URL" | sed 's|://[^@]*@|://***@|')" # Install uv for faster dependency resolution / installation. python -m pip install --upgrade pip diff --git a/eng/scripts/test-extensions.sh b/eng/scripts/test-extensions.sh index 534b56f3..f43dc6ef 100644 --- a/eng/scripts/test-extensions.sh +++ b/eng/scripts/test-extensions.sh @@ -1,9 +1,13 @@ #!/bin/bash set -e -export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" -export UV_KEYRING_PROVIDER=subprocess -echo "UV index: $UV_INDEX_URL" +_feed="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" +if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then + export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" +else + export UV_INDEX_URL="$_feed" +fi +echo "UV index: $(echo "$UV_INDEX_URL" | sed 's|://[^@]*@|://***@|')" python -m pip install --upgrade pip python -m pip install uv diff --git a/eng/scripts/test-sdk.sh b/eng/scripts/test-sdk.sh index 58fa09ea..6473b179 100644 --- a/eng/scripts/test-sdk.sh +++ b/eng/scripts/test-sdk.sh @@ -1,9 +1,13 @@ #!/bin/bash set -e -export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" -export UV_KEYRING_PROVIDER=subprocess -echo "UV index: $UV_INDEX_URL" +_feed="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" +if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then + export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" +else + export UV_INDEX_URL="$_feed" +fi +echo "UV index: $(echo "$UV_INDEX_URL" | sed 's|://[^@]*@|://***@|')" python -m pip install --upgrade pip python -m pip install uv diff --git a/eng/templates/jobs/ci-dependency-check.yml b/eng/templates/jobs/ci-dependency-check.yml index 2afddbe1..d2072df7 100644 --- a/eng/templates/jobs/ci-dependency-check.yml +++ b/eng/templates/jobs/ci-dependency-check.yml @@ -54,9 +54,12 @@ jobs: displayName: 'Set necessary variables' - bash: | echo "Checking azure_functions_worker (Python < 3.13)..." - export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" - export UV_KEYRING_PROVIDER=subprocess - echo "UV index: $UV_INDEX_URL" + if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then + export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + else + export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + fi + echo "UV index: $(echo "$UV_INDEX_URL" | sed 's|://[^@]*@|://***@|')" cd workers python -m pip install --upgrade pip python -m pip install uv @@ -72,9 +75,12 @@ jobs: condition: eq(variables['proxyWorker'], false) - bash: | echo "Checking proxy_worker (Python >= 3.13)..." - export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" - export UV_KEYRING_PROVIDER=subprocess - echo "UV index: $UV_INDEX_URL" + if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then + export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + else + export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + fi + echo "UV index: $(echo "$UV_INDEX_URL" | sed 's|://[^@]*@|://***@|')" cd workers python -m pip install --upgrade pip python -m pip install uv @@ -89,9 +95,12 @@ jobs: condition: eq(variables['proxyWorker'], true) - bash: | echo "Checking V1 Library Worker (Python >= 3.13)..." - export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" - export UV_KEYRING_PROVIDER=subprocess - echo "UV index: $UV_INDEX_URL" + if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then + export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + else + export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + fi + echo "UV index: $(echo "$UV_INDEX_URL" | sed 's|://[^@]*@|://***@|')" cd runtimes/v1 python -m pip install --upgrade pip python -m pip install uv @@ -103,9 +112,12 @@ jobs: condition: eq(variables['proxyWorker'], true) - bash: | echo "Checking V2 Library Worker (Python >= 3.13)..." - export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" - export UV_KEYRING_PROVIDER=subprocess - echo "UV index: $UV_INDEX_URL" + if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then + export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + else + export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + fi + echo "UV index: $(echo "$UV_INDEX_URL" | sed 's|://[^@]*@|://***@|')" cd runtimes/v2 python -m pip install --upgrade pip python -m pip install uv diff --git a/eng/templates/official/jobs/ci-fc-tests.yml b/eng/templates/official/jobs/ci-fc-tests.yml index 9193f34b..5830b891 100644 --- a/eng/templates/official/jobs/ci-fc-tests.yml +++ b/eng/templates/official/jobs/ci-fc-tests.yml @@ -65,9 +65,12 @@ jobs: condition: and(eq(variables.isSdkRelease, false), eq(variables.isExtensionsRelease, false), eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false)) - bash: | - export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" - export UV_KEYRING_PROVIDER=subprocess - echo "UV index: $UV_INDEX_URL" + if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then + export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + else + export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + fi + echo "UV index: $(echo "$UV_INDEX_URL" | sed 's|://[^@]*@|://***@|')" python -m pip install --upgrade pip python -m pip install uv UV_PIP="python -m uv pip install --system" From 6323abf8d52388e9815693ea63c0348cc8e107d0 Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Thu, 30 Jul 2026 14:14:53 -0500 Subject: [PATCH 09/17] prerelease if necessary --- eng/scripts/install-dependencies.sh | 2 +- eng/scripts/test-extensions.sh | 4 ++-- eng/scripts/test-sdk.sh | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/scripts/install-dependencies.sh b/eng/scripts/install-dependencies.sh index 9e877288..cc473e28 100644 --- a/eng/scripts/install-dependencies.sh +++ b/eng/scripts/install-dependencies.sh @@ -35,7 +35,7 @@ fi # Install everything else in a single uv invocation so the resolver runs once # and all wheels are downloaded in parallel. -$UV_PIP -U --prerelease=allow \ +$UV_PIP -U --prerelease=if-necessary-or-explicit \ azure-functions \ -e "$2/[dev]" \ -e "$2/[test-http-v2]" \ diff --git a/eng/scripts/test-extensions.sh b/eng/scripts/test-extensions.sh index f43dc6ef..95403167 100644 --- a/eng/scripts/test-extensions.sh +++ b/eng/scripts/test-extensions.sh @@ -16,7 +16,7 @@ UV_PIP="python -m uv pip install --system" $UV_PIP "setuptools>=62,<82.0" $UV_PIP -e $1/PythonExtensionArtifact/$3 -$UV_PIP --prerelease=allow -e workers/[test-http-v2] -$UV_PIP -U --prerelease=allow -e workers/[test-deferred-bindings] +$UV_PIP --prerelease=if-necessary-or-explicit -e workers/[test-http-v2] +$UV_PIP -U --prerelease=if-necessary-or-explicit -e workers/[test-deferred-bindings] $UV_PIP -U -e workers/[dev] \ No newline at end of file diff --git a/eng/scripts/test-sdk.sh b/eng/scripts/test-sdk.sh index 6473b179..2d0c1a07 100644 --- a/eng/scripts/test-sdk.sh +++ b/eng/scripts/test-sdk.sh @@ -18,5 +18,5 @@ $UV_PIP "setuptools>=62,<82.0" $UV_PIP -e $1/PythonSdkArtifact $UV_PIP -e workers/[dev] -$UV_PIP -U --prerelease=allow -e workers/[test-http-v2] -$UV_PIP -U --prerelease=allow -e workers/[test-deferred-bindings] \ No newline at end of file +$UV_PIP -U --prerelease=if-necessary-or-explicit -e workers/[test-http-v2] +$UV_PIP -U --prerelease=if-necessary-or-explicit -e workers/[test-deferred-bindings] \ No newline at end of file From e0ff14f8748f75f4e6db9cd55ba564e6f491be66 Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Thu, 30 Jul 2026 14:59:06 -0500 Subject: [PATCH 10/17] make it work for public too --- eng/scripts/install-dependencies.sh | 6 ++-- eng/scripts/test-extensions.sh | 4 +-- eng/scripts/test-sdk.sh | 4 +-- eng/templates/jobs/ci-dependency-check.yml | 31 +++++++++++++++----- eng/templates/jobs/ci-emulator-tests.yml | 10 +++++++ eng/templates/jobs/ci-library-unit-tests.yml | 8 +++++ eng/templates/jobs/ci-unit-tests.yml | 8 +++++ eng/templates/official/jobs/ci-fc-tests.yml | 5 ++-- workers/tests/test_setup.py | 5 +--- workers/tests/utils/constants.py | 17 ----------- 10 files changed, 60 insertions(+), 38 deletions(-) diff --git a/eng/scripts/install-dependencies.sh b/eng/scripts/install-dependencies.sh index cc473e28..260e3b50 100644 --- a/eng/scripts/install-dependencies.sh +++ b/eng/scripts/install-dependencies.sh @@ -3,10 +3,10 @@ set -e # Route uv through the internal Azure Artifacts feed. PipAuthenticate handles # pip's auth separately; setting PIP_INDEX_URL would override that and hang. -# SYSTEM_ACCESSTOKEN is mapped from $(System.AccessToken) by the pipeline step's env block. -_feed="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" +# UV_FEED_URL is set by the pipeline step env block based on the ArtifactFeed parameter. +_feed="${UV_FEED_URL:-https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/}" if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then - export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@${_feed#https://}" else export UV_INDEX_URL="$_feed" fi diff --git a/eng/scripts/test-extensions.sh b/eng/scripts/test-extensions.sh index 95403167..d8985c96 100644 --- a/eng/scripts/test-extensions.sh +++ b/eng/scripts/test-extensions.sh @@ -1,9 +1,9 @@ #!/bin/bash set -e -_feed="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" +_feed="${UV_FEED_URL:-https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/}" if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then - export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@${_feed#https://}" else export UV_INDEX_URL="$_feed" fi diff --git a/eng/scripts/test-sdk.sh b/eng/scripts/test-sdk.sh index 2d0c1a07..6c058888 100644 --- a/eng/scripts/test-sdk.sh +++ b/eng/scripts/test-sdk.sh @@ -1,9 +1,9 @@ #!/bin/bash set -e -_feed="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" +_feed="${UV_FEED_URL:-https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/}" if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then - export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@${_feed#https://}" else export UV_INDEX_URL="$_feed" fi diff --git a/eng/templates/jobs/ci-dependency-check.yml b/eng/templates/jobs/ci-dependency-check.yml index d2072df7..12b8a685 100644 --- a/eng/templates/jobs/ci-dependency-check.yml +++ b/eng/templates/jobs/ci-dependency-check.yml @@ -4,6 +4,13 @@ parameters: jobs: - job: "TestPython" displayName: "Run Dependency Checks" + variables: + - ${{ if eq(parameters.ArtifactFeed, 'public/PythonWorker_PublicPackages') }}: + - name: pyFeedUrl + value: 'https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/' + - ${{ else }}: + - name: pyFeedUrl + value: 'https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/' pool: name: ${{ parameters.PoolName }} @@ -54,10 +61,11 @@ jobs: displayName: 'Set necessary variables' - bash: | echo "Checking azure_functions_worker (Python < 3.13)..." + _feed="${UV_FEED_URL:-https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/}" if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then - export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@${_feed#https://}" else - export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + export UV_INDEX_URL="$_feed" fi echo "UV index: $(echo "$UV_INDEX_URL" | sed 's|://[^@]*@|://***@|')" cd workers @@ -72,13 +80,15 @@ jobs: displayName: 'Python Azure Functions Worker: check for missing dependencies' env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) + UV_FEED_URL: $(pyFeedUrl) condition: eq(variables['proxyWorker'], false) - bash: | echo "Checking proxy_worker (Python >= 3.13)..." + _feed="${UV_FEED_URL:-https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/}" if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then - export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@${_feed#https://}" else - export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + export UV_INDEX_URL="$_feed" fi echo "UV index: $(echo "$UV_INDEX_URL" | sed 's|://[^@]*@|://***@|')" cd workers @@ -92,13 +102,15 @@ jobs: displayName: 'Python Proxy Worker: check for missing dependencies' env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) + UV_FEED_URL: $(pyFeedUrl) condition: eq(variables['proxyWorker'], true) - bash: | echo "Checking V1 Library Worker (Python >= 3.13)..." + _feed="${UV_FEED_URL:-https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/}" if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then - export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@${_feed#https://}" else - export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + export UV_INDEX_URL="$_feed" fi echo "UV index: $(echo "$UV_INDEX_URL" | sed 's|://[^@]*@|://***@|')" cd runtimes/v1 @@ -109,13 +121,15 @@ jobs: displayName: 'Python Library V1: check for missing dependencies' env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) + UV_FEED_URL: $(pyFeedUrl) condition: eq(variables['proxyWorker'], true) - bash: | echo "Checking V2 Library Worker (Python >= 3.13)..." + _feed="${UV_FEED_URL:-https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/}" if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then - export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@${_feed#https://}" else - export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + export UV_INDEX_URL="$_feed" fi echo "UV index: $(echo "$UV_INDEX_URL" | sed 's|://[^@]*@|://***@|')" cd runtimes/v2 @@ -126,4 +140,5 @@ jobs: displayName: 'Python Library V2: check for missing dependencies' env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) + UV_FEED_URL: $(pyFeedUrl) condition: eq(variables['proxyWorker'], true) diff --git a/eng/templates/jobs/ci-emulator-tests.yml b/eng/templates/jobs/ci-emulator-tests.yml index 5635c985..953800f0 100644 --- a/eng/templates/jobs/ci-emulator-tests.yml +++ b/eng/templates/jobs/ci-emulator-tests.yml @@ -6,6 +6,13 @@ parameters: jobs: - job: "TestPython" displayName: "Run Python Emulator Tests" + variables: + - ${{ if eq(parameters.ArtifactFeed, 'public/PythonWorker_PublicPackages') }}: + - name: pyFeedUrl + value: 'https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/' + - ${{ else }}: + - name: pyFeedUrl + value: 'https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/' pool: name: ${{ parameters.PoolName }} @@ -96,6 +103,7 @@ jobs: displayName: 'Install Python dependencies (uv)' env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) + UV_FEED_URL: $(pyFeedUrl) condition: and(eq(variables.isSdkRelease, false), eq(variables.isExtensionsRelease, false), eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false)) - bash: | chmod +x eng/scripts/test-setup.sh @@ -121,6 +129,7 @@ jobs: displayName: 'Install test python sdk, dependencies and the worker' env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) + UV_FEED_URL: $(pyFeedUrl) condition: or(eq(variables.isSdkRelease, true), eq(variables['USETESTPYTHONSDK'], true)) - task: DownloadPipelineArtifact@2 displayName: 'Download Python Extension Artifact' @@ -141,6 +150,7 @@ jobs: displayName: 'Install test python extension, dependencies and the worker' env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) + UV_FEED_URL: $(pyFeedUrl) condition: or(eq(variables.isExtensionsRelease, true), eq(variables['USETESTPYTHONEXTENSIONS'], true)) - bash: | # The minimal image (1es-ubuntu-24.04-min) does not ship the Docker diff --git a/eng/templates/jobs/ci-library-unit-tests.yml b/eng/templates/jobs/ci-library-unit-tests.yml index 6e684a2d..1e80d2db 100644 --- a/eng/templates/jobs/ci-library-unit-tests.yml +++ b/eng/templates/jobs/ci-library-unit-tests.yml @@ -7,6 +7,13 @@ parameters: jobs: - job: "TestPython" displayName: "Run ${{ parameters.PROJECT_NAME }} Unit Tests" + variables: + - ${{ if eq(parameters.ArtifactFeed, 'public/PythonWorker_PublicPackages') }}: + - name: pyFeedUrl + value: 'https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/' + - ${{ else }}: + - name: pyFeedUrl + value: 'https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/' pool: name: ${{ parameters.PoolName }} @@ -50,6 +57,7 @@ jobs: displayName: 'Install dependencies' env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) + UV_FEED_URL: $(pyFeedUrl) - bash: | python -m pytest -q -n auto --dist loadfile --reruns 4 --reruns-delay 5 --instafail --cov=./${{ parameters.PROJECT_DIRECTORY }} --cov-report xml --cov-branch tests/unittests displayName: "Running $(PYTHON_VERSION) Unit Tests" diff --git a/eng/templates/jobs/ci-unit-tests.yml b/eng/templates/jobs/ci-unit-tests.yml index caf605e7..cf3b71eb 100644 --- a/eng/templates/jobs/ci-unit-tests.yml +++ b/eng/templates/jobs/ci-unit-tests.yml @@ -6,6 +6,13 @@ parameters: jobs: - job: "TestPython" displayName: "Run Python Unit Tests" + variables: + - ${{ if eq(parameters.ArtifactFeed, 'public/PythonWorker_PublicPackages') }}: + - name: pyFeedUrl + value: 'https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/' + - ${{ else }}: + - name: pyFeedUrl + value: 'https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/' pool: name: ${{ parameters.PoolName }} @@ -99,6 +106,7 @@ jobs: displayName: 'Install Python dependencies (uv)' env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) + UV_FEED_URL: $(pyFeedUrl) condition: and(eq(variables.isSdkRelease, false), eq(variables.isExtensionsRelease, false), eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false)) - bash: | chmod +x eng/scripts/test-setup.sh diff --git a/eng/templates/official/jobs/ci-fc-tests.yml b/eng/templates/official/jobs/ci-fc-tests.yml index 5830b891..e340ccbb 100644 --- a/eng/templates/official/jobs/ci-fc-tests.yml +++ b/eng/templates/official/jobs/ci-fc-tests.yml @@ -65,10 +65,11 @@ jobs: condition: and(eq(variables.isSdkRelease, false), eq(variables.isExtensionsRelease, false), eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false)) - bash: | + _feed="https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/" if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then - export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@${_feed#https://}" else - export UV_INDEX_URL="https://pkgs.dev.azure.com/azfunc/internal/_packaging/PythonWorker_Internal_PublicPackages/pypi/simple/" + export UV_INDEX_URL="$_feed" fi echo "UV index: $(echo "$UV_INDEX_URL" | sed 's|://[^@]*@|://***@|')" python -m pip install --upgrade pip diff --git a/workers/tests/test_setup.py b/workers/tests/test_setup.py index 2f785dcb..9a9f3a92 100644 --- a/workers/tests/test_setup.py +++ b/workers/tests/test_setup.py @@ -30,7 +30,7 @@ from invoke import task -from utils.constants import EXTENSIONS_CSPROJ_TEMPLATE, NUGET_CONFIG +from utils.constants import EXTENSIONS_CSPROJ_TEMPLATE ROOT_DIR = pathlib.Path(__file__).parent.parent BUILD_DIR = ROOT_DIR / 'build' @@ -289,9 +289,6 @@ def install_extensions(extensions_dir): with open(extensions_dir / "extensions.csproj", "w") as f: f.write(EXTENSIONS_CSPROJ_TEMPLATE) - with open(extensions_dir / "NuGet.config", "w") as f: - f.write(NUGET_CONFIG) - env = os.environ.copy() env["TERM"] = "xterm" # ncurses 6.1 workaround try: diff --git a/workers/tests/utils/constants.py b/workers/tests/utils/constants.py index f78f133d..8911e356 100644 --- a/workers/tests/utils/constants.py +++ b/workers/tests/utils/constants.py @@ -45,23 +45,6 @@ """ -NUGET_CONFIG = """\ - - - - - - - - - - -""" # PROJECT_ROOT refers to the path to azure-functions-python-worker # TODO: Find root folder without .parent From 0bfbc68373025df974aaabd8e7e00cf61ae2fcfd Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Fri, 31 Jul 2026 07:15:34 -0500 Subject: [PATCH 11/17] suggested change for uv --- eng/scripts/install-dependencies.sh | 12 ++--- eng/scripts/test-extensions.sh | 8 +-- eng/scripts/test-sdk.sh | 8 +-- eng/templates/jobs/ci-dependency-check.yml | 51 +++---------------- eng/templates/jobs/ci-emulator-tests.yml | 16 ------ eng/templates/jobs/ci-library-unit-tests.yml | 10 ---- eng/templates/jobs/ci-unit-tests.yml | 10 ---- .../official/jobs/ci-custom-image-tests.yml | 2 - .../jobs/ci-docker-dedicated-tests.yml | 2 - eng/templates/official/jobs/ci-e2e-tests.yml | 6 --- eng/templates/official/jobs/ci-fc-tests.yml | 10 +--- workers/tests/test_setup.py | 6 +++ 12 files changed, 23 insertions(+), 118 deletions(-) diff --git a/eng/scripts/install-dependencies.sh b/eng/scripts/install-dependencies.sh index 260e3b50..edf7bb3a 100644 --- a/eng/scripts/install-dependencies.sh +++ b/eng/scripts/install-dependencies.sh @@ -1,16 +1,10 @@ #!/bin/bash set -e -# Route uv through the internal Azure Artifacts feed. PipAuthenticate handles -# pip's auth separately; setting PIP_INDEX_URL would override that and hang. -# UV_FEED_URL is set by the pipeline step env block based on the ArtifactFeed parameter. -_feed="${UV_FEED_URL:-https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/}" -if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then - export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@${_feed#https://}" -else - export UV_INDEX_URL="$_feed" +# Forward PipAuthenticate's index URL to uv, which does not read pip's config. +if [ -n "${PIP_INDEX_URL:-}" ] && [ -z "${UV_DEFAULT_INDEX:-}" ]; then + export UV_DEFAULT_INDEX="$PIP_INDEX_URL" fi -echo "UV index: $(echo "$UV_INDEX_URL" | sed 's|://[^@]*@|://***@|')" # Install uv for faster dependency resolution / installation. python -m pip install --upgrade pip diff --git a/eng/scripts/test-extensions.sh b/eng/scripts/test-extensions.sh index d8985c96..1d2228cc 100644 --- a/eng/scripts/test-extensions.sh +++ b/eng/scripts/test-extensions.sh @@ -1,13 +1,9 @@ #!/bin/bash set -e -_feed="${UV_FEED_URL:-https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/}" -if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then - export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@${_feed#https://}" -else - export UV_INDEX_URL="$_feed" +if [ -n "${PIP_INDEX_URL:-}" ] && [ -z "${UV_DEFAULT_INDEX:-}" ]; then + export UV_DEFAULT_INDEX="$PIP_INDEX_URL" fi -echo "UV index: $(echo "$UV_INDEX_URL" | sed 's|://[^@]*@|://***@|')" python -m pip install --upgrade pip python -m pip install uv diff --git a/eng/scripts/test-sdk.sh b/eng/scripts/test-sdk.sh index 6c058888..a342670e 100644 --- a/eng/scripts/test-sdk.sh +++ b/eng/scripts/test-sdk.sh @@ -1,13 +1,9 @@ #!/bin/bash set -e -_feed="${UV_FEED_URL:-https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/}" -if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then - export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@${_feed#https://}" -else - export UV_INDEX_URL="$_feed" +if [ -n "${PIP_INDEX_URL:-}" ] && [ -z "${UV_DEFAULT_INDEX:-}" ]; then + export UV_DEFAULT_INDEX="$PIP_INDEX_URL" fi -echo "UV index: $(echo "$UV_INDEX_URL" | sed 's|://[^@]*@|://***@|')" python -m pip install --upgrade pip python -m pip install uv diff --git a/eng/templates/jobs/ci-dependency-check.yml b/eng/templates/jobs/ci-dependency-check.yml index 12b8a685..824301dd 100644 --- a/eng/templates/jobs/ci-dependency-check.yml +++ b/eng/templates/jobs/ci-dependency-check.yml @@ -4,13 +4,6 @@ parameters: jobs: - job: "TestPython" displayName: "Run Dependency Checks" - variables: - - ${{ if eq(parameters.ArtifactFeed, 'public/PythonWorker_PublicPackages') }}: - - name: pyFeedUrl - value: 'https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/' - - ${{ else }}: - - name: pyFeedUrl - value: 'https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/' pool: name: ${{ parameters.PoolName }} @@ -61,13 +54,9 @@ jobs: displayName: 'Set necessary variables' - bash: | echo "Checking azure_functions_worker (Python < 3.13)..." - _feed="${UV_FEED_URL:-https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/}" - if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then - export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@${_feed#https://}" - else - export UV_INDEX_URL="$_feed" + if [ -n "${PIP_INDEX_URL:-}" ] && [ -z "${UV_DEFAULT_INDEX:-}" ]; then + export UV_DEFAULT_INDEX="$PIP_INDEX_URL" fi - echo "UV index: $(echo "$UV_INDEX_URL" | sed 's|://[^@]*@|://***@|')" cd workers python -m pip install --upgrade pip python -m pip install uv @@ -78,19 +67,12 @@ jobs: cd .. python -c "import pkgutil, importlib; [importlib.import_module(f'azure_functions_worker.{name}') for _, name, _ in pkgutil.walk_packages(['azure_functions_worker'])]" displayName: 'Python Azure Functions Worker: check for missing dependencies' - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - UV_FEED_URL: $(pyFeedUrl) condition: eq(variables['proxyWorker'], false) - bash: | echo "Checking proxy_worker (Python >= 3.13)..." - _feed="${UV_FEED_URL:-https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/}" - if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then - export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@${_feed#https://}" - else - export UV_INDEX_URL="$_feed" + if [ -n "${PIP_INDEX_URL:-}" ] && [ -z "${UV_DEFAULT_INDEX:-}" ]; then + export UV_DEFAULT_INDEX="$PIP_INDEX_URL" fi - echo "UV index: $(echo "$UV_INDEX_URL" | sed 's|://[^@]*@|://***@|')" cd workers python -m pip install --upgrade pip python -m pip install uv @@ -100,45 +82,28 @@ jobs: cd .. python -c "import pkgutil, importlib; [importlib.import_module(f'proxy_worker.{name}') for _, name, _ in pkgutil.walk_packages(['proxy_worker'])]" displayName: 'Python Proxy Worker: check for missing dependencies' - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - UV_FEED_URL: $(pyFeedUrl) condition: eq(variables['proxyWorker'], true) - bash: | echo "Checking V1 Library Worker (Python >= 3.13)..." - _feed="${UV_FEED_URL:-https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/}" - if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then - export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@${_feed#https://}" - else - export UV_INDEX_URL="$_feed" + if [ -n "${PIP_INDEX_URL:-}" ] && [ -z "${UV_DEFAULT_INDEX:-}" ]; then + export UV_DEFAULT_INDEX="$PIP_INDEX_URL" fi - echo "UV index: $(echo "$UV_INDEX_URL" | sed 's|://[^@]*@|://***@|')" cd runtimes/v1 python -m pip install --upgrade pip python -m pip install uv python -m uv pip install --system . python -c "import pkgutil, importlib; [importlib.import_module(f'azure_functions_runtime_v1.{name}') for _, name, _ in pkgutil.walk_packages(['azure_functions_runtime_v1'])]" displayName: 'Python Library V1: check for missing dependencies' - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - UV_FEED_URL: $(pyFeedUrl) condition: eq(variables['proxyWorker'], true) - bash: | echo "Checking V2 Library Worker (Python >= 3.13)..." - _feed="${UV_FEED_URL:-https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/}" - if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then - export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@${_feed#https://}" - else - export UV_INDEX_URL="$_feed" + if [ -n "${PIP_INDEX_URL:-}" ] && [ -z "${UV_DEFAULT_INDEX:-}" ]; then + export UV_DEFAULT_INDEX="$PIP_INDEX_URL" fi - echo "UV index: $(echo "$UV_INDEX_URL" | sed 's|://[^@]*@|://***@|')" cd runtimes/v2 python -m pip install --upgrade pip python -m pip install uv python -m uv pip install --system . python -c "import pkgutil, importlib; [importlib.import_module(f'azure_functions_runtime.{name}') for _, name, _ in pkgutil.walk_packages(['azure_functions_runtime'])]" displayName: 'Python Library V2: check for missing dependencies' - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - UV_FEED_URL: $(pyFeedUrl) condition: eq(variables['proxyWorker'], true) diff --git a/eng/templates/jobs/ci-emulator-tests.yml b/eng/templates/jobs/ci-emulator-tests.yml index 953800f0..10d563fa 100644 --- a/eng/templates/jobs/ci-emulator-tests.yml +++ b/eng/templates/jobs/ci-emulator-tests.yml @@ -6,13 +6,6 @@ parameters: jobs: - job: "TestPython" displayName: "Run Python Emulator Tests" - variables: - - ${{ if eq(parameters.ArtifactFeed, 'public/PythonWorker_PublicPackages') }}: - - name: pyFeedUrl - value: 'https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/' - - ${{ else }}: - - name: pyFeedUrl - value: 'https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/' pool: name: ${{ parameters.PoolName }} @@ -101,9 +94,6 @@ jobs: chmod +x eng/scripts/install-dependencies.sh eng/scripts/install-dependencies.sh $(PYTHON_VERSION) ${{ parameters.PROJECT_DIRECTORY }} displayName: 'Install Python dependencies (uv)' - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - UV_FEED_URL: $(pyFeedUrl) condition: and(eq(variables.isSdkRelease, false), eq(variables.isExtensionsRelease, false), eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false)) - bash: | chmod +x eng/scripts/test-setup.sh @@ -127,9 +117,6 @@ jobs: eng/scripts/test-sdk.sh $(Pipeline.Workspace) $(PYTHON_VERSION) eng/scripts/test-setup.sh displayName: 'Install test python sdk, dependencies and the worker' - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - UV_FEED_URL: $(pyFeedUrl) condition: or(eq(variables.isSdkRelease, true), eq(variables['USETESTPYTHONSDK'], true)) - task: DownloadPipelineArtifact@2 displayName: 'Download Python Extension Artifact' @@ -148,9 +135,6 @@ jobs: eng/scripts/test-extensions.sh $(Pipeline.Workspace) $(PYTHON_VERSION) $(PYTHONEXTENSIONNAME) eng/scripts/test-setup.sh displayName: 'Install test python extension, dependencies and the worker' - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - UV_FEED_URL: $(pyFeedUrl) condition: or(eq(variables.isExtensionsRelease, true), eq(variables['USETESTPYTHONEXTENSIONS'], true)) - bash: | # The minimal image (1es-ubuntu-24.04-min) does not ship the Docker diff --git a/eng/templates/jobs/ci-library-unit-tests.yml b/eng/templates/jobs/ci-library-unit-tests.yml index 1e80d2db..d7d0a1a6 100644 --- a/eng/templates/jobs/ci-library-unit-tests.yml +++ b/eng/templates/jobs/ci-library-unit-tests.yml @@ -7,13 +7,6 @@ parameters: jobs: - job: "TestPython" displayName: "Run ${{ parameters.PROJECT_NAME }} Unit Tests" - variables: - - ${{ if eq(parameters.ArtifactFeed, 'public/PythonWorker_PublicPackages') }}: - - name: pyFeedUrl - value: 'https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/' - - ${{ else }}: - - name: pyFeedUrl - value: 'https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/' pool: name: ${{ parameters.PoolName }} @@ -55,9 +48,6 @@ jobs: chmod +x eng/scripts/install-dependencies.sh eng/scripts/install-dependencies.sh $(PYTHON_VERSION) ${{ parameters.PROJECT_DIRECTORY }} displayName: 'Install dependencies' - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - UV_FEED_URL: $(pyFeedUrl) - bash: | python -m pytest -q -n auto --dist loadfile --reruns 4 --reruns-delay 5 --instafail --cov=./${{ parameters.PROJECT_DIRECTORY }} --cov-report xml --cov-branch tests/unittests displayName: "Running $(PYTHON_VERSION) Unit Tests" diff --git a/eng/templates/jobs/ci-unit-tests.yml b/eng/templates/jobs/ci-unit-tests.yml index cf3b71eb..6db16880 100644 --- a/eng/templates/jobs/ci-unit-tests.yml +++ b/eng/templates/jobs/ci-unit-tests.yml @@ -6,13 +6,6 @@ parameters: jobs: - job: "TestPython" displayName: "Run Python Unit Tests" - variables: - - ${{ if eq(parameters.ArtifactFeed, 'public/PythonWorker_PublicPackages') }}: - - name: pyFeedUrl - value: 'https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/pypi/simple/' - - ${{ else }}: - - name: pyFeedUrl - value: 'https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/' pool: name: ${{ parameters.PoolName }} @@ -104,9 +97,6 @@ jobs: chmod +x eng/scripts/install-dependencies.sh eng/scripts/install-dependencies.sh $(PYTHON_VERSION) ${{ parameters.PROJECT_DIRECTORY }} displayName: 'Install Python dependencies (uv)' - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - UV_FEED_URL: $(pyFeedUrl) condition: and(eq(variables.isSdkRelease, false), eq(variables.isExtensionsRelease, false), eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false)) - bash: | chmod +x eng/scripts/test-setup.sh diff --git a/eng/templates/official/jobs/ci-custom-image-tests.yml b/eng/templates/official/jobs/ci-custom-image-tests.yml index 252ed915..9592d9b1 100644 --- a/eng/templates/official/jobs/ci-custom-image-tests.yml +++ b/eng/templates/official/jobs/ci-custom-image-tests.yml @@ -25,8 +25,6 @@ jobs: cd ${{ parameters.PROJECT_DIRECTORY }}/tests python -m invoke -c test_setup build-protos displayName: 'Install dependencies' - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - bash: | python -m pytest --reruns 4 -vv --instafail tests/endtoend env: diff --git a/eng/templates/official/jobs/ci-docker-dedicated-tests.yml b/eng/templates/official/jobs/ci-docker-dedicated-tests.yml index 5f4e4999..8e875ce4 100644 --- a/eng/templates/official/jobs/ci-docker-dedicated-tests.yml +++ b/eng/templates/official/jobs/ci-docker-dedicated-tests.yml @@ -52,8 +52,6 @@ jobs: cd ${{ parameters.PROJECT_DIRECTORY }}/tests python -m invoke -c test_setup build-protos displayName: 'Install dependencies' - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - bash: | python -m pytest --reruns 4 -vv --instafail tests/endtoend env: diff --git a/eng/templates/official/jobs/ci-e2e-tests.yml b/eng/templates/official/jobs/ci-e2e-tests.yml index 0091068e..0ab7381c 100644 --- a/eng/templates/official/jobs/ci-e2e-tests.yml +++ b/eng/templates/official/jobs/ci-e2e-tests.yml @@ -106,8 +106,6 @@ jobs: chmod +x eng/scripts/install-dependencies.sh eng/scripts/install-dependencies.sh $(PYTHON_VERSION) ${{ parameters.PROJECT_DIRECTORY }} displayName: 'Install Python dependencies (uv)' - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) condition: and(eq(variables.isSdkRelease, false), eq(variables.isExtensionsRelease, false), eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false)) - bash: | chmod +x eng/scripts/test-setup.sh @@ -131,8 +129,6 @@ jobs: eng/scripts/test-sdk.sh $(Pipeline.Workspace) $(PYTHON_VERSION) eng/scripts/test-setup.sh displayName: 'Install test python sdk, dependencies and the worker' - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) condition: or(eq(variables.isSdkRelease, true), eq(variables['USETESTPYTHONSDK'], true)) - task: DownloadPipelineArtifact@2 displayName: 'Download Python Extension Artifact' @@ -151,8 +147,6 @@ jobs: eng/scripts/test-extensions.sh $(Pipeline.Workspace) $(PYTHON_VERSION) $(PYTHONEXTENSIONNAME) eng/scripts/test-setup.sh displayName: 'Install test python extension, dependencies and the worker' - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) condition: or(eq(variables.isExtensionsRelease, true), eq(variables['USETESTPYTHONEXTENSIONS'], true)) - powershell: | $pipelineVarSet = "$(USETESTPYTHONSDK)" diff --git a/eng/templates/official/jobs/ci-fc-tests.yml b/eng/templates/official/jobs/ci-fc-tests.yml index e340ccbb..27014023 100644 --- a/eng/templates/official/jobs/ci-fc-tests.yml +++ b/eng/templates/official/jobs/ci-fc-tests.yml @@ -65,13 +65,9 @@ jobs: condition: and(eq(variables.isSdkRelease, false), eq(variables.isExtensionsRelease, false), eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false)) - bash: | - _feed="https://pkgs.dev.azure.com/azfunc/internal/_packaging/upstream/pypi/simple/" - if [ -n "${SYSTEM_ACCESSTOKEN:-}" ]; then - export UV_INDEX_URL="https://build:${SYSTEM_ACCESSTOKEN}@${_feed#https://}" - else - export UV_INDEX_URL="$_feed" + if [ -n "${PIP_INDEX_URL:-}" ] && [ -z "${UV_DEFAULT_INDEX:-}" ]; then + export UV_DEFAULT_INDEX="$PIP_INDEX_URL" fi - echo "UV index: $(echo "$UV_INDEX_URL" | sed 's|://[^@]*@|://***@|')" python -m pip install --upgrade pip python -m pip install uv UV_PIP="python -m uv pip install --system" @@ -81,8 +77,6 @@ jobs: cd ${{ parameters.PROJECT_DIRECTORY }}/tests python -m invoke -c test_setup build-protos displayName: 'Install dependencies and the worker' - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) # Skip the installation stage for SDK and Extensions release branches. This stage will fail because pyproject.toml contains the updated (and unreleased) library version condition: and(eq(variables.isSdkRelease, false), eq(variables.isExtensionsRelease, false), eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false)) diff --git a/workers/tests/test_setup.py b/workers/tests/test_setup.py index 9a9f3a92..199f1a7c 100644 --- a/workers/tests/test_setup.py +++ b/workers/tests/test_setup.py @@ -289,6 +289,9 @@ def install_extensions(extensions_dir): with open(extensions_dir / "extensions.csproj", "w") as f: f.write(EXTENSIONS_CSPROJ_TEMPLATE) + with open(extensions_dir / "NuGet.config", "w") as f: + f.write(ROOT_DIR.parent.joinpath("nuget.config").read_text()) + env = os.environ.copy() env["TERM"] = "xterm" # ncurses 6.1 workaround try: @@ -418,6 +421,9 @@ def webhost(c, clean=False, webhost_version=None, webhost_dir=None, create_webhost_folder(webhost_dir) version = branch_name or webhost_version extract_webhost_zip(version.replace("/", "-"), zip_path, webhost_dir) + # The webhost repo ships its own NuGet.config pointing to api.nuget.org. + # Overwrite it with the repo root config so the build uses the internal feed. + shutil.copy2(ROOT_DIR.parent / "nuget.config", webhost_dir / "NuGet.config") chmod_protobuf_generation_script(webhost_dir) compile_webhost(webhost_dir) From 2d878f0bacaf23c05153cc77e9d4317369ef4c3f Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Fri, 31 Jul 2026 07:34:40 -0500 Subject: [PATCH 12/17] change feeds, fix pip audit --- eng/ci/emulator-tests.yml | 2 +- eng/ci/official-build.yml | 8 ++++---- eng/ci/public-build.yml | 10 +++++----- eng/pack/templates/macos_64_env_gen.yml | 4 ++-- eng/pack/templates/nix_arm64_env_gen.yml | 4 ++-- eng/pack/templates/nix_env_gen.yml | 4 ++-- eng/pack/templates/win_env_gen.yml | 4 ++-- eng/templates/jobs/build.yml | 2 +- eng/templates/jobs/ci-emulator-tests.yml | 6 +++--- eng/templates/jobs/ci-library-unit-tests.yml | 8 ++++---- eng/templates/jobs/ci-unit-tests.yml | 6 +++--- eng/templates/official/jobs/build-library.yml | 4 ++-- eng/templates/official/jobs/ci-core-tools-tests.yml | 2 +- eng/templates/official/jobs/ci-custom-image-tests.yml | 2 +- .../official/jobs/ci-docker-dedicated-tests.yml | 2 +- eng/templates/official/jobs/ci-e2e-tests.yml | 8 ++++---- eng/templates/official/jobs/ci-fc-tests.yml | 2 +- eng/templates/official/release/build-artifacts.yml | 2 +- eng/templates/shared/build-steps.yml | 2 +- nuget.config | 2 +- 20 files changed, 42 insertions(+), 42 deletions(-) diff --git a/eng/ci/emulator-tests.yml b/eng/ci/emulator-tests.yml index c165b02e..7ff7212a 100644 --- a/eng/ci/emulator-tests.yml +++ b/eng/ci/emulator-tests.yml @@ -50,5 +50,5 @@ extends: - template: /eng/templates/jobs/ci-emulator-tests.yml@self parameters: PoolName: 1es-pool-azfunc - ArtifactFeed: 'internal/PythonWorker_Internal_PublicPackages' + ArtifactFeed: 'internal/upstream' NuGetServiceConnection: 'PythonWorker_Internal_PublicPackages' \ No newline at end of file diff --git a/eng/ci/official-build.yml b/eng/ci/official-build.yml index 876ac571..fb229ea4 100644 --- a/eng/ci/official-build.yml +++ b/eng/ci/official-build.yml @@ -63,7 +63,7 @@ extends: - template: /eng/templates/jobs/ci-emulator-tests.yml@self parameters: PoolName: 1es-pool-azfunc - ArtifactFeed: 'internal/PythonWorker_Internal_PublicPackages' + ArtifactFeed: 'internal/upstream' NuGetServiceConnection: 'PythonWorker_Internal_PublicPackages' - stage: RunWorkerUnitTests dependsOn: BuildPythonWorker @@ -71,7 +71,7 @@ extends: - template: /eng/templates/jobs/ci-unit-tests.yml@self parameters: PoolName: 1es-pool-azfunc - ArtifactFeed: 'internal/PythonWorker_Internal_PublicPackages' + ArtifactFeed: 'internal/upstream' NuGetServiceConnection: 'PythonWorker_Internal_PublicPackages' - stage: RunWorkerDockerDedicatedTests dependsOn: BuildPythonWorker @@ -99,7 +99,7 @@ extends: PROJECT_NAME: 'Python V2 Library' PROJECT_DIRECTORY: 'runtimes/v2' PoolName: 1es-pool-azfunc - ArtifactFeed: 'internal/PythonWorker_Internal_PublicPackages' + ArtifactFeed: 'internal/upstream' NuGetServiceConnection: 'PythonWorker_Internal_PublicPackages' # Python V1 Library Build and Test Stages @@ -119,5 +119,5 @@ extends: PROJECT_NAME: 'Python V1 Library' PROJECT_DIRECTORY: 'runtimes/v1' PoolName: 1es-pool-azfunc - ArtifactFeed: 'internal/PythonWorker_Internal_PublicPackages' + ArtifactFeed: 'internal/upstream' NuGetServiceConnection: 'PythonWorker_Internal_PublicPackages' \ No newline at end of file diff --git a/eng/ci/public-build.yml b/eng/ci/public-build.yml index e9c5b414..068c372e 100644 --- a/eng/ci/public-build.yml +++ b/eng/ci/public-build.yml @@ -79,7 +79,7 @@ extends: - template: /eng/templates/jobs/ci-dependency-check.yml@self parameters: PoolName: 1es-pool-azfunc-public - ArtifactFeed: 'public/PythonWorker_PublicPackages' + ArtifactFeed: 'public/upstream-public' - stage: RunWorkerUnitTests dependsOn: BuildPythonWorker jobs: @@ -87,7 +87,7 @@ extends: parameters: PROJECT_DIRECTORY: 'workers' PoolName: 1es-pool-azfunc-public - ArtifactFeed: 'public/PythonWorker_PublicPackages' + ArtifactFeed: 'public/upstream-public' NuGetServiceConnection: 'PythonWorker_PublicPackages' - stage: RunWorkerEmulatorTests dependsOn: BuildPythonWorker @@ -95,7 +95,7 @@ extends: - template: /eng/templates/jobs/ci-emulator-tests.yml@self parameters: PoolName: 1es-pool-azfunc-public - ArtifactFeed: 'public/PythonWorker_PublicPackages' + ArtifactFeed: 'public/upstream-public' NuGetServiceConnection: 'PythonWorker_PublicPackages' # Python V2 Library Build and Test Stages @@ -115,7 +115,7 @@ extends: PROJECT_NAME: 'V2 Library' PROJECT_DIRECTORY: 'runtimes/v2' PoolName: 1es-pool-azfunc-public - ArtifactFeed: 'public/PythonWorker_PublicPackages' + ArtifactFeed: 'public/upstream-public' NuGetServiceConnection: 'PythonWorker_PublicPackages' # Python V1 Library Build and Test Stages @@ -135,5 +135,5 @@ extends: PROJECT_NAME: 'V1 Library' PROJECT_DIRECTORY: 'runtimes/v1' PoolName: 1es-pool-azfunc-public - ArtifactFeed: 'public/PythonWorker_PublicPackages' + ArtifactFeed: 'public/upstream-public' NuGetServiceConnection: 'PythonWorker_PublicPackages' \ No newline at end of file diff --git a/eng/pack/templates/macos_64_env_gen.yml b/eng/pack/templates/macos_64_env_gen.yml index de3c65fa..e3065fb5 100644 --- a/eng/pack/templates/macos_64_env_gen.yml +++ b/eng/pack/templates/macos_64_env_gen.yml @@ -7,7 +7,7 @@ steps: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' + artifactFeeds: 'internal/upstream' - task: UsePythonVersion@0 inputs: versionSpec: ${{ parameters.pythonVersion }} @@ -72,7 +72,7 @@ steps: - bash: | pip install pip-audit cd workers - pip-audit -r requirements.txt + pip-audit --vulnerability-service osv . displayName: 'Run vulnerability scan' continueOnError: true - task: CopyFiles@2 diff --git a/eng/pack/templates/nix_arm64_env_gen.yml b/eng/pack/templates/nix_arm64_env_gen.yml index ef68cae4..b200e421 100644 --- a/eng/pack/templates/nix_arm64_env_gen.yml +++ b/eng/pack/templates/nix_arm64_env_gen.yml @@ -7,7 +7,7 @@ steps: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' + artifactFeeds: 'internal/upstream' - task: UsePythonVersion@0 inputs: versionSpec: ${{ parameters.pythonVersion }} @@ -72,7 +72,7 @@ steps: - bash: | pip install pip-audit cd workers - pip-audit -r requirements.txt + pip-audit --vulnerability-service osv . displayName: 'Run vulnerability scan' continueOnError: true - task: CopyFiles@2 diff --git a/eng/pack/templates/nix_env_gen.yml b/eng/pack/templates/nix_env_gen.yml index 4f5278fb..7666695b 100644 --- a/eng/pack/templates/nix_env_gen.yml +++ b/eng/pack/templates/nix_env_gen.yml @@ -7,7 +7,7 @@ steps: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' + artifactFeeds: 'internal/upstream' - task: UsePythonVersion@0 inputs: versionSpec: ${{ parameters.pythonVersion }} @@ -72,7 +72,7 @@ steps: - bash: | pip install pip-audit cd workers - pip-audit -r requirements.txt + pip-audit --vulnerability-service osv . displayName: 'Run vulnerability scan' continueOnError: true - task: CopyFiles@2 diff --git a/eng/pack/templates/win_env_gen.yml b/eng/pack/templates/win_env_gen.yml index 1027cc85..24347363 100644 --- a/eng/pack/templates/win_env_gen.yml +++ b/eng/pack/templates/win_env_gen.yml @@ -7,7 +7,7 @@ steps: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' + artifactFeeds: 'internal/upstream' - task: UsePythonVersion@0 inputs: versionSpec: ${{ parameters.pythonVersion }} @@ -71,7 +71,7 @@ steps: - bash: | pip install pip-audit cd workers - pip-audit -r requirements.txt + pip-audit --vulnerability-service osv . displayName: 'Run vulnerability scan' continueOnError: true - task: CopyFiles@2 diff --git a/eng/templates/jobs/build.yml b/eng/templates/jobs/build.yml index 2af6eeee..70826229 100644 --- a/eng/templates/jobs/build.yml +++ b/eng/templates/jobs/build.yml @@ -19,4 +19,4 @@ jobs: PYTHON_VERSION: ${{ parameters.PYTHON_VERSION }} PROJECT_NAME: ${{ parameters.PROJECT_NAME }} PROJECT_DIRECTORY: ${{ parameters.PROJECT_DIRECTORY }} - ArtifactFeed: 'public/PythonWorker_PublicPackages' \ No newline at end of file + ArtifactFeed: 'public/upstream-public' \ No newline at end of file diff --git a/eng/templates/jobs/ci-emulator-tests.yml b/eng/templates/jobs/ci-emulator-tests.yml index 10d563fa..790aa434 100644 --- a/eng/templates/jobs/ci-emulator-tests.yml +++ b/eng/templates/jobs/ci-emulator-tests.yml @@ -80,12 +80,12 @@ jobs: displayName: 'NuGet Authenticate' - bash: | # Remove the feed that doesn't match the current service connection - if [[ "${{ parameters.NuGetServiceConnection }}" == "PythonWorker_PublicPackages" ]]; then + if [[ "${{ parameters.NuGetServiceConnection }}" == "upstream-public" ]]; then # Remove internal feed for public builds - sed -i '/_Internal_PublicPackages/d' nuget.config + sed -i '/key="upstream" /d' nuget.config else # Remove public feed for internal builds - sed -i '/PythonWorker_PublicPackages[^_]/d' nuget.config + sed -i '/key="upstream-public"/d' nuget.config fi echo "Updated nuget.config:" cat nuget.config diff --git a/eng/templates/jobs/ci-library-unit-tests.yml b/eng/templates/jobs/ci-library-unit-tests.yml index d7d0a1a6..c669e4e4 100644 --- a/eng/templates/jobs/ci-library-unit-tests.yml +++ b/eng/templates/jobs/ci-library-unit-tests.yml @@ -34,12 +34,12 @@ jobs: displayName: 'NuGet Authenticate' - bash: | # Remove the feed that doesn't match the current service connection - if [[ "${{ parameters.NuGetServiceConnection }}" == "PythonWorker_PublicPackages" ]]; then + if [[ "${{ parameters.NuGetServiceConnection }}" == "upstream-public" ]]; then # Remove internal feed for public builds - sed -i '/_Internal_PublicPackages/d' nuget.config + sed -i '/key="upstream" /d' nuget.config else - # Remove public feed for internal builds - sed -i '/PythonWorker_PublicPackages[^_]/d' nuget.config + # Remove public feed for internal builds + sed -i '/key="upstream-public"/d' nuget.config fi echo "Updated nuget.config:" cat nuget.config diff --git a/eng/templates/jobs/ci-unit-tests.yml b/eng/templates/jobs/ci-unit-tests.yml index 6db16880..2ab2bc5d 100644 --- a/eng/templates/jobs/ci-unit-tests.yml +++ b/eng/templates/jobs/ci-unit-tests.yml @@ -83,12 +83,12 @@ jobs: displayName: 'NuGet Authenticate' - bash: | # Remove the feed that doesn't match the current service connection - if [[ "${{ parameters.NuGetServiceConnection }}" == "PythonWorker_PublicPackages" ]]; then + if [[ "${{ parameters.NuGetServiceConnection }}" == "upstream-public" ]]; then # Remove internal feed for public builds - sed -i '/_Internal_PublicPackages/d' nuget.config + sed -i '/key="upstream" /d' nuget.config else # Remove public feed for internal builds - sed -i '/PythonWorker_PublicPackages[^_]/d' nuget.config + sed -i '/key="upstream-public"/d' nuget.config fi echo "Updated nuget.config:" cat nuget.config diff --git a/eng/templates/official/jobs/build-library.yml b/eng/templates/official/jobs/build-library.yml index 7d140083..416d4a3c 100644 --- a/eng/templates/official/jobs/build-library.yml +++ b/eng/templates/official/jobs/build-library.yml @@ -23,7 +23,7 @@ jobs: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'public/PythonWorker_PublicPackages' + artifactFeeds: 'public/upstream-public' - task: UsePythonVersion@0 inputs: versionSpec: "3.13" @@ -39,6 +39,6 @@ jobs: - bash: | pip install pip-audit cd ${{ parameters.PROJECT_DIRECTORY }} - pip-audit . + pip-audit --vulnerability-service osv . displayName: 'Run vulnerability scan' continueOnError: true \ No newline at end of file diff --git a/eng/templates/official/jobs/ci-core-tools-tests.yml b/eng/templates/official/jobs/ci-core-tools-tests.yml index 61a723aa..24979fa5 100644 --- a/eng/templates/official/jobs/ci-core-tools-tests.yml +++ b/eng/templates/official/jobs/ci-core-tools-tests.yml @@ -11,7 +11,7 @@ jobs: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' + artifactFeeds: 'internal/upstream' - task: UsePythonVersion@0 displayName: 'Install Python' inputs: diff --git a/eng/templates/official/jobs/ci-custom-image-tests.yml b/eng/templates/official/jobs/ci-custom-image-tests.yml index 9592d9b1..955e1507 100644 --- a/eng/templates/official/jobs/ci-custom-image-tests.yml +++ b/eng/templates/official/jobs/ci-custom-image-tests.yml @@ -14,7 +14,7 @@ jobs: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' + artifactFeeds: 'internal/upstream' - task: UsePythonVersion@0 inputs: versionSpec: $(CUSTOM_PYTHON_VERSION) diff --git a/eng/templates/official/jobs/ci-docker-dedicated-tests.yml b/eng/templates/official/jobs/ci-docker-dedicated-tests.yml index 8e875ce4..c5232161 100644 --- a/eng/templates/official/jobs/ci-docker-dedicated-tests.yml +++ b/eng/templates/official/jobs/ci-docker-dedicated-tests.yml @@ -41,7 +41,7 @@ jobs: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' + artifactFeeds: 'internal/upstream' - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) diff --git a/eng/templates/official/jobs/ci-e2e-tests.yml b/eng/templates/official/jobs/ci-e2e-tests.yml index 0ab7381c..2b1f1e4f 100644 --- a/eng/templates/official/jobs/ci-e2e-tests.yml +++ b/eng/templates/official/jobs/ci-e2e-tests.yml @@ -53,7 +53,7 @@ jobs: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' + artifactFeeds: 'internal/upstream' - bash: | echo "Disk space before cleanup:" df -h @@ -92,12 +92,12 @@ jobs: displayName: 'NuGet Authenticate' - bash: | # Remove the feed that doesn't match the current service connection - if [[ "${{ parameters.NuGetServiceConnection }}" == "PythonWorker_PublicPackages" ]]; then + if [[ "${{ parameters.NuGetServiceConnection }}" == "upstream-public" ]]; then # Remove internal feed for public builds - sed -i '/_Internal_PublicPackages/d' nuget.config + sed -i '/key="upstream" /d' nuget.config else # Remove public feed for internal builds - sed -i '/PythonWorker_PublicPackages[^_]/d' nuget.config + sed -i '/key="upstream-public"/d' nuget.config fi echo "Updated nuget.config:" cat nuget.config diff --git a/eng/templates/official/jobs/ci-fc-tests.yml b/eng/templates/official/jobs/ci-fc-tests.yml index 27014023..03a7774b 100644 --- a/eng/templates/official/jobs/ci-fc-tests.yml +++ b/eng/templates/official/jobs/ci-fc-tests.yml @@ -26,7 +26,7 @@ jobs: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' + artifactFeeds: 'internal/upstream' - bash: | echo "Disk space before cleanup:" df -h diff --git a/eng/templates/official/release/build-artifacts.yml b/eng/templates/official/release/build-artifacts.yml index 647f74a9..3c1e5aea 100644 --- a/eng/templates/official/release/build-artifacts.yml +++ b/eng/templates/official/release/build-artifacts.yml @@ -48,7 +48,7 @@ jobs: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' + artifactFeeds: 'internal/upstream' - ${{ if ne(parameters.libraryVersion, '') }}: - checkout: none - bash: | diff --git a/eng/templates/shared/build-steps.yml b/eng/templates/shared/build-steps.yml index 5fcb66b7..482e42e9 100644 --- a/eng/templates/shared/build-steps.yml +++ b/eng/templates/shared/build-steps.yml @@ -24,5 +24,5 @@ steps: - bash: | pip install pip-audit cd ${{ parameters.PROJECT_DIRECTORY }} - pip-audit -r requirements.txt + pip-audit --vulnerability-service osv . displayName: 'Run vulnerability scan' \ No newline at end of file diff --git a/nuget.config b/nuget.config index 08b34c2a..51fb0533 100644 --- a/nuget.config +++ b/nuget.config @@ -2,6 +2,6 @@ - + \ No newline at end of file From bbda3ce95add714b8310e1d975ea5c9d014abf87 Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Fri, 31 Jul 2026 07:41:50 -0500 Subject: [PATCH 13/17] extra pip auth flag --- eng/pack/templates/macos_64_env_gen.yml | 9 +++++---- eng/pack/templates/nix_arm64_env_gen.yml | 9 +++++---- eng/pack/templates/nix_env_gen.yml | 9 +++++---- eng/pack/templates/win_env_gen.yml | 9 +++++---- eng/templates/jobs/ci-dependency-check.yml | 1 + eng/templates/jobs/ci-emulator-tests.yml | 1 + eng/templates/jobs/ci-library-unit-tests.yml | 1 + eng/templates/jobs/ci-unit-tests.yml | 1 + eng/templates/official/jobs/build-library.yml | 1 + eng/templates/official/jobs/ci-core-tools-tests.yml | 1 + eng/templates/official/jobs/ci-custom-image-tests.yml | 1 + .../official/jobs/ci-docker-dedicated-tests.yml | 1 + eng/templates/official/jobs/ci-e2e-tests.yml | 1 + eng/templates/official/jobs/ci-fc-tests.yml | 1 + eng/templates/official/release/build-artifacts.yml | 1 + eng/templates/shared/build-steps.yml | 1 + 16 files changed, 32 insertions(+), 16 deletions(-) diff --git a/eng/pack/templates/macos_64_env_gen.yml b/eng/pack/templates/macos_64_env_gen.yml index e3065fb5..73ca1237 100644 --- a/eng/pack/templates/macos_64_env_gen.yml +++ b/eng/pack/templates/macos_64_env_gen.yml @@ -8,6 +8,7 @@ steps: displayName: 'Pip Authenticate' inputs: artifactFeeds: 'internal/upstream' + onlyAddExtraIndex: false - task: UsePythonVersion@0 inputs: versionSpec: ${{ parameters.pythonVersion }} @@ -147,7 +148,7 @@ steps: if (-not $grpcMatch) { $missing += "grpc/_cython/$grpcPattern" } else { - Write-Host "✅ Found gRPC binary: $grpcMatch" + Write-Host "✅ Found gRPC binary: $grpcMatch" } if ($missing.Count -gt 0) { @@ -155,7 +156,7 @@ steps: exit 1 } else { - Write-Host "✅ Validation passed. All expected files/folders are present." + Write-Host "✅ Validation passed. All expected files/folders are present." } displayName: "Validate azure_functions_worker artifact contents" condition: eq(variables['proxyWorker'], false) @@ -237,7 +238,7 @@ steps: if (-not $grpcMatch) { $missing += "grpc/_cython/$grpcPattern" } else { - Write-Host "✅ Found gRPC binary: $grpcMatch" + Write-Host "✅ Found gRPC binary: $grpcMatch" } if ($missing.Count -gt 0) { @@ -245,7 +246,7 @@ steps: exit 1 } else { - Write-Host "✅ Validation passed. All expected files/folders are present." + Write-Host "✅ Validation passed. All expected files/folders are present." } displayName: "Validate proxy_worker artifact contents" condition: eq(variables['proxyWorker'], true) diff --git a/eng/pack/templates/nix_arm64_env_gen.yml b/eng/pack/templates/nix_arm64_env_gen.yml index b200e421..87d328eb 100644 --- a/eng/pack/templates/nix_arm64_env_gen.yml +++ b/eng/pack/templates/nix_arm64_env_gen.yml @@ -8,6 +8,7 @@ steps: displayName: 'Pip Authenticate' inputs: artifactFeeds: 'internal/upstream' + onlyAddExtraIndex: false - task: UsePythonVersion@0 inputs: versionSpec: ${{ parameters.pythonVersion }} @@ -147,7 +148,7 @@ steps: if (-not $grpcMatch) { $missing += "grpc/_cython/$grpcPattern" } else { - Write-Host "✅ Found gRPC binary: $grpcMatch" + Write-Host "✅ Found gRPC binary: $grpcMatch" } if ($missing.Count -gt 0) { @@ -155,7 +156,7 @@ steps: exit 1 } else { - Write-Host "✅ Validation passed. All expected files/folders are present." + Write-Host "✅ Validation passed. All expected files/folders are present." } displayName: "Validate azure_functions_worker artifact contents" condition: eq(variables['proxyWorker'], false) @@ -227,7 +228,7 @@ steps: # if (-not $grpcMatch) { # $missing += "grpc/_cython/$grpcPattern" # } else { - # Write-Host "✅ Found gRPC binary: $grpcMatch" + # Write-Host "✅ Found gRPC binary: $grpcMatch" # } if ($missing.Count -gt 0) { @@ -235,7 +236,7 @@ steps: exit 1 } else { - Write-Host "✅ Validation passed. All expected files/folders are present." + Write-Host "✅ Validation passed. All expected files/folders are present." } displayName: "Validate proxy_worker artifact contents" condition: eq(variables['proxyWorker'], true) diff --git a/eng/pack/templates/nix_env_gen.yml b/eng/pack/templates/nix_env_gen.yml index 7666695b..0d237f69 100644 --- a/eng/pack/templates/nix_env_gen.yml +++ b/eng/pack/templates/nix_env_gen.yml @@ -8,6 +8,7 @@ steps: displayName: 'Pip Authenticate' inputs: artifactFeeds: 'internal/upstream' + onlyAddExtraIndex: false - task: UsePythonVersion@0 inputs: versionSpec: ${{ parameters.pythonVersion }} @@ -147,7 +148,7 @@ steps: if (-not $grpcMatch) { $missing += "grpc/_cython/$grpcPattern" } else { - Write-Host "✅ Found gRPC binary: $grpcMatch" + Write-Host "✅ Found gRPC binary: $grpcMatch" } if ($missing.Count -gt 0) { @@ -155,7 +156,7 @@ steps: exit 1 } else { - Write-Host "✅ Validation passed. All expected files/folders are present." + Write-Host "✅ Validation passed. All expected files/folders are present." } displayName: "Validate azure_functions_worker artifact contents" condition: eq(variables['proxyWorker'], false) @@ -228,7 +229,7 @@ steps: if (-not $grpcMatch) { $missing += "grpc/_cython/$grpcPattern" } else { - Write-Host "✅ Found gRPC binary: $grpcMatch" + Write-Host "✅ Found gRPC binary: $grpcMatch" } if ($missing.Count -gt 0) { @@ -236,7 +237,7 @@ steps: exit 1 } else { - Write-Host "✅ Validation passed. All expected files/folders are present." + Write-Host "✅ Validation passed. All expected files/folders are present." } displayName: "Validate proxy_worker artifact contents" condition: eq(variables['proxyWorker'], true) diff --git a/eng/pack/templates/win_env_gen.yml b/eng/pack/templates/win_env_gen.yml index 24347363..ae22db2e 100644 --- a/eng/pack/templates/win_env_gen.yml +++ b/eng/pack/templates/win_env_gen.yml @@ -8,6 +8,7 @@ steps: displayName: 'Pip Authenticate' inputs: artifactFeeds: 'internal/upstream' + onlyAddExtraIndex: false - task: UsePythonVersion@0 inputs: versionSpec: ${{ parameters.pythonVersion }} @@ -146,7 +147,7 @@ steps: if (-not $grpcMatch) { $missing += "grpc/_cython/$grpcPattern" } else { - Write-Host "✅ Found gRPC binary: $grpcMatch" + Write-Host "✅ Found gRPC binary: $grpcMatch" } if ($missing.Count -gt 0) { @@ -154,7 +155,7 @@ steps: exit 1 } else { - Write-Host "✅ Validation passed. All expected files/folders are present." + Write-Host "✅ Validation passed. All expected files/folders are present." } displayName: "Validate azure_functions_worker artifact contents" condition: eq(variables['proxyWorker'], false) @@ -234,7 +235,7 @@ steps: if (-not $grpcMatch) { $missing += "grpc/_cython/$grpcPattern" } else { - Write-Host "✅ Found gRPC binary: $grpcMatch" + Write-Host "✅ Found gRPC binary: $grpcMatch" } if ($missing.Count -gt 0) { @@ -242,7 +243,7 @@ steps: exit 1 } else { - Write-Host "✅ Validation passed. All expected files/folders are present." + Write-Host "✅ Validation passed. All expected files/folders are present." } displayName: "Validate proxy_worker artifact contents" condition: eq(variables['proxyWorker'], true) diff --git a/eng/templates/jobs/ci-dependency-check.yml b/eng/templates/jobs/ci-dependency-check.yml index 824301dd..d31d1dd9 100644 --- a/eng/templates/jobs/ci-dependency-check.yml +++ b/eng/templates/jobs/ci-dependency-check.yml @@ -29,6 +29,7 @@ jobs: displayName: 'Pip Authenticate' inputs: artifactFeeds: ${{ parameters.ArtifactFeed }} + onlyAddExtraIndex: false - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) diff --git a/eng/templates/jobs/ci-emulator-tests.yml b/eng/templates/jobs/ci-emulator-tests.yml index 790aa434..2cffb746 100644 --- a/eng/templates/jobs/ci-emulator-tests.yml +++ b/eng/templates/jobs/ci-emulator-tests.yml @@ -31,6 +31,7 @@ jobs: displayName: 'Pip Authenticate' inputs: artifactFeeds: ${{ parameters.ArtifactFeed }} + onlyAddExtraIndex: false - bash: | echo "Disk space before cleanup:" df -h diff --git a/eng/templates/jobs/ci-library-unit-tests.yml b/eng/templates/jobs/ci-library-unit-tests.yml index c669e4e4..81864839 100644 --- a/eng/templates/jobs/ci-library-unit-tests.yml +++ b/eng/templates/jobs/ci-library-unit-tests.yml @@ -23,6 +23,7 @@ jobs: displayName: 'Pip Authenticate' inputs: artifactFeeds: ${{ parameters.ArtifactFeed }} + onlyAddExtraIndex: false - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) diff --git a/eng/templates/jobs/ci-unit-tests.yml b/eng/templates/jobs/ci-unit-tests.yml index 2ab2bc5d..63abef7f 100644 --- a/eng/templates/jobs/ci-unit-tests.yml +++ b/eng/templates/jobs/ci-unit-tests.yml @@ -31,6 +31,7 @@ jobs: displayName: 'Pip Authenticate' inputs: artifactFeeds: ${{ parameters.ArtifactFeed }} + onlyAddExtraIndex: false - bash: | echo "Disk space before cleanup:" df -h diff --git a/eng/templates/official/jobs/build-library.yml b/eng/templates/official/jobs/build-library.yml index 416d4a3c..683039ea 100644 --- a/eng/templates/official/jobs/build-library.yml +++ b/eng/templates/official/jobs/build-library.yml @@ -24,6 +24,7 @@ jobs: displayName: 'Pip Authenticate' inputs: artifactFeeds: 'public/upstream-public' + onlyAddExtraIndex: false - task: UsePythonVersion@0 inputs: versionSpec: "3.13" diff --git a/eng/templates/official/jobs/ci-core-tools-tests.yml b/eng/templates/official/jobs/ci-core-tools-tests.yml index 24979fa5..9ede451a 100644 --- a/eng/templates/official/jobs/ci-core-tools-tests.yml +++ b/eng/templates/official/jobs/ci-core-tools-tests.yml @@ -12,6 +12,7 @@ jobs: displayName: 'Pip Authenticate' inputs: artifactFeeds: 'internal/upstream' + onlyAddExtraIndex: false - task: UsePythonVersion@0 displayName: 'Install Python' inputs: diff --git a/eng/templates/official/jobs/ci-custom-image-tests.yml b/eng/templates/official/jobs/ci-custom-image-tests.yml index 955e1507..81e204be 100644 --- a/eng/templates/official/jobs/ci-custom-image-tests.yml +++ b/eng/templates/official/jobs/ci-custom-image-tests.yml @@ -15,6 +15,7 @@ jobs: displayName: 'Pip Authenticate' inputs: artifactFeeds: 'internal/upstream' + onlyAddExtraIndex: false - task: UsePythonVersion@0 inputs: versionSpec: $(CUSTOM_PYTHON_VERSION) diff --git a/eng/templates/official/jobs/ci-docker-dedicated-tests.yml b/eng/templates/official/jobs/ci-docker-dedicated-tests.yml index c5232161..a3580abd 100644 --- a/eng/templates/official/jobs/ci-docker-dedicated-tests.yml +++ b/eng/templates/official/jobs/ci-docker-dedicated-tests.yml @@ -42,6 +42,7 @@ jobs: displayName: 'Pip Authenticate' inputs: artifactFeeds: 'internal/upstream' + onlyAddExtraIndex: false - task: UsePythonVersion@0 inputs: versionSpec: $(PYTHON_VERSION) diff --git a/eng/templates/official/jobs/ci-e2e-tests.yml b/eng/templates/official/jobs/ci-e2e-tests.yml index 2b1f1e4f..ee2a217e 100644 --- a/eng/templates/official/jobs/ci-e2e-tests.yml +++ b/eng/templates/official/jobs/ci-e2e-tests.yml @@ -54,6 +54,7 @@ jobs: displayName: 'Pip Authenticate' inputs: artifactFeeds: 'internal/upstream' + onlyAddExtraIndex: false - bash: | echo "Disk space before cleanup:" df -h diff --git a/eng/templates/official/jobs/ci-fc-tests.yml b/eng/templates/official/jobs/ci-fc-tests.yml index 03a7774b..0dbee2b1 100644 --- a/eng/templates/official/jobs/ci-fc-tests.yml +++ b/eng/templates/official/jobs/ci-fc-tests.yml @@ -27,6 +27,7 @@ jobs: displayName: 'Pip Authenticate' inputs: artifactFeeds: 'internal/upstream' + onlyAddExtraIndex: false - bash: | echo "Disk space before cleanup:" df -h diff --git a/eng/templates/official/release/build-artifacts.yml b/eng/templates/official/release/build-artifacts.yml index 3c1e5aea..281392ff 100644 --- a/eng/templates/official/release/build-artifacts.yml +++ b/eng/templates/official/release/build-artifacts.yml @@ -49,6 +49,7 @@ jobs: displayName: 'Pip Authenticate' inputs: artifactFeeds: 'internal/upstream' + onlyAddExtraIndex: false - ${{ if ne(parameters.libraryVersion, '') }}: - checkout: none - bash: | diff --git a/eng/templates/shared/build-steps.yml b/eng/templates/shared/build-steps.yml index 482e42e9..356bab42 100644 --- a/eng/templates/shared/build-steps.yml +++ b/eng/templates/shared/build-steps.yml @@ -9,6 +9,7 @@ steps: displayName: 'Pip Authenticate' inputs: artifactFeeds: ${{ parameters.ArtifactFeed }} + onlyAddExtraIndex: false - task: UsePythonVersion@0 inputs: versionSpec: ${{ parameters.PYTHON_VERSION }} From d6b77bdd0205afc33bfe21a07f051653b806a84e Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Fri, 31 Jul 2026 08:01:48 -0500 Subject: [PATCH 14/17] remove pip audit --- eng/pack/templates/macos_64_env_gen.yml | 6 ------ eng/pack/templates/nix_arm64_env_gen.yml | 6 ------ eng/pack/templates/nix_env_gen.yml | 6 ------ eng/pack/templates/win_env_gen.yml | 6 ------ eng/templates/official/jobs/build-library.yml | 8 +------- eng/templates/shared/build-steps.yml | 7 +------ 6 files changed, 2 insertions(+), 37 deletions(-) diff --git a/eng/pack/templates/macos_64_env_gen.yml b/eng/pack/templates/macos_64_env_gen.yml index 73ca1237..7f6dec62 100644 --- a/eng/pack/templates/macos_64_env_gen.yml +++ b/eng/pack/templates/macos_64_env_gen.yml @@ -70,12 +70,6 @@ steps: # args: '${{ parameters.pythonVersion }}' # displayName: 'Build dependencies from source' # condition: eq(variables['isRC'], 'true') -- bash: | - pip install pip-audit - cd workers - pip-audit --vulnerability-service osv . - displayName: 'Run vulnerability scan' - continueOnError: true - task: CopyFiles@2 inputs: contents: '$(workerPath)' diff --git a/eng/pack/templates/nix_arm64_env_gen.yml b/eng/pack/templates/nix_arm64_env_gen.yml index 87d328eb..89c16796 100644 --- a/eng/pack/templates/nix_arm64_env_gen.yml +++ b/eng/pack/templates/nix_arm64_env_gen.yml @@ -70,12 +70,6 @@ steps: args: '${{ parameters.pythonVersion }}' displayName: 'Build dependencies from scratch' condition: eq(variables['isRC'], 'true') -- bash: | - pip install pip-audit - cd workers - pip-audit --vulnerability-service osv . - displayName: 'Run vulnerability scan' - continueOnError: true - task: CopyFiles@2 inputs: contents: '$(workerPath)' diff --git a/eng/pack/templates/nix_env_gen.yml b/eng/pack/templates/nix_env_gen.yml index 0d237f69..71c7c81f 100644 --- a/eng/pack/templates/nix_env_gen.yml +++ b/eng/pack/templates/nix_env_gen.yml @@ -70,12 +70,6 @@ steps: # args: '${{ parameters.pythonVersion }}' # displayName: 'Build dependencies from source' # condition: eq(variables['isRC'], 'true') -- bash: | - pip install pip-audit - cd workers - pip-audit --vulnerability-service osv . - displayName: 'Run vulnerability scan' - continueOnError: true - task: CopyFiles@2 inputs: contents: '$(workerPath)' diff --git a/eng/pack/templates/win_env_gen.yml b/eng/pack/templates/win_env_gen.yml index ae22db2e..75065f54 100644 --- a/eng/pack/templates/win_env_gen.yml +++ b/eng/pack/templates/win_env_gen.yml @@ -69,12 +69,6 @@ steps: # arguments: '${{ parameters.pythonVersion }}' # displayName: 'Build dependencies from source' # condition: eq(variables['isRC'], 'true') -- bash: | - pip install pip-audit - cd workers - pip-audit --vulnerability-service osv . - displayName: 'Run vulnerability scan' - continueOnError: true - task: CopyFiles@2 inputs: contents: '$(workerPath)' diff --git a/eng/templates/official/jobs/build-library.yml b/eng/templates/official/jobs/build-library.yml index 683039ea..f39b02fd 100644 --- a/eng/templates/official/jobs/build-library.yml +++ b/eng/templates/official/jobs/build-library.yml @@ -36,10 +36,4 @@ jobs: python -m pip install build cd ${{ parameters.PROJECT_DIRECTORY }} python -m build - displayName: 'Build ${{ parameters.PROJECT_NAME }}' - - bash: | - pip install pip-audit - cd ${{ parameters.PROJECT_DIRECTORY }} - pip-audit --vulnerability-service osv . - displayName: 'Run vulnerability scan' - continueOnError: true \ No newline at end of file + displayName: 'Build ${{ parameters.PROJECT_NAME }}' \ No newline at end of file diff --git a/eng/templates/shared/build-steps.yml b/eng/templates/shared/build-steps.yml index 356bab42..743e1098 100644 --- a/eng/templates/shared/build-steps.yml +++ b/eng/templates/shared/build-steps.yml @@ -21,9 +21,4 @@ steps: python -m pip install build cd ${{ parameters.PROJECT_DIRECTORY }} python -m build - displayName: 'Build Python ${{ parameters.PROJECT_NAME }}' - - bash: | - pip install pip-audit - cd ${{ parameters.PROJECT_DIRECTORY }} - pip-audit --vulnerability-service osv . - displayName: 'Run vulnerability scan' \ No newline at end of file + displayName: 'Build Python ${{ parameters.PROJECT_NAME }}' \ No newline at end of file From ad4f4f6ff954ca1295d7e3a52008b62b821a0fb3 Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Fri, 31 Jul 2026 09:27:51 -0500 Subject: [PATCH 15/17] revert feed changes --- eng/ci/emulator-tests.yml | 2 +- eng/ci/official-build.yml | 8 ++++---- eng/ci/public-build.yml | 10 +++++----- eng/pack/templates/macos_64_env_gen.yml | 2 +- eng/pack/templates/nix_arm64_env_gen.yml | 2 +- eng/pack/templates/nix_env_gen.yml | 2 +- eng/pack/templates/win_env_gen.yml | 2 +- eng/templates/jobs/build.yml | 2 +- eng/templates/jobs/ci-emulator-tests.yml | 4 ++-- eng/templates/jobs/ci-library-unit-tests.yml | 4 ++-- eng/templates/jobs/ci-unit-tests.yml | 4 ++-- eng/templates/official/jobs/build-library.yml | 2 +- eng/templates/official/jobs/ci-core-tools-tests.yml | 2 +- eng/templates/official/jobs/ci-custom-image-tests.yml | 2 +- .../official/jobs/ci-docker-dedicated-tests.yml | 2 +- eng/templates/official/jobs/ci-e2e-tests.yml | 6 +++--- eng/templates/official/jobs/ci-fc-tests.yml | 2 +- eng/templates/official/release/build-artifacts.yml | 2 +- nuget.config | 2 +- 19 files changed, 31 insertions(+), 31 deletions(-) diff --git a/eng/ci/emulator-tests.yml b/eng/ci/emulator-tests.yml index 7ff7212a..c165b02e 100644 --- a/eng/ci/emulator-tests.yml +++ b/eng/ci/emulator-tests.yml @@ -50,5 +50,5 @@ extends: - template: /eng/templates/jobs/ci-emulator-tests.yml@self parameters: PoolName: 1es-pool-azfunc - ArtifactFeed: 'internal/upstream' + ArtifactFeed: 'internal/PythonWorker_Internal_PublicPackages' NuGetServiceConnection: 'PythonWorker_Internal_PublicPackages' \ No newline at end of file diff --git a/eng/ci/official-build.yml b/eng/ci/official-build.yml index fb229ea4..876ac571 100644 --- a/eng/ci/official-build.yml +++ b/eng/ci/official-build.yml @@ -63,7 +63,7 @@ extends: - template: /eng/templates/jobs/ci-emulator-tests.yml@self parameters: PoolName: 1es-pool-azfunc - ArtifactFeed: 'internal/upstream' + ArtifactFeed: 'internal/PythonWorker_Internal_PublicPackages' NuGetServiceConnection: 'PythonWorker_Internal_PublicPackages' - stage: RunWorkerUnitTests dependsOn: BuildPythonWorker @@ -71,7 +71,7 @@ extends: - template: /eng/templates/jobs/ci-unit-tests.yml@self parameters: PoolName: 1es-pool-azfunc - ArtifactFeed: 'internal/upstream' + ArtifactFeed: 'internal/PythonWorker_Internal_PublicPackages' NuGetServiceConnection: 'PythonWorker_Internal_PublicPackages' - stage: RunWorkerDockerDedicatedTests dependsOn: BuildPythonWorker @@ -99,7 +99,7 @@ extends: PROJECT_NAME: 'Python V2 Library' PROJECT_DIRECTORY: 'runtimes/v2' PoolName: 1es-pool-azfunc - ArtifactFeed: 'internal/upstream' + ArtifactFeed: 'internal/PythonWorker_Internal_PublicPackages' NuGetServiceConnection: 'PythonWorker_Internal_PublicPackages' # Python V1 Library Build and Test Stages @@ -119,5 +119,5 @@ extends: PROJECT_NAME: 'Python V1 Library' PROJECT_DIRECTORY: 'runtimes/v1' PoolName: 1es-pool-azfunc - ArtifactFeed: 'internal/upstream' + ArtifactFeed: 'internal/PythonWorker_Internal_PublicPackages' NuGetServiceConnection: 'PythonWorker_Internal_PublicPackages' \ No newline at end of file diff --git a/eng/ci/public-build.yml b/eng/ci/public-build.yml index 068c372e..e9c5b414 100644 --- a/eng/ci/public-build.yml +++ b/eng/ci/public-build.yml @@ -79,7 +79,7 @@ extends: - template: /eng/templates/jobs/ci-dependency-check.yml@self parameters: PoolName: 1es-pool-azfunc-public - ArtifactFeed: 'public/upstream-public' + ArtifactFeed: 'public/PythonWorker_PublicPackages' - stage: RunWorkerUnitTests dependsOn: BuildPythonWorker jobs: @@ -87,7 +87,7 @@ extends: parameters: PROJECT_DIRECTORY: 'workers' PoolName: 1es-pool-azfunc-public - ArtifactFeed: 'public/upstream-public' + ArtifactFeed: 'public/PythonWorker_PublicPackages' NuGetServiceConnection: 'PythonWorker_PublicPackages' - stage: RunWorkerEmulatorTests dependsOn: BuildPythonWorker @@ -95,7 +95,7 @@ extends: - template: /eng/templates/jobs/ci-emulator-tests.yml@self parameters: PoolName: 1es-pool-azfunc-public - ArtifactFeed: 'public/upstream-public' + ArtifactFeed: 'public/PythonWorker_PublicPackages' NuGetServiceConnection: 'PythonWorker_PublicPackages' # Python V2 Library Build and Test Stages @@ -115,7 +115,7 @@ extends: PROJECT_NAME: 'V2 Library' PROJECT_DIRECTORY: 'runtimes/v2' PoolName: 1es-pool-azfunc-public - ArtifactFeed: 'public/upstream-public' + ArtifactFeed: 'public/PythonWorker_PublicPackages' NuGetServiceConnection: 'PythonWorker_PublicPackages' # Python V1 Library Build and Test Stages @@ -135,5 +135,5 @@ extends: PROJECT_NAME: 'V1 Library' PROJECT_DIRECTORY: 'runtimes/v1' PoolName: 1es-pool-azfunc-public - ArtifactFeed: 'public/upstream-public' + ArtifactFeed: 'public/PythonWorker_PublicPackages' NuGetServiceConnection: 'PythonWorker_PublicPackages' \ No newline at end of file diff --git a/eng/pack/templates/macos_64_env_gen.yml b/eng/pack/templates/macos_64_env_gen.yml index 7f6dec62..e8f4067c 100644 --- a/eng/pack/templates/macos_64_env_gen.yml +++ b/eng/pack/templates/macos_64_env_gen.yml @@ -7,7 +7,7 @@ steps: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'internal/upstream' + artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' onlyAddExtraIndex: false - task: UsePythonVersion@0 inputs: diff --git a/eng/pack/templates/nix_arm64_env_gen.yml b/eng/pack/templates/nix_arm64_env_gen.yml index 89c16796..a4426f08 100644 --- a/eng/pack/templates/nix_arm64_env_gen.yml +++ b/eng/pack/templates/nix_arm64_env_gen.yml @@ -7,7 +7,7 @@ steps: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'internal/upstream' + artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' onlyAddExtraIndex: false - task: UsePythonVersion@0 inputs: diff --git a/eng/pack/templates/nix_env_gen.yml b/eng/pack/templates/nix_env_gen.yml index 71c7c81f..582b164d 100644 --- a/eng/pack/templates/nix_env_gen.yml +++ b/eng/pack/templates/nix_env_gen.yml @@ -7,7 +7,7 @@ steps: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'internal/upstream' + artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' onlyAddExtraIndex: false - task: UsePythonVersion@0 inputs: diff --git a/eng/pack/templates/win_env_gen.yml b/eng/pack/templates/win_env_gen.yml index 75065f54..c828c58f 100644 --- a/eng/pack/templates/win_env_gen.yml +++ b/eng/pack/templates/win_env_gen.yml @@ -7,7 +7,7 @@ steps: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'internal/upstream' + artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' onlyAddExtraIndex: false - task: UsePythonVersion@0 inputs: diff --git a/eng/templates/jobs/build.yml b/eng/templates/jobs/build.yml index 70826229..2af6eeee 100644 --- a/eng/templates/jobs/build.yml +++ b/eng/templates/jobs/build.yml @@ -19,4 +19,4 @@ jobs: PYTHON_VERSION: ${{ parameters.PYTHON_VERSION }} PROJECT_NAME: ${{ parameters.PROJECT_NAME }} PROJECT_DIRECTORY: ${{ parameters.PROJECT_DIRECTORY }} - ArtifactFeed: 'public/upstream-public' \ No newline at end of file + ArtifactFeed: 'public/PythonWorker_PublicPackages' \ No newline at end of file diff --git a/eng/templates/jobs/ci-emulator-tests.yml b/eng/templates/jobs/ci-emulator-tests.yml index 2cffb746..4532082c 100644 --- a/eng/templates/jobs/ci-emulator-tests.yml +++ b/eng/templates/jobs/ci-emulator-tests.yml @@ -83,10 +83,10 @@ jobs: # Remove the feed that doesn't match the current service connection if [[ "${{ parameters.NuGetServiceConnection }}" == "upstream-public" ]]; then # Remove internal feed for public builds - sed -i '/key="upstream" /d' nuget.config + sed -i '/_Internal_PublicPackages/d' nuget.config else # Remove public feed for internal builds - sed -i '/key="upstream-public"/d' nuget.config + sed -i '/PythonWorker_PublicPackages[^_]/d' nuget.config fi echo "Updated nuget.config:" cat nuget.config diff --git a/eng/templates/jobs/ci-library-unit-tests.yml b/eng/templates/jobs/ci-library-unit-tests.yml index 81864839..b7af256c 100644 --- a/eng/templates/jobs/ci-library-unit-tests.yml +++ b/eng/templates/jobs/ci-library-unit-tests.yml @@ -37,10 +37,10 @@ jobs: # Remove the feed that doesn't match the current service connection if [[ "${{ parameters.NuGetServiceConnection }}" == "upstream-public" ]]; then # Remove internal feed for public builds - sed -i '/key="upstream" /d' nuget.config + sed -i '/_Internal_PublicPackages/d' nuget.config else # Remove public feed for internal builds - sed -i '/key="upstream-public"/d' nuget.config + sed -i '/PythonWorker_PublicPackages[^_]/d' nuget.config fi echo "Updated nuget.config:" cat nuget.config diff --git a/eng/templates/jobs/ci-unit-tests.yml b/eng/templates/jobs/ci-unit-tests.yml index 63abef7f..84d8cad0 100644 --- a/eng/templates/jobs/ci-unit-tests.yml +++ b/eng/templates/jobs/ci-unit-tests.yml @@ -86,10 +86,10 @@ jobs: # Remove the feed that doesn't match the current service connection if [[ "${{ parameters.NuGetServiceConnection }}" == "upstream-public" ]]; then # Remove internal feed for public builds - sed -i '/key="upstream" /d' nuget.config + sed -i '/_Internal_PublicPackages/d' nuget.config else # Remove public feed for internal builds - sed -i '/key="upstream-public"/d' nuget.config + sed -i '/PythonWorker_PublicPackages[^_]/d' nuget.config fi echo "Updated nuget.config:" cat nuget.config diff --git a/eng/templates/official/jobs/build-library.yml b/eng/templates/official/jobs/build-library.yml index f39b02fd..22641250 100644 --- a/eng/templates/official/jobs/build-library.yml +++ b/eng/templates/official/jobs/build-library.yml @@ -23,7 +23,7 @@ jobs: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'public/upstream-public' + artifactFeeds: 'public/PythonWorker_PublicPackages' onlyAddExtraIndex: false - task: UsePythonVersion@0 inputs: diff --git a/eng/templates/official/jobs/ci-core-tools-tests.yml b/eng/templates/official/jobs/ci-core-tools-tests.yml index 9ede451a..4d118297 100644 --- a/eng/templates/official/jobs/ci-core-tools-tests.yml +++ b/eng/templates/official/jobs/ci-core-tools-tests.yml @@ -11,7 +11,7 @@ jobs: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'internal/upstream' + artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' onlyAddExtraIndex: false - task: UsePythonVersion@0 displayName: 'Install Python' diff --git a/eng/templates/official/jobs/ci-custom-image-tests.yml b/eng/templates/official/jobs/ci-custom-image-tests.yml index 81e204be..2a0f0dfc 100644 --- a/eng/templates/official/jobs/ci-custom-image-tests.yml +++ b/eng/templates/official/jobs/ci-custom-image-tests.yml @@ -14,7 +14,7 @@ jobs: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'internal/upstream' + artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' onlyAddExtraIndex: false - task: UsePythonVersion@0 inputs: diff --git a/eng/templates/official/jobs/ci-docker-dedicated-tests.yml b/eng/templates/official/jobs/ci-docker-dedicated-tests.yml index a3580abd..d732e2f9 100644 --- a/eng/templates/official/jobs/ci-docker-dedicated-tests.yml +++ b/eng/templates/official/jobs/ci-docker-dedicated-tests.yml @@ -41,7 +41,7 @@ jobs: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'internal/upstream' + artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' onlyAddExtraIndex: false - task: UsePythonVersion@0 inputs: diff --git a/eng/templates/official/jobs/ci-e2e-tests.yml b/eng/templates/official/jobs/ci-e2e-tests.yml index ee2a217e..c6c185b9 100644 --- a/eng/templates/official/jobs/ci-e2e-tests.yml +++ b/eng/templates/official/jobs/ci-e2e-tests.yml @@ -53,7 +53,7 @@ jobs: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'internal/upstream' + artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' onlyAddExtraIndex: false - bash: | echo "Disk space before cleanup:" @@ -95,10 +95,10 @@ jobs: # Remove the feed that doesn't match the current service connection if [[ "${{ parameters.NuGetServiceConnection }}" == "upstream-public" ]]; then # Remove internal feed for public builds - sed -i '/key="upstream" /d' nuget.config + sed -i '/_Internal_PublicPackages/d' nuget.config else # Remove public feed for internal builds - sed -i '/key="upstream-public"/d' nuget.config + sed -i '/PythonWorker_PublicPackages[^_]/d' nuget.config fi echo "Updated nuget.config:" cat nuget.config diff --git a/eng/templates/official/jobs/ci-fc-tests.yml b/eng/templates/official/jobs/ci-fc-tests.yml index 0dbee2b1..ce8461d3 100644 --- a/eng/templates/official/jobs/ci-fc-tests.yml +++ b/eng/templates/official/jobs/ci-fc-tests.yml @@ -26,7 +26,7 @@ jobs: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'internal/upstream' + artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' onlyAddExtraIndex: false - bash: | echo "Disk space before cleanup:" diff --git a/eng/templates/official/release/build-artifacts.yml b/eng/templates/official/release/build-artifacts.yml index 281392ff..94a67725 100644 --- a/eng/templates/official/release/build-artifacts.yml +++ b/eng/templates/official/release/build-artifacts.yml @@ -48,7 +48,7 @@ jobs: - task: PipAuthenticate@1 displayName: 'Pip Authenticate' inputs: - artifactFeeds: 'internal/upstream' + artifactFeeds: 'internal/PythonWorker_Internal_PublicPackages' onlyAddExtraIndex: false - ${{ if ne(parameters.libraryVersion, '') }}: - checkout: none diff --git a/nuget.config b/nuget.config index 51fb0533..08b34c2a 100644 --- a/nuget.config +++ b/nuget.config @@ -2,6 +2,6 @@ - + \ No newline at end of file From 14aeb626732ba82b1e338a1e6da2388b7e7ecdab Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Fri, 31 Jul 2026 09:31:38 -0500 Subject: [PATCH 16/17] fix misc refs --- eng/pack/templates/macos_64_env_gen.yml | 8 ++++---- eng/pack/templates/nix_arm64_env_gen.yml | 8 ++++---- eng/pack/templates/nix_env_gen.yml | 8 ++++---- eng/pack/templates/win_env_gen.yml | 8 ++++---- eng/templates/jobs/ci-emulator-tests.yml | 2 +- eng/templates/jobs/ci-library-unit-tests.yml | 2 +- eng/templates/jobs/ci-unit-tests.yml | 2 +- eng/templates/official/jobs/ci-e2e-tests.yml | 2 +- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/eng/pack/templates/macos_64_env_gen.yml b/eng/pack/templates/macos_64_env_gen.yml index e8f4067c..c7c181e5 100644 --- a/eng/pack/templates/macos_64_env_gen.yml +++ b/eng/pack/templates/macos_64_env_gen.yml @@ -142,7 +142,7 @@ steps: if (-not $grpcMatch) { $missing += "grpc/_cython/$grpcPattern" } else { - Write-Host "✅ Found gRPC binary: $grpcMatch" + Write-Host "✅ Found gRPC binary: $grpcMatch" } if ($missing.Count -gt 0) { @@ -150,7 +150,7 @@ steps: exit 1 } else { - Write-Host "✅ Validation passed. All expected files/folders are present." + Write-Host "✅ Validation passed. All expected files/folders are present." } displayName: "Validate azure_functions_worker artifact contents" condition: eq(variables['proxyWorker'], false) @@ -232,7 +232,7 @@ steps: if (-not $grpcMatch) { $missing += "grpc/_cython/$grpcPattern" } else { - Write-Host "✅ Found gRPC binary: $grpcMatch" + Write-Host "✅ Found gRPC binary: $grpcMatch" } if ($missing.Count -gt 0) { @@ -240,7 +240,7 @@ steps: exit 1 } else { - Write-Host "✅ Validation passed. All expected files/folders are present." + Write-Host "✅ Validation passed. All expected files/folders are present." } displayName: "Validate proxy_worker artifact contents" condition: eq(variables['proxyWorker'], true) diff --git a/eng/pack/templates/nix_arm64_env_gen.yml b/eng/pack/templates/nix_arm64_env_gen.yml index a4426f08..f850ed7d 100644 --- a/eng/pack/templates/nix_arm64_env_gen.yml +++ b/eng/pack/templates/nix_arm64_env_gen.yml @@ -142,7 +142,7 @@ steps: if (-not $grpcMatch) { $missing += "grpc/_cython/$grpcPattern" } else { - Write-Host "✅ Found gRPC binary: $grpcMatch" + Write-Host "✅ Found gRPC binary: $grpcMatch" } if ($missing.Count -gt 0) { @@ -150,7 +150,7 @@ steps: exit 1 } else { - Write-Host "✅ Validation passed. All expected files/folders are present." + Write-Host "✅ Validation passed. All expected files/folders are present." } displayName: "Validate azure_functions_worker artifact contents" condition: eq(variables['proxyWorker'], false) @@ -222,7 +222,7 @@ steps: # if (-not $grpcMatch) { # $missing += "grpc/_cython/$grpcPattern" # } else { - # Write-Host "✅ Found gRPC binary: $grpcMatch" + # Write-Host "✅ Found gRPC binary: $grpcMatch" # } if ($missing.Count -gt 0) { @@ -230,7 +230,7 @@ steps: exit 1 } else { - Write-Host "✅ Validation passed. All expected files/folders are present." + Write-Host "✅ Validation passed. All expected files/folders are present." } displayName: "Validate proxy_worker artifact contents" condition: eq(variables['proxyWorker'], true) diff --git a/eng/pack/templates/nix_env_gen.yml b/eng/pack/templates/nix_env_gen.yml index 582b164d..7ca47dd9 100644 --- a/eng/pack/templates/nix_env_gen.yml +++ b/eng/pack/templates/nix_env_gen.yml @@ -142,7 +142,7 @@ steps: if (-not $grpcMatch) { $missing += "grpc/_cython/$grpcPattern" } else { - Write-Host "✅ Found gRPC binary: $grpcMatch" + Write-Host "✅ Found gRPC binary: $grpcMatch" } if ($missing.Count -gt 0) { @@ -150,7 +150,7 @@ steps: exit 1 } else { - Write-Host "✅ Validation passed. All expected files/folders are present." + Write-Host "✅ Validation passed. All expected files/folders are present." } displayName: "Validate azure_functions_worker artifact contents" condition: eq(variables['proxyWorker'], false) @@ -223,7 +223,7 @@ steps: if (-not $grpcMatch) { $missing += "grpc/_cython/$grpcPattern" } else { - Write-Host "✅ Found gRPC binary: $grpcMatch" + Write-Host "✅ Found gRPC binary: $grpcMatch" } if ($missing.Count -gt 0) { @@ -231,7 +231,7 @@ steps: exit 1 } else { - Write-Host "✅ Validation passed. All expected files/folders are present." + Write-Host "✅ Validation passed. All expected files/folders are present." } displayName: "Validate proxy_worker artifact contents" condition: eq(variables['proxyWorker'], true) diff --git a/eng/pack/templates/win_env_gen.yml b/eng/pack/templates/win_env_gen.yml index c828c58f..d64b0537 100644 --- a/eng/pack/templates/win_env_gen.yml +++ b/eng/pack/templates/win_env_gen.yml @@ -141,7 +141,7 @@ steps: if (-not $grpcMatch) { $missing += "grpc/_cython/$grpcPattern" } else { - Write-Host "✅ Found gRPC binary: $grpcMatch" + Write-Host "✅ Found gRPC binary: $grpcMatch" } if ($missing.Count -gt 0) { @@ -149,7 +149,7 @@ steps: exit 1 } else { - Write-Host "✅ Validation passed. All expected files/folders are present." + Write-Host "✅ Validation passed. All expected files/folders are present." } displayName: "Validate azure_functions_worker artifact contents" condition: eq(variables['proxyWorker'], false) @@ -229,7 +229,7 @@ steps: if (-not $grpcMatch) { $missing += "grpc/_cython/$grpcPattern" } else { - Write-Host "✅ Found gRPC binary: $grpcMatch" + Write-Host "✅ Found gRPC binary: $grpcMatch" } if ($missing.Count -gt 0) { @@ -237,7 +237,7 @@ steps: exit 1 } else { - Write-Host "✅ Validation passed. All expected files/folders are present." + Write-Host "✅ Validation passed. All expected files/folders are present." } displayName: "Validate proxy_worker artifact contents" condition: eq(variables['proxyWorker'], true) diff --git a/eng/templates/jobs/ci-emulator-tests.yml b/eng/templates/jobs/ci-emulator-tests.yml index 4532082c..1838a7d8 100644 --- a/eng/templates/jobs/ci-emulator-tests.yml +++ b/eng/templates/jobs/ci-emulator-tests.yml @@ -81,7 +81,7 @@ jobs: displayName: 'NuGet Authenticate' - bash: | # Remove the feed that doesn't match the current service connection - if [[ "${{ parameters.NuGetServiceConnection }}" == "upstream-public" ]]; then + if [[ "${{ parameters.NuGetServiceConnection }}" == "PythonWorker_PublicPackages" ]]; then # Remove internal feed for public builds sed -i '/_Internal_PublicPackages/d' nuget.config else diff --git a/eng/templates/jobs/ci-library-unit-tests.yml b/eng/templates/jobs/ci-library-unit-tests.yml index b7af256c..26e7b515 100644 --- a/eng/templates/jobs/ci-library-unit-tests.yml +++ b/eng/templates/jobs/ci-library-unit-tests.yml @@ -35,7 +35,7 @@ jobs: displayName: 'NuGet Authenticate' - bash: | # Remove the feed that doesn't match the current service connection - if [[ "${{ parameters.NuGetServiceConnection }}" == "upstream-public" ]]; then + if [[ "${{ parameters.NuGetServiceConnection }}" == "PythonWorker_PublicPackages" ]]; then # Remove internal feed for public builds sed -i '/_Internal_PublicPackages/d' nuget.config else diff --git a/eng/templates/jobs/ci-unit-tests.yml b/eng/templates/jobs/ci-unit-tests.yml index 84d8cad0..c115eade 100644 --- a/eng/templates/jobs/ci-unit-tests.yml +++ b/eng/templates/jobs/ci-unit-tests.yml @@ -84,7 +84,7 @@ jobs: displayName: 'NuGet Authenticate' - bash: | # Remove the feed that doesn't match the current service connection - if [[ "${{ parameters.NuGetServiceConnection }}" == "upstream-public" ]]; then + if [[ "${{ parameters.NuGetServiceConnection }}" == "PythonWorker_PublicPackages" ]]; then # Remove internal feed for public builds sed -i '/_Internal_PublicPackages/d' nuget.config else diff --git a/eng/templates/official/jobs/ci-e2e-tests.yml b/eng/templates/official/jobs/ci-e2e-tests.yml index c6c185b9..334f4379 100644 --- a/eng/templates/official/jobs/ci-e2e-tests.yml +++ b/eng/templates/official/jobs/ci-e2e-tests.yml @@ -93,7 +93,7 @@ jobs: displayName: 'NuGet Authenticate' - bash: | # Remove the feed that doesn't match the current service connection - if [[ "${{ parameters.NuGetServiceConnection }}" == "upstream-public" ]]; then + if [[ "${{ parameters.NuGetServiceConnection }}" == "PythonWorker_PublicPackages" ]]; then # Remove internal feed for public builds sed -i '/_Internal_PublicPackages/d' nuget.config else From ec58767f183f62307d553f2273a984c358387bbf Mon Sep 17 00:00:00 2001 From: Victoria Hall Date: Fri, 31 Jul 2026 09:32:25 -0500 Subject: [PATCH 17/17] fix misc refs --- workers/tests/test_setup.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/workers/tests/test_setup.py b/workers/tests/test_setup.py index 199f1a7c..837f8342 100644 --- a/workers/tests/test_setup.py +++ b/workers/tests/test_setup.py @@ -421,9 +421,6 @@ def webhost(c, clean=False, webhost_version=None, webhost_dir=None, create_webhost_folder(webhost_dir) version = branch_name or webhost_version extract_webhost_zip(version.replace("/", "-"), zip_path, webhost_dir) - # The webhost repo ships its own NuGet.config pointing to api.nuget.org. - # Overwrite it with the repo root config so the build uses the internal feed. - shutil.copy2(ROOT_DIR.parent / "nuget.config", webhost_dir / "NuGet.config") chmod_protobuf_generation_script(webhost_dir) compile_webhost(webhost_dir)