From 4e81c53838a1a90ca3520497e10a7dfc9f8e6b04 Mon Sep 17 00:00:00 2001 From: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com> Date: Fri, 13 Sep 2024 10:15:35 +0200 Subject: [PATCH] Remove checks for now Will be done in a follow up https://github.com/open-telemetry/opentelemetry-dotnet-contrib/issues/2068 --- .github/workflows/semconv-validation.yml | 28 --------------------- build/scripts/check-semconv-versions.ps1 | 31 ------------------------ 2 files changed, 59 deletions(-) delete mode 100644 .github/workflows/semconv-validation.yml delete mode 100644 build/scripts/check-semconv-versions.ps1 diff --git a/.github/workflows/semconv-validation.yml b/.github/workflows/semconv-validation.yml deleted file mode 100644 index 1fd2859baa..0000000000 --- a/.github/workflows/semconv-validation.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Semantic Conventions - validate - -on: - pull_request: - paths: - - "src/OpenTelemetry.SemanticConventions/**" - -jobs: - run-semconv-checks: - runs-on: ubuntu-latest - - steps: - - name: check out code - uses: actions/checkout@v4 - - - name: Check script versions - shell: pwsh - run: ./build/scripts/check-semconv-versions.ps1 - - - name: Generate semantic conventions - shell: pwsh - run: | - ./src/OpenTelemetry.SemanticConventions/scripts/generate.ps1 - - - name: Verify no changes - working-directory: ./src/OpenTelemetry.SemanticConventions - run: | - git diff --exit-code '.' || (echo 'Manual changes to Semantic Convention attributes are not allowed. Please re-generate the files and commit.' && exit 1) diff --git a/build/scripts/check-semconv-versions.ps1 b/build/scripts/check-semconv-versions.ps1 deleted file mode 100644 index 4a566dd198..0000000000 --- a/build/scripts/check-semconv-versions.ps1 +++ /dev/null @@ -1,31 +0,0 @@ - -$rootDirectory = Get-Location - -$PowerShellScript = "$($rootDirectory)\src\OpenTelemetry.SemanticConventions\scripts\generate.ps1" -$BashScript = "$($rootDirectory)\src\OpenTelemetry.SemanticConventions\scripts\generate.sh" - -# PS semconv version -$PsSemConvVersion = Select-String -Path $PowerShellScript -Pattern '\$SEMCONV_VERSION="([^"]+)"' | ForEach-Object { $_.Matches.Groups[1].Value } -# PS weaver version -$PsWeaverVersion = Select-String -Path $PowerShellScript -Pattern '\$GENERATOR_VERSION="([^"]+)"' | ForEach-Object { $_.Matches.Groups[1].Value } - -# Bash semconv version -$BashSemConvVersion = Select-String -Path $BashScript -Pattern 'SEMCONV_VERSION="([^"]+)"' | ForEach-Object { $_.Matches.Groups[1].Value } -# Bash weaver version -$BashWeaverVersion = Select-String -Path $BashScript -Pattern 'GENERATOR_VERSION="([^"]+)"' | ForEach-Object { $_.Matches.Groups[1].Value } - -# Check if the semconv versions match -if ($PsSemConvVersion -ne $BashSemConvVersion) { - Write-Host "Semantic Convention version mismatch detected!" - Write-Host "PowerShell version: $PsSemConvVersion" - Write-Host "Bash version: $BashSemConvVersion" - exit 1 -} - -# Check if the weaver versions match -if ($PsWeaverVersion -ne $BashWeaverVersion) { - Write-Host "Weaver version mismatch detected!" - Write-Host "PowerShell version: $PsWeaverVersion" - Write-Host "Bash version: $BashWeaverVersion" - exit 1 -} \ No newline at end of file