Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Failing go test github.com/smallstep/cli/internal/cast on 32bit patforms #1367

Closed
wodev opened this issue Feb 22, 2025 · 5 comments · Fixed by #1368
Closed

[Bug]: Failing go test github.com/smallstep/cli/internal/cast on 32bit patforms #1367

wodev opened this issue Feb 22, 2025 · 5 comments · Fixed by #1368
Assignees
Labels
bug needs triage Waiting for discussion / prioritization by team
Milestone

Comments

@wodev
Copy link

wodev commented Feb 22, 2025

Steps to Reproduce

Build step-cli and Eexecute the go tests on linux 32 bit platforms (armhf, armv7 and x86)
The test github.com/smallstep/cli/internal/cast fails with:
cannot use math.MinInt32 - 1 (untyped int constant -2147483649) as int value in argument to cast.Int32 (overflows)

Your Environment

  • OS linux 32bit armhf , armv7, x86
  • step CLI Version -0.28.3

Expected Behavior

go test is successful on 32bit linux platforms

Actual Behavior

Failing test github.com/smallstep/cli/internal/cast_test :

github.com/smallstep/cli/internal/cast_test [github.com/smallstep/cli/internal/cast.test]
internal/cast/cast_test.go:59:40: cannot use math.MinInt32 - 1 (untyped int constant -2147483649) as int value in argument to cast.Int32 (overflows)
internal/cast/cast_test.go:63:40: cannot use math.MaxInt32 + 1 (untyped int constant 2147483648) as int value in argument to cast.Int32 (overflows)
internal/cast/cast_test.go:68:55: cannot use math.MaxUint32 (untyped int constant 4294967295) as int value in argument to cast.Uint32 (overflows)
internal/cast/cast_test.go:77:41: cannot use math.MaxUint32 + 1 (untyped int constant 4294967296) as int value in argument to cast.Uint32 (overflows)
internal/cast/cast_test.go:90:40: cannot use math.MaxUint32 + 1 (untyped int constant 4294967296) as int value in argument to cast.Uint8 (overflows)

see Build Logs:
https://gitlab.alpinelinux.org/wdev/aports/-/jobs/1740037
https://gitlab.alpinelinux.org/wdev/aports/-/jobs/1740032
https://gitlab.alpinelinux.org/wdev/aports/-/jobs/1740031

Additional Context

the new test was introduced witkh pull request #1363

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@wodev wodev added bug needs triage Waiting for discussion / prioritization by team labels Feb 22, 2025
@hslatman hslatman self-assigned this Feb 23, 2025
@hslatman hslatman reopened this Feb 24, 2025
@hslatman
Copy link
Member

hslatman commented Feb 24, 2025

The issue should be fixed with #1368.

I've reopened the issue, because it needs a new tag/release.

@wodev
Copy link
Author

wodev commented Feb 24, 2025

Thanks @hslatman , I added the patch to the alpine cli package and the test execution and package build was succesful on all platforms including the 32bit.

I think the cast_test.go class in the certificates repository has the same issue.

@hslatman
Copy link
Member

Thanks @hslatman , I added the patch to the alpine cli package and the test execution and package build was succesful on all platforms including the 32bit.

Do you need a new release, or is your copied patch sufficient?

I think the cast_test.go class in the certificates repository has the same issue.

Yeah 😅: smallstep/certificates#2190.

@wodev
Copy link
Author

wodev commented Feb 25, 2025

Do you need a new release, or is your copied patch sufficient?

The copied patch is sufficient. The version 0.28.3 is released on alpine for all architectures:
alpine packages - edge - step-cli

@hslatman hslatman added this to the v0.28.4 milestone Feb 27, 2025
@hslatman
Copy link
Member

The copied patch is sufficient. The version 0.28.3 is released on alpine for all architectures: alpine packages - edge - step-cli

Great! Thank you for maintaining those! 😄

I'll close the issue now, because the package compilation is unblocked. All should be OK in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage Waiting for discussion / prioritization by team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants