Skip to content

[chore][workflow/changelog] Fix comparisons to main#2309

Merged
lmolkova merged 1 commit intoopen-telemetry:mainfrom
crobert-1:fix_changelog_workflow
May 29, 2025
Merged

[chore][workflow/changelog] Fix comparisons to main#2309
lmolkova merged 1 commit intoopen-telemetry:mainfrom
crobert-1:fix_changelog_workflow

Conversation

@crobert-1
Copy link
Copy Markdown
Member

Changes

Changelog checks are failing on a recent PR with an error saying no changelog file has been added. The PR however has added a changelog file.

The error is occurring because the changelog workflow is comparing the PR's branch against origin/main directly. When a branch is not up to date with main, as is the case with the referenced PR, files added to main that aren't in the PR's branch show up as renamed in git, rather than new files. The check then fails because no new files were detected.

The solution here is to compare the PR's branch to the best common ancestor (git merge-base) with origin/main. This takes into account the branch being out of date and properly detects new files.

Note that this change is simply being copied over from opentelemetry-collector and opentelemetry-collector-contrib

Merge requirement checklist

Copy link
Copy Markdown
Member

@trask trask left a comment

Choose a reason for hiding this comment

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

thanks!

@github-project-automation github-project-automation Bot moved this from Untriaged to Needs More Approval in Semantic Conventions Triage May 29, 2025
@lmolkova lmolkova added this pull request to the merge queue May 29, 2025
Merged via the queue into open-telemetry:main with commit 28c92e2 May 29, 2025
13 checks passed
jherbage pushed a commit to jherbage/semantic-conventions that referenced this pull request Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants