Skip to content

chore: Add CGO_ENABLED for konflux operator bundle#12962

Closed
davdhacs wants to merge 1 commit intomasterfrom
fips-cgoenabled-konflux-operator-bundle
Closed

chore: Add CGO_ENABLED for konflux operator bundle#12962
davdhacs wants to merge 1 commit intomasterfrom
fips-cgoenabled-konflux-operator-bundle

Conversation

@davdhacs
Copy link
Contributor

@davdhacs davdhacs commented Oct 9, 2024

If some go is compiled in this image, then do we also need to set CGO_ENABLED to ensure a fips compliant build?

It looks like we do not compile go in this builder stage, and only modify text. But I am not familiar with the operator bundle or why it is using the golang image for the builder stage.

If some go is compiled in this image later, then do we also need to set CGO_ENABLED to ensure a fips compliant build?
@openshift-ci
Copy link

openshift-ci bot commented Oct 9, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@davdhacs
Copy link
Contributor Author

davdhacs commented Oct 9, 2024

The golang image was used to get a newer go version to compile the operator-sdk:
#12687

At that time the GOFLAGS setting was followed with a make call which compiled the operator-sdk as a dependant:

bundle-post-process: test-bundle-helpers operator-sdk ## Post-process CSV file to include correct operator versions, etc.

Skimming over the patch-csv.py script that is run instead of the make call, I think the operator-sdk is not used now in this stage.

@msugakov
Copy link
Contributor

msugakov commented Oct 9, 2024

What happens here is that some operator/Makefile targets pull and compile Go-based cli tools like kuttl, yq or operator-sdk. These CLIs are used for generating text files (YAMLs, etc.). Only text files are included in the final stage but CLIs are discarded. Nevertheless, I don't see a reason why not compile with CGO especially if Konflux cluster at some point becomes FedRAMPed.

Let's see if Konflux CI for the operator-bundle will be green and then I'll gladly approve.

@davdhacs
Copy link
Contributor Author

davdhacs commented Oct 9, 2024

I'm sorry I modified my last comment as I thought you would not see this until tomorrow.

@davdhacs
Copy link
Contributor Author

davdhacs commented Oct 9, 2024

I proposed adding the CGO_ENABLED variable since I do not know the use of this image, but I think after looking at it more that the build layer does not need golang anymore and is all python.

@msugakov
Copy link
Contributor

msugakov commented Oct 9, 2024

No-no, there is some Go compilation, otherwise I would not have to fight with build errors and add ENV GOFLAGS=''. In fact, Tom should know precisely what's used since he had to enable prefetch for these builds #12651

@davdhacs
Copy link
Contributor Author

davdhacs commented Oct 9, 2024

Apologies that I parachuted in here. If there is compilation, then I'll confirm the tests pass and pursue getting this merged.

@codecov
Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.14%. Comparing base (53c5f2b) to head (21f4cbd).
Report is 43 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12962      +/-   ##
==========================================
- Coverage   48.14%   48.14%   -0.01%     
==========================================
  Files        2446     2446              
  Lines      176070   176070              
==========================================
- Hits        84776    84774       -2     
- Misses      84467    84469       +2     
  Partials     6827     6827              
Flag Coverage Δ
go-unit-tests 48.14% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@davdhacs
Copy link
Contributor Author

davdhacs commented Oct 9, 2024

I'll try this again after days have passed. It looks like there are unrelated problems in konflux.

@davdhacs davdhacs closed this Oct 15, 2024
@davdhacs davdhacs deleted the fips-cgoenabled-konflux-operator-bundle branch September 10, 2025 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants