From 07287ee47a1304131e898efb659864da40eeaea2 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Thu, 9 Jan 2025 07:33:37 -0800 Subject: [PATCH 1/6] attempt to update sonarcloud scan action --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dd2e0a4a0..d6c40d961 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -203,7 +203,7 @@ jobs: if: steps.check_coverage_xml.outputs.files_exists == 'true' run: sed -i "s/\/home\/runner\/work\/schematic\/schematic\/schematic<\/source>/\/github\/workspace\/schematic<\/source>/g" coverage.xml - name: SonarCloud Scan - uses: SonarSource/sonarcloud-github-action@master + uses: SonarSource/sonarqube-scan-action@v4 if: ${{ always() }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From f5cd9ce65da30cf76247e7833abdc38e95119602 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Thu, 9 Jan 2025 13:30:48 -0800 Subject: [PATCH 2/6] temp remove change to integration test --- .github/workflows/test.yml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d6c40d961..f9c1f473b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -139,24 +139,6 @@ jobs: SERVICE_INSTANCE_ID: ${{ github.head_ref || github.ref_name }} run: > poetry run pytest --durations=0 --cov-append --cov-report=term --cov-report=html:htmlcov --cov-report=xml:coverage.xml --cov=schematic/ - -m "not (rule_benchmark or single_process_execution)" --reruns 4 -n 8 --ignore=tests/unit - - - name: Run integration tests single process - if: ${{ contains(fromJSON('["3.10"]'), matrix.python-version) }} - env: - SYNAPSE_ACCESS_TOKEN: ${{ secrets.SYNAPSE_ACCESS_TOKEN }} - SERVICE_ACCOUNT_CREDS: ${{ secrets.SERVICE_ACCOUNT_CREDS }} - OTEL_EXPORTER_OTLP_HEADERS: "Authorization=Bearer ${{ steps.retrieve-telemetry-access-token.outputs.TELEMETRY_ACCESS_TOKEN }}" - DEPLOYMENT_ENVIRONMENT: ${{ vars.DEPLOYMENT_ENVIRONMENT }} - OTEL_EXPORTER_OTLP_ENDPOINT: ${{ vars.OTEL_EXPORTER_OTLP_ENDPOINT }} - TRACING_EXPORT_FORMAT: ${{ vars.TRACING_EXPORT_FORMAT }} - LOGGING_EXPORT_FORMAT: ${{ vars.LOGGING_EXPORT_FORMAT }} - TRACING_SERVICE_NAME: ${{ vars.TRACING_SERVICE_NAME }} - LOGGING_SERVICE_NAME: ${{ vars.LOGGING_SERVICE_NAME }} - run: > - poetry run pytest --durations=0 --cov-append --cov-report=term --cov-report=html:htmlcov --cov-report=xml:coverage.xml --cov=schematic/ - -m "single_process_execution" --reruns 4 --ignore=tests/unit - - name: Upload pytest test results uses: actions/upload-artifact@v4 From 27e01457b15b961585a45a8682a7a4b849c5183f Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Fri, 10 Jan 2025 07:42:06 -0800 Subject: [PATCH 3/6] temp remove all integration tests --- .github/workflows/test.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f9c1f473b..214f7ff47 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -124,21 +124,6 @@ jobs: # run integration test suite #---------------------------------------------- - - name: Run integration tests - if: ${{ contains(fromJSON('["3.10"]'), matrix.python-version) }} - env: - SYNAPSE_ACCESS_TOKEN: ${{ secrets.SYNAPSE_ACCESS_TOKEN }} - SERVICE_ACCOUNT_CREDS: ${{ secrets.SERVICE_ACCOUNT_CREDS }} - OTEL_EXPORTER_OTLP_HEADERS: "signoz-ingestion-key=${{ secrets.TELEMETRY_API_TOKEN }}" - DEPLOYMENT_ENVIRONMENT: ${{ vars.DEPLOYMENT_ENVIRONMENT }} - OTEL_EXPORTER_OTLP_ENDPOINT: ${{ vars.OTEL_EXPORTER_OTLP_ENDPOINT }} - TRACING_EXPORT_FORMAT: ${{ vars.TRACING_EXPORT_FORMAT }} - LOGGING_EXPORT_FORMAT: ${{ vars.LOGGING_EXPORT_FORMAT }} - TRACING_SERVICE_NAME: ${{ vars.TRACING_SERVICE_NAME }} - LOGGING_SERVICE_NAME: ${{ vars.LOGGING_SERVICE_NAME }} - SERVICE_INSTANCE_ID: ${{ github.head_ref || github.ref_name }} - run: > - poetry run pytest --durations=0 --cov-append --cov-report=term --cov-report=html:htmlcov --cov-report=xml:coverage.xml --cov=schematic/ - name: Upload pytest test results uses: actions/upload-artifact@v4 From 0072ec12eeea964a8c1d2cd2e2071c5182f9c3ee Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Fri, 10 Jan 2025 08:41:23 -0800 Subject: [PATCH 4/6] update Scan version, do debug --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 214f7ff47..7053cc063 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -170,8 +170,9 @@ jobs: if: steps.check_coverage_xml.outputs.files_exists == 'true' run: sed -i "s/\/home\/runner\/work\/schematic\/schematic\/schematic<\/source>/\/github\/workspace\/schematic<\/source>/g" coverage.xml - name: SonarCloud Scan - uses: SonarSource/sonarqube-scan-action@v4 + uses: SonarSource/sonarqube-scan-action@v4.1.0 if: ${{ always() }} env: + RUNNER_DEBUG: 1 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From 8f1e67675a432b4bee3077545d0794d212283d70 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Fri, 10 Jan 2025 08:53:24 -0800 Subject: [PATCH 5/6] remove sed command --- .github/workflows/test.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7053cc063..cba108c78 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -165,10 +165,6 @@ jobs: uses: andstor/file-existence-action@v3 with: files: "coverage.xml" - # This is a workaround described in https://community.sonarsource.com/t/sonar-on-github-actions-with-python-coverage-source-issue/36057 - - name: Override Coverage Source Path for Sonar - if: steps.check_coverage_xml.outputs.files_exists == 'true' - run: sed -i "s/\/home\/runner\/work\/schematic\/schematic\/schematic<\/source>/\/github\/workspace\/schematic<\/source>/g" coverage.xml - name: SonarCloud Scan uses: SonarSource/sonarqube-scan-action@v4.1.0 if: ${{ always() }} From c5824d19c74f1d55a3bbc8dc6744fb5b685cec73 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Fri, 10 Jan 2025 09:22:39 -0800 Subject: [PATCH 6/6] add back in integration tests, remove debug param --- .github/workflows/test.yml | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cba108c78..23e3c561a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -124,6 +124,39 @@ jobs: # run integration test suite #---------------------------------------------- + - name: Run integration tests + if: ${{ contains(fromJSON('["3.10"]'), matrix.python-version) }} + env: + SYNAPSE_ACCESS_TOKEN: ${{ secrets.SYNAPSE_ACCESS_TOKEN }} + SERVICE_ACCOUNT_CREDS: ${{ secrets.SERVICE_ACCOUNT_CREDS }} + OTEL_EXPORTER_OTLP_HEADERS: "signoz-ingestion-key=${{ secrets.TELEMETRY_API_TOKEN }}" + DEPLOYMENT_ENVIRONMENT: ${{ vars.DEPLOYMENT_ENVIRONMENT }} + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ vars.OTEL_EXPORTER_OTLP_ENDPOINT }} + TRACING_EXPORT_FORMAT: ${{ vars.TRACING_EXPORT_FORMAT }} + LOGGING_EXPORT_FORMAT: ${{ vars.LOGGING_EXPORT_FORMAT }} + TRACING_SERVICE_NAME: ${{ vars.TRACING_SERVICE_NAME }} + LOGGING_SERVICE_NAME: ${{ vars.LOGGING_SERVICE_NAME }} + SERVICE_INSTANCE_ID: ${{ github.head_ref || github.ref_name }} + run: > + poetry run pytest --durations=0 --cov-append --cov-report=term --cov-report=html:htmlcov --cov-report=xml:coverage.xml --cov=schematic/ + -m "not (rule_benchmark or single_process_execution)" --reruns 4 -n 8 --ignore=tests/unit + + - name: Run integration tests single process + if: ${{ contains(fromJSON('["3.10"]'), matrix.python-version) }} + env: + SYNAPSE_ACCESS_TOKEN: ${{ secrets.SYNAPSE_ACCESS_TOKEN }} + SERVICE_ACCOUNT_CREDS: ${{ secrets.SERVICE_ACCOUNT_CREDS }} + OTEL_EXPORTER_OTLP_HEADERS: "Authorization=Bearer ${{ steps.retrieve-telemetry-access-token.outputs.TELEMETRY_ACCESS_TOKEN }}" + DEPLOYMENT_ENVIRONMENT: ${{ vars.DEPLOYMENT_ENVIRONMENT }} + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ vars.OTEL_EXPORTER_OTLP_ENDPOINT }} + TRACING_EXPORT_FORMAT: ${{ vars.TRACING_EXPORT_FORMAT }} + LOGGING_EXPORT_FORMAT: ${{ vars.LOGGING_EXPORT_FORMAT }} + TRACING_SERVICE_NAME: ${{ vars.TRACING_SERVICE_NAME }} + LOGGING_SERVICE_NAME: ${{ vars.LOGGING_SERVICE_NAME }} + run: > + poetry run pytest --durations=0 --cov-append --cov-report=term --cov-report=html:htmlcov --cov-report=xml:coverage.xml --cov=schematic/ + -m "single_process_execution" --reruns 4 --ignore=tests/unit + - name: Upload pytest test results uses: actions/upload-artifact@v4 @@ -169,6 +202,5 @@ jobs: uses: SonarSource/sonarqube-scan-action@v4.1.0 if: ${{ always() }} env: - RUNNER_DEBUG: 1 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}