Skip to content

Conversation

Ximinhan
Copy link
Member

@Ximinhan Ximinhan commented Aug 12, 2025

CGO_ENABLED should be enabled, the dpu-operator builds in 4.20 can't be released because it failed the go FIPS check, all images in ocp should meet go compliance check.
the failed job is(not sure you can access): https://konflux-ui.apps.kflux-ocp-p01.7ayg.p1.openshiftapps.com/ns/ocp-art-tenant/applications/fbc-openshift-4-20/pipelineruns/fbc-ose-4-20-dpu-operator-jpl4b
dpu-operator-container,/manager,go binary is not CGO_ENABLED

I asked in the slack thread https://redhat-internal.slack.com/archives/CB95J6R4N/p1754988189100909, since I am not the member of this repo, If owner know better how to adjuest it feel free to close this pr.

@openshift-ci openshift-ci bot requested review from m-naught and vrindle August 12, 2025 10:29
@@ -14,7 +14,7 @@ COPY . .

# Due to https://github.com/golang/go/issues/70329 cross-compilation hangs at times.
# As a temporary workaround, we can try specifying GOMAXPROCS=2 to relieve this issue
RUN GOMAXPROCS=2 CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} make build-manager
RUN GOMAXPROCS=2 CGO_ENABLED=1 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} make build-manager
Copy link
Contributor

@thom311 thom311 Aug 12, 2025

Choose a reason for hiding this comment

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

Could you please explain in the commit message why "[it] should be enabled"?

Also, please summarize in one sentence what this environment variable does and what CGO is.

It would also be interesting, why we currently have CGO_ENABLED=0, and what now changed so we enable it. But the git history is not clear about that, so we might not know. If you know, please elaborate. If you don't know, say "I don't know why it was CGO_ENABLED=0 from the beginning. We shouldn' do that anymore.".

Please explain why things are done!

Copy link
Contributor

Choose a reason for hiding this comment

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

well, you said "to meet go compliance".

Please elaborate on what that means. And do so in the commit message.

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks, description updated

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

why we currently have CGO_ENABLED=0, and what now changed so we enable it.
This should be found earlier once FIPS is enabled, somehow it didn't find until now, this means this may need backport to lower releases(4.16-4.19).

Copy link
Contributor

Choose a reason for hiding this comment

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

Might as well do it for all docker files. The pattern is the same for all of them.

@swtaylor
Copy link
Contributor

/test make-e2e-test
Previous CI run failed due to an external issue, so retesting.

@bn222
Copy link
Contributor

bn222 commented Aug 17, 2025

/retest

@bn222
Copy link
Contributor

bn222 commented Aug 22, 2025

/test make-e2e-test

/lgtm
/approve

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 22, 2025
@bn222
Copy link
Contributor

bn222 commented Aug 22, 2025

@Ximinhan can you update all dockerfiles?

1 similar comment
@bn222
Copy link
Contributor

bn222 commented Aug 27, 2025

@Ximinhan can you update all dockerfiles?

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 10, 2025
@Ximinhan Ximinhan changed the title enable CGO to meet go compliance enable CGO to meet go compliance for dpu-operator dpu-intel-ipu-vsp and dpu-daemon Sep 10, 2025
@bn222
Copy link
Contributor

bn222 commented Sep 10, 2025

/lgtm
/approve
/verified bypass

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Sep 10, 2025
@openshift-ci-robot
Copy link

@bn222: The verified label has been added.

In response to this:

/lgtm
/approve
/verified bypass

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 10, 2025
Copy link

openshift-ci bot commented Sep 10, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bn222, Ximinhan

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

@Ximinhan
Copy link
Member Author

/retest

@Ximinhan
Copy link
Member Author

/test make-test

@thom311
Copy link
Contributor

thom311 commented Sep 10, 2025

/retest

Copy link

openshift-ci bot commented Sep 10, 2025

@Ximinhan: all tests passed!

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.

@openshift-merge-bot openshift-merge-bot bot merged commit 4d48adb into openshift:main Sep 10, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants