-
Notifications
You must be signed in to change notification settings - Fork 407
ci: verify semantic conventions generation #4769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
754f33f
3443aef
2b3762b
d670154
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -678,6 +678,39 @@ jobs: | |
| run-tests: false # Note: No test project | ||
| trigger: ${{ github.event_name }} | ||
|
|
||
| verify-semanticconventions: | ||
| name: Verify semantic conventions generation | ||
| needs: detect-changes | ||
| if: | | ||
| contains(needs.detect-changes.outputs.changes, 'semanticconventions') | ||
| || contains(needs.detect-changes.outputs.changes, 'build') | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 15 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| persist-credentials: false | ||
| show-progress: false | ||
|
|
||
| - name: Regenerate semantic conventions | ||
| shell: pwsh | ||
| run: | | ||
| Remove-Item -Recurse -Force ./src/OpenTelemetry.SemanticConventions/Attributes | ||
| New-Item -ItemType Directory ./src/OpenTelemetry.SemanticConventions/Attributes | ||
| ./src/OpenTelemetry.SemanticConventions/scripts/generate.ps1 | ||
|
|
||
| - name: Verify generated files are up to date | ||
| shell: pwsh | ||
| run: | | ||
| $generatedFiles = git status --short --untracked-files=all -- ./src/OpenTelemetry.SemanticConventions/Attributes | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like this is writing the output to the wrong place based on the file permission issues. The output path should be constructed using the absolute path with
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ihopenre-eng, you have resolved this conversatoion, but it seems to be valid. Can you look into this? |
||
| if ($generatedFiles) { | ||
| $generatedFiles | Write-Output | ||
| Write-Output "Run ./src/OpenTelemetry.SemanticConventions/scripts/generate.ps1 and commit the results." | ||
| Write-Error "Generated semantic convention files are out of date." | ||
| exit 1 | ||
| } | ||
|
|
||
| build-test-contrib-shared-tests: | ||
| needs: detect-changes | ||
| if: | | ||
|
|
@@ -785,6 +818,7 @@ jobs: | |
| build-test-sampler-aws, | ||
| build-test-semanticconventions, | ||
| test-pwsh, | ||
| verify-semanticconventions, | ||
| verify-aot-compat | ||
| ] | ||
| if: always() && !cancelled() | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| #!/usr/bin/env pwsh | ||
|
|
||
| $SCRIPT_DIR = $PSScriptRoot | ||
| $ROOT_DIR = "${SCRIPT_DIR}/../" | ||
|
|
||
|
|
||
|
martincostello marked this conversation as resolved.
|
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.