Skip to content

Conversation

@sudo-bmitch
Copy link
Contributor

Fixes issue

Using --platform local was not detecting amd64 variants correctly.

Describe the change

The bitIsSet function was returning the wrong value, forcing nodes to v1. This also adjusts the automatic appending of the variant to only happen when short values are provided. This avoids changing linux/amd64 to linux/amd64/vx which would break existing users.

How to verify it

On an amd64 system that is at least v2:

regctl manifest get sudobmitch/demo:amd64-vx
regctl image digest sudobmitch/demo:amd64-vx --platform local

Changelog text

  • Fix: Detect amd64 variants for --platform local.

Please verify and check that the pull request fulfills the following requirements

Tests are non-trivial to write for this since it is platform detection code that would run differently on different platforms.

  • Tests have been added or not applicable
  • Documentation has been added, updated, or not applicable
  • Changes have been rebased to main
  • Multiple commits to the same code have been squashed

The `bitIsSet` function was returning the wrong value, forcing nodes to v1.
This also adjusts the automatic appending of the variant to only happen when short values are provided.
This avoids changing `linux/amd64` to `linux/amd64/vx` which would break existing users.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
@sudo-bmitch sudo-bmitch merged commit 0702d30 into regclient:main Jul 14, 2024
@sudo-bmitch sudo-bmitch deleted the pr-platform-variant-fix branch July 14, 2024 17:52
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.

1 participant