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

only set CGO_ENABLED=0 for tests #12535

Merged
merged 1 commit into from
Feb 1, 2017
Merged

Conversation

jim-minter
Copy link
Contributor

#11044 accidentally caused the openshift binary to be built with CGO_ENABLED=0 if it had not been built by the time test/extended/core.sh was run. The openshift binary cannot run correctly with CGO_ENABLED=0 as cgo is used by kubelet.

This change centralises the setting of CGO_ENABLED to hack/common.sh for all .test executables.

I believe that this setting is wanted so that delve can be used against these executables.

@jim-minter
Copy link
Contributor Author

@smarterclayton @stevekuznetsov @liggitt @marun as you were in the conversation on #11044

@bparees
Copy link
Contributor

bparees commented Jan 18, 2017

defer to @smarterclayton and @stevekuznetsov

@smarterclayton
Copy link
Contributor

Looks fine to me [test]

@jim-minter
Copy link
Contributor Author

flake #12558
[test]

@openshift-bot
Copy link
Contributor

Evaluated for origin testextended up to 50b0236

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/testextended FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin_extended/1002/) (Base Commit: d981aa6) (Extended Tests: all)

@jim-minter
Copy link
Contributor Author

jim-minter commented Jan 20, 2017

flakes #12362 #12499 #12500 #12501

@jim-minter
Copy link
Contributor Author

[test]

@jim-minter
Copy link
Contributor Author

@smarterclayton please merge if happy

@@ -9,7 +9,9 @@ host_platform="$(os::build::host_platform)"
# Set build tags for these binaries
readonly OS_GOFLAGS_TAGS="include_gcs include_oss"
readonly OS_GOFLAGS_TAGS_LINUX_PPC64LE="gssapi"
readonly OS_GOFLAGS_TAGS_TEST_LINUX_PPC64LE=""
Copy link
Contributor

Choose a reason for hiding this comment

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

You shouldn't have to do this - empty strings = no-op

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 4a9fef7

@smarterclayton
Copy link
Contributor

LGTM [merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 4a9fef7

@openshift-bot
Copy link
Contributor

openshift-bot commented Feb 1, 2017

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/13480/) (Base Commit: 92ce2c9) (Image: devenv-rhel7_5832)

@@ -213,6 +211,7 @@ os::build::internal::build_binaries() {
fi

local platform_gotags_envvar=OS_GOFLAGS_TAGS_$(echo ${platform} | tr '[:lower:]/' '[:upper:]_')
local platform_gotags_test_envvar=OS_GOFLAGS_TAGS_TEST_$(echo ${platform} | tr '[:lower:]/' '[:upper:]_')
Copy link
Contributor

@stevekuznetsov stevekuznetsov Feb 1, 2017

Choose a reason for hiding this comment

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

Why was this change necessary? It looks like it's going to break anyone who was using OS_GOFLAGS_TAGS_<platform> to pass to test builds

edit: s/OS_GOFLAGS_TAGS/OS_GOFLAGS_TAGS_<platform>/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't believe it does break that. The change stops automatically setting the gssapi tag, which is incompatible with CGO_ENABLED=0.

Copy link
Contributor

Choose a reason for hiding this comment

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

If I were passing the platform-specific OS_GOFLAGS_TAGS_LINUX today, that would get used in the build of tests. You've changed that so I need to pass OS_GOFLAGS_TAGS_TEST_LINUX for that. This is a breaking change. I'm not sure we have a good way to identify if someone downstream will be broken by such a change.

Copy link
Contributor

Choose a reason for hiding this comment

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

@liggitt is the main potential impact with gssapi

In general test tags should be explicit - if we need gssapi in integration, we need to call that out (which means it would fail on Macs, which it doesn't).

Copy link
Contributor

Choose a reason for hiding this comment

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

gssapi is only for the kubectl build. We have an extended test that will break shortly if this broke something

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/13477/) (Base Commit: 92ce2c9)

@openshift-bot openshift-bot merged commit 2d9d6e5 into openshift:master Feb 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants