From 26a54d3c0f5557f649d82fbabfefb97aee2b4830 Mon Sep 17 00:00:00 2001 From: Timothy Pansino <11214426+TimPansino@users.noreply.github.com> Date: Thu, 18 Jul 2024 15:16:30 -0700 Subject: [PATCH] Fix Python Failures (#74) * Use docker build instead of minikube to fix incorrect exit status on failure * Fix bug in grabbing specific release --- .github/workflows/test.yml | 12 +++++++----- src/python/download_wheels.py | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5eafbe2..872d701 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -68,15 +68,17 @@ jobs: - name: Build init container run: | BUILD_ARGS=${{ inputs.INITCONTAINER_BUILD_ARGS }} - if [[ -n "${BUILD_ARGS}" ]]; then BUILD_ARGS="--build-opt=build-arg=${BUILD_ARGS}"; fi - if [[ -n "${{ env.AGENT_VERSION }}" ]]; then BUILD_ARGS="${BUILD_ARGS:-} --build-opt=build-arg=AGENT_VERSION=${{ env.AGENT_VERSION }}"; fi - minikube image build -t e2e/newrelic-${{ inputs.INITCONTAINER_LANGUAGE }}-init:e2e src/${{ inputs.INITCONTAINER_LANGUAGE }}/ ${BUILD_ARGS} + if [[ -n "${BUILD_ARGS}" ]]; then BUILD_ARGS="--build-arg=${BUILD_ARGS}"; fi + if [[ -n "${{ env.AGENT_VERSION }}" ]]; then BUILD_ARGS="${BUILD_ARGS:-} --build-arg=AGENT_VERSION=${{ env.AGENT_VERSION }}"; fi + eval "$(minikube docker-env)" + docker build -t e2e/newrelic-${{ inputs.INITCONTAINER_LANGUAGE }}-init:e2e src/${{ inputs.INITCONTAINER_LANGUAGE }}/ ${BUILD_ARGS} - name: Build test app container run: | BUILD_ARGS=${{ inputs.TEST_APP_BUILD_ARGS }} - if [[ -n "${BUILD_ARGS}" ]]; then BUILD_ARGS="--build-opt=build-arg=${BUILD_ARGS}"; fi - minikube image build -t e2e/test-app-${{ inputs.INITCONTAINER_LANGUAGE }}:e2e tests/${{ inputs.INITCONTAINER_LANGUAGE }}/ ${BUILD_ARGS} + if [[ -n "${BUILD_ARGS}" ]]; then BUILD_ARGS="--build-arg=${BUILD_ARGS}"; fi + eval "$(minikube docker-env)" + docker build -t e2e/test-app-${{ inputs.INITCONTAINER_LANGUAGE }}:e2e tests/${{ inputs.INITCONTAINER_LANGUAGE }}/ ${BUILD_ARGS} - name: Run e2e-test uses: newrelic/newrelic-integration-e2e-action@a97ced80a4841c8c6261d1f9dca6706b1d89acb1 # 1.11.0 diff --git a/src/python/download_wheels.py b/src/python/download_wheels.py index f34be4d..dc97dbf 100644 --- a/src/python/download_wheels.py +++ b/src/python/download_wheels.py @@ -50,6 +50,7 @@ def main(): if AGENT_VERSION: # Grab the supplied release version + releases = {release["version"]: release for release in releases} release = releases[AGENT_VERSION] else: # Grab latest release version