Skip to content

gke: Generate clusterName with hashed run identifier#44547

Merged
pchaigno merged 1 commit intomainfrom
yutaro/hash-conformance-gke-cluster-name
Mar 2, 2026
Merged

gke: Generate clusterName with hashed run identifier#44547
pchaigno merged 1 commit intomainfrom
yutaro/hash-conformance-gke-cluster-name

Conversation

@YutaroHayakawa
Copy link
Copy Markdown
Member

The Cilium's cluster name cluster name must be 32 character or less. With the current naming convention, it will exceed 32 characters in certain condition (e.g when the workflow is running in the fork that has a longer name). The change we introduced in #44406 increased the risk further.

To reduce the risk of exceeding 32 characters, use sha256 hash of the run identifier part (trimmed down to the 7 character like Git short hash) for the clusterName.

Fixes: #44406

gke: Generate clusterName with hashed run identifier

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Feb 27, 2026
@YutaroHayakawa YutaroHayakawa added the release-note/misc This PR makes changes that have no direct user impact. label Feb 27, 2026
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Feb 27, 2026
@YutaroHayakawa YutaroHayakawa force-pushed the yutaro/hash-conformance-gke-cluster-name branch from 0e07d05 to 3d546f1 Compare February 27, 2026 07:14
@YutaroHayakawa YutaroHayakawa marked this pull request as ready for review February 27, 2026 07:53
@YutaroHayakawa YutaroHayakawa requested review from a team as code owners February 27, 2026 07:53
@YutaroHayakawa
Copy link
Copy Markdown
Member Author

/ci-gke

@YutaroHayakawa YutaroHayakawa force-pushed the yutaro/hash-conformance-gke-cluster-name branch from 3d546f1 to a243ed5 Compare February 27, 2026 08:00
@YutaroHayakawa YutaroHayakawa marked this pull request as draft February 27, 2026 08:02
@YutaroHayakawa
Copy link
Copy Markdown
Member Author

/ci-gke

@YutaroHayakawa YutaroHayakawa force-pushed the yutaro/hash-conformance-gke-cluster-name branch from a243ed5 to 8aaead7 Compare February 27, 2026 08:25
@YutaroHayakawa
Copy link
Copy Markdown
Member Author

/ci-gke

@YutaroHayakawa YutaroHayakawa marked this pull request as ready for review February 27, 2026 08:52
@YutaroHayakawa
Copy link
Copy Markdown
Member Author

/test

@nbusseneau
Copy link
Copy Markdown
Member

This works but I don't like the fact we can't easily recognize clusters anymore by their name. Can we find another way to make this work with the 32 char constraint while keeping some sense of what's what? 🤔

Copy link
Copy Markdown
Member

@pchaigno pchaigno left a comment

Choose a reason for hiding this comment

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

Sorry Yutaro, I didn't manage to get to this with the work event at the same time. Thanks for taking care of it!

I think I agree with Nicolas about readability. Maybe we can drop other parts? 👇

@ldelossa ldelossa removed their request for review March 2, 2026 01:24
The Cilium's cluster name cluster name must be 32 character or less.
With the current naming convention, it will exceed 32 characters in
certain condition (e.g when the workflow is running in the fork that has
a longer name). The change we introduced in #44406 increased the risk
further.

To reduce the risk of exceeding 32 characters, remove repository_owner
and UID from the clusterName. This gives the sufficient entropy to avoid
name collision.

Fixes: #44406

Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>
@YutaroHayakawa YutaroHayakawa force-pushed the yutaro/hash-conformance-gke-cluster-name branch from 8aaead7 to 2844b86 Compare March 2, 2026 18:53
@pchaigno pchaigno enabled auto-merge March 2, 2026 18:56
@pchaigno
Copy link
Copy Markdown
Member

pchaigno commented Mar 2, 2026

/test

@pchaigno pchaigno added this pull request to the merge queue Mar 2, 2026
Merged via the queue into main with commit a3b5307 Mar 2, 2026
79 checks passed
@pchaigno pchaigno deleted the yutaro/hash-conformance-gke-cluster-name branch March 2, 2026 19:32

env:
clusterName: ${{ github.repository_owner }}-${{ github.event.repository.name }}-${{ github.run_id }}-${{ inputs.UID }}-${{ github.run_attempt }}
clusterName: ${{ github.event.repository.name }}-${{ github.run_id }}-${{ github.run_attempt }}
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.

@YutaroHayakawa It looks like you removed the UID here by mistake and it just broke Conformance GKE on main. I'm sending a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/misc This PR makes changes that have no direct user impact.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants