Skip to content

Spec: use inbuild gobuildid to generate build id with -B option #4595

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

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

praveenkumar
Copy link
Member

As of now, a random build ID (20 digits) generated and added to binary but with go-1.23.x it is causing following issue in the CI

/usr/lib/golang/pkg/tool/linux_amd64/link: -B option too long (max 16 digits): 0x1c32bce09ea23923c57a3cca65fd91e377714192

Looks like gobuilid can be used to generate it with -B options without random ID hack and it can work without isssue for CI

$ readelf -n out/linux-amd64/crc

Displaying notes found in: .note.gnu.property
  Owner                Data size 	Description
  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
      Properties: x86 ISA needed: x86-64-baseline

Displaying notes found in: .note.gnu.build-id
  Owner                Data size 	Description
  GNU                  0x00000014	NT_GNU_BUILD_ID (unique build ID bitstring)
    Build ID: f1c4d1d70301bc12737353faf4ee38de3cd25930

@openshift-ci openshift-ci bot requested review from anjannath and gbraad February 4, 2025 08:10
Copy link

openshift-ci bot commented Feb 4, 2025

@praveenkumar: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/security 799e4df link false /test security

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link
Contributor

@cfergeau cfergeau left a comment

Choose a reason for hiding this comment

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

gobuildid is documented here https://pkg.go.dev/cmd/link
There's a gobuilid typo in the short log (missing 'd')
Imo, the current random ID approach does not deserve the "hack" qualifier even if it needs to be improved by this commit.

Copy link

openshift-ci bot commented Feb 4, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfergeau

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Feb 4, 2025
As of now, a random build ID (20 digits) generated and added to binary
but with go-1.23.x it is causing following issue in the CI

```
/usr/lib/golang/pkg/tool/linux_amd64/link: -B option too long (max 16 digits): 0x1c32bce09ea23923c57a3cca65fd91e377714192
```

Looks like `gobuilid` can be used to generate it with -B options without
random ID and it can work without isssue for CI

- golang/go#70380

```
$ readelf -n out/linux-amd64/crc

Displaying notes found in: .note.gnu.property
  Owner                Data size 	Description
  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
      Properties: x86 ISA needed: x86-64-baseline

Displaying notes found in: .note.gnu.build-id
  Owner                Data size 	Description
  GNU                  0x00000014	NT_GNU_BUILD_ID (unique build ID bitstring)
    Build ID: f1c4d1d70301bc12737353faf4ee38de3cd25930

```
Copy link

openshift-ci bot commented Feb 4, 2025

New changes are detected. LGTM label has been removed.

@praveenkumar praveenkumar changed the title Spec: use inbuild gobuilid to generate build id with -B option Spec: use inbuild gobuildid to generate build id with -B option Feb 4, 2025
@praveenkumar praveenkumar merged commit dbd8038 into crc-org:main Feb 4, 2025
19 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants