Skip to content

Conversation

@xDarksome
Copy link
Member

@xDarksome xDarksome commented Nov 13, 2025

Description

there is a mismatch in short sha length between workflows

How Has This Been Tested?

Manually

Due Diligence

  • Breaking change
  • Requires a documentation update
  • Requires a e2e/integration test update

Copilot AI review requested due to automatic review settings November 13, 2025 16:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a mismatch in short commit hash generation between GitHub workflows by standardizing the approach to use git rev-parse --short HEAD instead of bash substring extraction.

Key Changes:

  • Replaced bash substring extraction (${SHA::8}) with the native Git short hash command (git rev-parse --short HEAD)
  • Removed the unused full SHA variable, keeping only SHA_SHORT
  • Aligned the hash generation method with the pattern already used in release-package.yaml

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

SHA="$(git rev-parse HEAD)"
echo "SHA=$SHA" >> $GITHUB_ENV
echo "SHA_SHORT=${SHA::8}" >> $GITHUB_ENV
SHA_SHORT="$(git rev-parse --short HEAD)"
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

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

The --short flag without a specific length can produce variable-length hashes (typically 7 characters, but can increase if needed for uniqueness). For consistency between workflows, consider using --short=7 or --short=8 to ensure a fixed length. This is especially important since release-package.yaml references Docker images tagged with this SHA_SHORT value.

Example:

SHA_SHORT="$(git rev-parse --short=7 HEAD)"

This would ensure both workflows always use the same hash length.

Suggested change
SHA_SHORT="$(git rev-parse --short HEAD)"
SHA_SHORT="$(git rev-parse --short=7 HEAD)"

Copilot uses AI. Check for mistakes.
@xDarksome xDarksome merged commit e56652b into main Nov 13, 2025
23 of 24 checks passed
@xDarksome xDarksome deleted the fix/ci-short-hash-length branch November 13, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants