Repository navigation
Add base36/63-sha224 helper - #4159
Merged
Merged
Conversation
Signed-off-by: Nelo-T. Wallus <red.brush9525@fastmail.com> Signed-off-by: Nelo-T. Wallus <n.wallus@sap.com>
Signed-off-by: Nelo-T. Wallus <red.brush9525@fastmail.com> Signed-off-by: Nelo-T. Wallus <n.wallus@sap.com>
ntnn
force-pushed
the
base36-62-sha224
branch
3 times, most recently
from
May 27, 2026 08:41
e409f67 to
3c35188
Compare
Signed-off-by: Nelo-T. Wallus <red.brush9525@fastmail.com> Signed-off-by: Nelo-T. Wallus <n.wallus@sap.com>
Signed-off-by: Nelo-T. Wallus <red.brush9525@fastmail.com> Signed-off-by: Nelo-T. Wallus <n.wallus@sap.com>
Signed-off-by: Nelo-T. Wallus <red.brush9525@fastmail.com> Signed-off-by: Nelo-T. Wallus <n.wallus@sap.com>
Contributor
|
LGTM label has been added. DetailsGit tree hash: 888405df1a4eee0ce707999449e4d5a10f75836a |
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mjudeikis The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Member
Author
|
/retest unrelated: |
1 task
Member
Author
|
/retest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is adjacent to #3498.
TL;DR:
pkg/cryptotoapimachinery/.../pkg/util/cryptoWhy? To have one
kcpcryptoWhy there? Because the helpers added are used in staging repos as well and this mirrors upstreams apimachinery
pkg/util/<pkg>baseX{,sha224}helpers tokcpcryptoWhy?
math/big.IntWhy? For consistency.
Prose:
Shards names are stored hashed on the Workspace in an annotation
internal.tenancy.kcp.io/shard, presumably to not intentionally leak shard names to users.For migrations we need to provide a library function for operators utilizing the migration primitive to check which shard an LC currently is in and which shard to migrate to.
We currently have many different places where base36, base36sha224 is implemented in different ways, sometimes using the base36 library, sometimes via
math/big.Int.Since these are all roughly the same shape I consolidated them into a tested package.
Most of the callsites are just ephemeral.
These are not:
written to the internal.tenancy.kcp.io/shard annotation on Workspace objects
used as the LogicalCluster name (ws.Spec.Cluster); a durable workspace identifier
HomeClusterName becomes the actual logical cluster name for the user's home workspace
produces Kubernetes label keys/values written onto API resources
But all of these produce equivalent output so existing installations are unaffected, this is verified by the commit adding stable hashing/encoding unit tests. To show that the behaviour did not change this commit was PR'd separately here: #4158
What Type of PR Is This?
/kind chore
Related Issue(s)
Fixes #
Release Notes