Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .cspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,12 @@ ignoreWords:
- otcorrelations
- Rubyish
words:
- LOGRECORD
- traceid
- tracestate
- loggregator
- configurator

- autocorrection

- configurator
- linkspector
- loggregator
- LOGRECORD
- SARIF
- semconv
- traceid
- tracestate
19 changes: 19 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@
"config:best-practices",
"helpers:pinGitHubActionDigestsToSemver"
],
"regexManagers": [
{
"fileMatch": ["^semantic_conventions/Rakefile$"],
"matchStrings": [
"SPEC_VERSION = '(?<currentValue>.*?)'"
],
"depNameTemplate": "open-telemetry/semantic-conventions",
"datasourceTemplate": "github-releases",
"versioningTemplate": "semver",
"extractVersionTemplate": "^v(?<version>.*)$"
}
],
Comment on lines +7 to +18
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"regexManagers": [
{
"fileMatch": ["^semantic_conventions/Rakefile$"],
"matchStrings": [
"SPEC_VERSION = '(?<currentValue>.*?)'"
],
"depNameTemplate": "open-telemetry/semantic-conventions",
"datasourceTemplate": "github-releases",
"versioningTemplate": "semver",
"extractVersionTemplate": "^v(?<version>.*)$"
}
],
"customManagers": [
{
"customType": "regex",
"description": "Update Semantic Conventions version in Rake files",
"managerFilePatterns": ["^semantic_conventions/Rakefile$"],
"matchStrings": [
"SPEC_VERSION = '(?<currentValue>.*?)'"
],
"depNameTemplate": "open-telemetry/semantic-conventions",
"datasourceTemplate": "github-releases",
"versioningTemplate": "semver",
"extractVersionTemplate": "^v(?<version>.*)$"
}
],

Copy link
Copy Markdown
Member

@robbkidd robbkidd Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After some judicious local running of renovate validate and dry-run ...

This suggestion appears to be from the deprecation warning renovate emits about regexManagers.

