Skip to content

Bug: Create_ChangeLog_GitHub_PR assumes HEAD is the built commit, causing missed changelog PR if new commits exist before deploy #25

@johlju

Description

@johlju

Bug description

The Create_ChangeLog_GitHub_PR task incorrectly assumes that the HEAD commit on the deploy branch (e.g., main) is the commit that was built and released. In reality, additional commits can be pushed to the branch before a full release is deployed, so HEAD may no longer be the commit that was actually built and tagged for release.

Impact

  • If a commit is pushed to the main (or default) branch before a full release is successfully deployed, the Create_ChangeLog_GitHub_PR task will complete with the message:

    No Release Tag found to update the ChangeLog from in ''
    
  • Since the task does not find a tag on HEAD, it never sends a changelog PR to switch the Unreleased section in CHANGELOG.md to the actual released version.

  • This means the changelog is never updated for the release that was made, leading to stale or inaccurate release notes.

Example output

Build Create_ChangeLog_GitHub_PR /home/vsts/work/1/s/build.ps1
...
git rev-parse origin/main
git tag -l --points-at ba02d4fb20e76dc002c2cd61a6c850799c9c25cc
No Release Tag found to update the ChangeLog from in ''
Done /Create_ChangeLog_GitHub_PR 00:00:00.6301577

Relation to other issues

  • This bug is related to gaelcolas/Sampler#538 which describes broader problems with tagging and traceability in the release pipeline.

Root cause

  • The task checks for tags only on HEAD, not on the actual commit that was built and released. When HEAD has advanced, the release tag is not found, and the changelog update is missed.

Expected behavior

  • The changelog PR should always be created after a release, even if new commits have been pushed to the branch before deploy.
  • The task should identify the correct released commit (not just HEAD) and update the changelog accordingly.

Steps to reproduce

  1. Make a commit (A) to the main branch and trigger a release pipeline.
  2. Before the release pipeline completes, push another commit (B) to main.
  3. Observe that the Create_ChangeLog_GitHub_PR task does not update the changelog for the released version.

Suggested fix

  • Capture and store the actual built commit SHA at the start of the pipeline, and use it to determine which commit to check for tags and update the changelog.
  • Do not assume HEAD will always be the correct commit for tagging or changelog updates.

Related issue: #538

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions