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

Dockerfile, Makefile: make CGO_ENABLED configurable #1382

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

ykaliuta
Copy link
Contributor

@ykaliuta ykaliuta commented Nov 19, 2024

The commit
a107703 ("feat(fips): enable GO_ENABLED in build (#1001)")

enabled CGO which makes problems for builders on non-x86 platforms.

Make it as an in the Dockerfile keeping default the same (enabled),
but make it possible to override with either environment
(export CGO_ENABLED=0) or make (make CGO_ENABLED=0 image-build)

Description

How Has This Been Tested?

Screenshot or short clip

Merge criteria

  • You have read the contributors guide.
  • Commit messages are meaningful - have a clear and concise summary and detailed explanation of what was changed and why.
  • Pull Request contains a description of the solution, a link to the JIRA issue, and to any dependent or related Pull Request.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

@ykaliuta
Copy link
Contributor Author

/cc @zdtsw

@openshift-ci openshift-ci bot requested a review from zdtsw November 19, 2024 11:58
@ykaliuta
Copy link
Contributor Author

/cc @jackdelahunt

Copy link

openshift-ci bot commented Nov 19, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: asanzgom

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

@grdryn
Copy link
Member

grdryn commented Nov 19, 2024

Given that this has been enabled for a long time, and there are FIPS-related implications (not sure how much we care about those right now), I wonder if maybe it would be preferable to have a build arg for it that defaults to enabled, but can easily be set by the person building it to turn it off?

@ykaliuta
Copy link
Contributor Author

Given that this has been enabled for a long time, and there are FIPS-related implications (not sure how much we care about those right now), I wonder if maybe it would be preferable to have a build arg for it that defaults to enabled, but can easily be set by the person building it to turn it off?

I'm wondering what the implications are if it is not used in CI but for local builds only AFAIK.

@zdtsw
Copy link
Member

zdtsw commented Nov 19, 2024

Given that this has been enabled for a long time, and there are FIPS-related implications (not sure how much we care about those right now), I wonder if maybe it would be preferable to have a build arg for it that defaults to enabled, but can easily be set by the person building it to turn it off?

preferably, to add support : switch on and off with args.
but i do not have strong opinion it has to be done in that way, unless we have requirement to make ODH fips, as for downstream it is up to a different build system

@openshift-ci openshift-ci bot removed the lgtm label Nov 19, 2024
@ykaliuta ykaliuta changed the title Dockerfile: disable CGO Dockerfile, Makefile: make CGO_ENABLED configurable Nov 19, 2024
@ykaliuta
Copy link
Contributor Author

Implemented

The commit
a107703 ("feat(fips): enable GO_ENABLED in build (opendatahub-io#1001)")

enabled CGO which makes problems for builders on non-x86 platforms.

Make it as an in the Dockerfile keeping default the same (enabled),
but make it possible to override with either environment
(`export CGO_ENABLED=0`) or make (`make CGO_ENABLED=0 image-build`)

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
Copy link
Member

@grdryn grdryn left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (incubation@77b6db8). Learn more about missing BASE report.

Additional details and impacted files
@@              Coverage Diff              @@
##             incubation    #1382   +/-   ##
=============================================
  Coverage              ?   18.91%           
=============================================
  Files                 ?       30           
  Lines                 ?     3399           
  Branches              ?        0           
=============================================
  Hits                  ?      643           
  Misses                ?     2687           
  Partials              ?       69           

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


🚨 Try these New Features:

@openshift-merge-bot openshift-merge-bot bot merged commit 2d94349 into opendatahub-io:incubation Nov 19, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants