diff --git a/.github/workflows/run-lib-injection.yml b/.github/workflows/run-lib-injection.yml index 1a7819cb1d..97a1ea8b63 100644 --- a/.github/workflows/run-lib-injection.yml +++ b/.github/workflows/run-lib-injection.yml @@ -22,6 +22,7 @@ jobs: runs-on: ubuntu-latest outputs: matrix: ${{ steps.compute-matrix.outputs.matrix }} + matrix_not_supported: ${{ steps.compute-matrix.outputs.matrix_not_supported }} init_image: ${{ steps.compute-matrix.outputs.init_image }} steps: - name: Compute matrix @@ -41,6 +42,17 @@ jobs: "python": ["dd-lib-python-init-test-django", "dd-lib-python-init-test-django-gunicorn", "dd-lib-python-init-test-django-uvicorn"], "ruby": ["dd-lib-ruby-init-test-rails", "dd-lib-ruby-init-test-rails-explicit", "dd-lib-ruby-init-test-rails-gemsrb"] } + #Lang version not supported for these weblogs + not_supported_weblogs={ + "cpp": [], + "dotnet": [], + "golang": [], + "java": ["jdk7-app"], + "nodejs": [], + "php": [], + "python": [], + "ruby": [] + } init_images={ "cpp": [], "dotnet": ["gcr.io/datadoghq/dd-lib-dotnet-init:latest","ghcr.io/datadog/dd-trace-dotnet/dd-lib-dotnet-init:latest_snapshot"], @@ -52,14 +64,17 @@ jobs: "ruby": ["gcr.io/datadoghq/dd-lib-ruby-init:latest","ghcr.io/datadog/dd-trace-rb/dd-lib-ruby-init:latest_snapshot"], } result = weblogs["${{ inputs.library }}"] + result_not_supported = not_supported_weblogs["${{ inputs.library }}"] result_init_image = init_images["${{ inputs.library }}"] with open(os.environ['GITHUB_OUTPUT'], 'a') as fh: print(f'matrix={json.dumps(result)}', file=fh) print(f'init_image={json.dumps(result_init_image)}', file=fh) + print(f'matrix_not_supported={json.dumps(result_not_supported)}', file=fh) print(json.dumps(result, indent=2)) print(json.dumps(result_init_image, indent=2)) + print(json.dumps(result_not_supported, indent=2)) lib-injection-init-image-validator: if: inputs.library == 'dotnet' || inputs.library == 'java' || inputs.library == 'python' || inputs.library == 'ruby' || inputs.library == 'nodejs' @@ -72,8 +87,12 @@ jobs: - compute-matrix strategy: matrix: - weblog: ${{ fromJson(needs.compute-matrix.outputs.matrix) }} - lib_init_image: ${{ fromJson(needs.compute-matrix.outputs.init_image) }} + - weblog: ${{ fromJson(needs.compute-matrix.outputs.matrix) }} + lib_init_image: ${{ fromJson(needs.compute-matrix.outputs.init_image) }} + lang_suported: "true" + - weblog: ${{ fromJson(needs.compute-matrix.outputs.matrix_not_supported) }} + lib_init_image: ${{ fromJson(needs.compute-matrix.outputs.init_image) }} + lang_suported: "false" fail-fast: false env: TEST_LIBRARY: ${{ inputs.library }} @@ -99,15 +118,23 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build weblog init image validator + if: matrix.lang_suported == 'true' run: lib-injection/build/build_lib_injection_weblog.sh -w ${{ matrix.weblog }} -l ${{ inputs.library }} - name: Install runner uses: ./.github/actions/install_runner - name: Perform lib injection + if: matrix.lang_suported == 'true' run: | echo "Testing lib injection init image: $LIB_INIT_IMAGE" - ./run.sh LIB_INJECTION_VALIDATION + ./run.sh LIB_INJECTION_VALIDATION + + - name: Perform lib injection for not supported lang + if: matrix.lang_suported == 'false' + run: | + echo "Testing lib injection init image: $LIB_INIT_IMAGE" + echo "Weblog: ${{ matrix.weblog }}" - name: Compress logs id: compress_logs diff --git a/utils/_context/containers.py b/utils/_context/containers.py index 8ae4c70bc0..dfc0667a07 100644 --- a/utils/_context/containers.py +++ b/utils/_context/containers.py @@ -817,7 +817,7 @@ def _lib_init_image(self, lib_init_image): } if "dd-lib-dotnet-init" in lib_init_image: self.kwargs["volumes"] = { - _VOLUME_INJECTOR_NAME: {"bind": " /datadog-init/monitoring-home/", "mode": "rw"}, + _VOLUME_INJECTOR_NAME: {"bind": "/datadog-init/monitoring-home", "mode": "rw"}, } def remove(self):