(This PR's current config validation output)
Digest: sha256:9dd3f426078a6ce9461c87264e4bcd1853698dc5ebb594fe5fab1f0afd25ef9b
Status: Downloaded newer image for renovate/renovate:latest
 INFO: Validating .github/renovate.json5 as global config
 WARN: Config migration necessary
       "oldConfig": {
         "$schema": "https://docs.renovatebot.com/renovate-schema.json",
         "extends": [
           "config:best-practices",
           "helpers:pinGitHubActionDigestsToSemver"
         ],
         "regexManagers": [
           {
             "fileMatch": ["^semantic_conventions/Rakefile$"],
             "matchStrings": ["SPEC_VERSION = '(?<currentValue>.*?)'"],
             "depNameTemplate": "open-telemetry/semantic-conventions",
             "datasourceTemplate": "github-releases",
             "versioningTemplate": "semver",
             "extractVersionTemplate": "^v(?<version>.*)$"
           }
         ],
         "packageRules": [
           {
             "groupName": "all patch versions",
             "matchUpdateTypes": ["patch"],
             "schedule": ["before 8am every weekday"]
           },
           {
             "matchUpdateTypes": ["minor", "major"],
             "schedule": ["before 8am on Monday"]
           },
           {
             "matchDatasources": ["github-releases"],
             "matchDepNames": ["open-telemetry/semantic-conventions"],
             "semanticCommitType": "feat",
             "semanticCommitScope": "semconv",
             "labels": ["dependencies", "semconv"]
           }
         ],
         "labels": ["dependencies"]
       },
       "newConfig": {
         "$schema": "https://docs.renovatebot.com/renovate-schema.json",
         "extends": [
           "config:best-practices",
           "helpers:pinGitHubActionDigestsToSemver"
         ],
         "customManagers": [
           {
             "customType": "regex",
             "managerFilePatterns": ["/^semantic_conventions/Rakefile$/"],
             "matchStrings": ["SPEC_VERSION = '(?<currentValue>.*?)'"],
             "depNameTemplate": "open-telemetry/semantic-conventions",
             "datasourceTemplate": "github-releases",
             "versioningTemplate": "semver",
             "extractVersionTemplate": "^v(?<version>.*)$"
           }
         ],
         "packageRules": [
           {
             "groupName": "all patch versions",
             "matchUpdateTypes": ["patch"],
             "schedule": ["before 8am every weekday"]
           },
           {
             "matchUpdateTypes": ["minor", "major"],
             "schedule": ["before 8am on Monday"]
           },
           {
             "matchDatasources": ["github-releases"],
             "matchDepNames": ["open-telemetry/semantic-conventions"],
             "semanticCommitType": "feat",
             "semanticCommitScope": "semconv",
             "labels": ["dependencies", "semconv"]
           }
         ],
         "labels": ["dependencies"]
       }
 INFO: Config validated successfully

One adjustment to @thompson-tomo's suggested changes, the regex in managerFilePatterns ought to be delimited with /es per the dep-warning's migration output. Dry-runs of the config with his changes did not work until I added those slashes.

- "managerFilePatterns": ["^semantic_conventions/Rakefile$"],
+ "managerFilePatterns": ["/^semantic_conventions/Rakefile$/"],

Why it doesn't get grumpy about the un-escaped / in the middle, I have no idea. I suppose it might just be matching first-and-last slashes because it's not doing regex substitution. ¯\_(ツ)_/¯

I'm 👍🏻 on this suggestion with the /es added to wrap the regex.

"packageRules": [
{
"groupName": "all patch versions",
Expand All @@ -13,6 +25,13 @@
{
"matchUpdateTypes": ["minor", "major"],
"schedule": ["before 8am on Monday"]
},
{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{
{
"separateMultipleMinor": true,
"separateMinorPatch": true,
"schedule": ["at any time"],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Judicious local running of renovate validate and dry-run shows me that with the /<regex>/ update above, this change would indeed open separate PRs for each minor and patch version after the current version.

… 
           "prTitle": "Update dependency open-telemetry/semantic-conventions to v1.38.0",
               "fixedVersion": "1.37.0",
               "currentVersion": "1.37.0",
               "currentValue": "1.37.0",
               "newValue": "1.38.0",
               "newVersion": "1.38.0",
           "branchName": "renovate/open-telemetry-semantic-conventions-1.39.x",
           "prTitle": "Update dependency open-telemetry/semantic-conventions to v1.39.0",
               "fixedVersion": "1.37.0",
               "currentVersion": "1.37.0",
               "currentValue": "1.37.0",
               "newValue": "1.39.0",
               "newVersion": "1.39.0",
           "branchName": "renovate/open-telemetry-semantic-conventions-1.40.x",
           "prTitle": "Update dependency open-telemetry/semantic-conventions to v1.40.0",
               "fixedVersion": "1.37.0",
               "currentVersion": "1.37.0",
               "currentValue": "1.37.0",
               "newValue": "1.40.0",
               "newVersion": "1.40.0",
… 

We'd want to base 1.39.0 on 1.38.0 (and so on), though. I'm not sure what happens when the "to v1.38.0" PR merges. Would renovate rebase the still-open PRs to the new 1.38.0 "currentVersion"?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would either rebase it automatically or it would show as out of date & we would need to click the recreate button. I suspect we could limit it to 1 via limits if we needed to.

"matchDatasources": ["github-releases"],
"matchDepNames": ["open-telemetry/semantic-conventions"],
"semanticCommitType": "feat",
"semanticCommitScope": "semconv",
"labels": ["dependencies", "semconv"]
}
],
"labels": [
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/renovate-semconv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Renovate Semantic Conventions Post-Update

on:
pull_request:
paths:
- 'semantic_conventions/Rakefile'
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
regenerate-semconv:
# Only run on Renovate PRs
if: startsWith(github.head_ref, 'renovate/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- uses: actions/checkout@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm intuiting the same intent here as before: pin an action to be consistent with how we're updating action versions with Renovate.

with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Ruby
uses: ruby/setup-ruby@v1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@dffb23f65a78bba8db45d387d5ea1bbd6be3ef18 # v1.293.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm intuiting the intent here is to pin ruby/setup-ruby to a specific version like we do with other actions in our workflows. We have Renovate set to propose updates to pinned actions, so this pin would become managed instead of riding the lightning.

with:
ruby-version: '3.3'
bundler-cache: true
working-directory: semantic_conventions

- name: Check if SPEC_VERSION changed
id: check_changes
run: |
git fetch origin ${{ github.base_ref }}
if git diff origin/${{ github.base_ref }} HEAD -- semantic_conventions/Rakefile | grep -q "SPEC_VERSION"; then
echo "changed=true" >> $GITHUB_OUTPUT
else
echo "changed=false" >> $GITHUB_OUTPUT
fi

- name: Regenerate semantic conventions
if: steps.check_changes.outputs.changed == 'true'
working-directory: semantic_conventions
run: bundle exec rake generate

- name: Commit and push changes
if: steps.check_changes.outputs.changed == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add semantic_conventions/
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "chore: regenerate semantic conventions"
git push
fi
Loading