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

Move "-s -w" flags to GOLDFLAGS as an overridable default. #76651

Merged

Conversation

dims
Copy link
Member

@dims dims commented Apr 16, 2019

Co-Authored-By: @Chenditang chendt.fnst@cn.fujitsu.com

If GOLDFLAGS is set, whether it is empty or not, we should honor it.
Only if the GOLDFLAGS is totally not set, then we use "-s -w"

See Parameter Expansion section in the urls below:

https://stackoverflow.com/questions/3601515/how-to-check-if-a-variable-is-set-in-bash/16753536
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02

Change-Id: I826c34efc63c77f0e3e9677fff30a3eb2219a377

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
GOLDFLAGS can be specified when compiling, so it is better to set "-s -w" as the overridable default value of GOLDFLAGS.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note-none Denotes a PR that doesn't merit a release note. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 16, 2019
@dims
Copy link
Member Author

dims commented Apr 16, 2019

Following up from the comments in https://github.com/kubernetes/kubernetes/pull/70276/files#r232376981

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 16, 2019
@dims
Copy link
Member Author

dims commented Apr 16, 2019

/assign @ixdy @cblecker

@dims
Copy link
Member Author

dims commented Apr 16, 2019

seems to work?

[dims@dims-mac 09:54] ~/go/src/k8s.io/kubernetes ⟩ env | grep GOLDFLAGS
[dims@dims-mac 09:54] ~/go/src/k8s.io/kubernetes ⟩ echo $GOLDFLAGS

[dims@dims-mac 09:54] ~/go/src/k8s.io/kubernetes ⟩ echo ${GOLDFLAGS="-s -w"}
-s -w
[dims@dims-mac 09:54] ~/go/src/k8s.io/kubernetes ⟩ export GOLDFLAGS=
[dims@dims-mac 09:55] ~/go/src/k8s.io/kubernetes ⟩ echo ${GOLDFLAGS="-s -w"}

[dims@dims-mac 09:55] ~/go/src/k8s.io/kubernetes ⟩ export GOLDFLAGS="-a -b"
[dims@dims-mac 09:55] ~/go/src/k8s.io/kubernetes ⟩ echo ${GOLDFLAGS="-s -w"}
-a -b

@dims
Copy link
Member Author

dims commented Apr 16, 2019

/priority important-soon
/sig release
/hold

( holding for review by @ixdy / @cblecker )

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. sig/release Categorizes an issue or PR as relevant to SIG Release. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Apr 16, 2019
@dims dims force-pushed the move-goldflags-to-an-overrideable-default branch 2 times, most recently from 8561ef0 to 1ece630 Compare April 16, 2019 16:28
If GOLDFLAGS is set, whether it is empty or not, we should honor it.
Only if the GOLDFLAGS is totally not set, then we use "-s -w"

See Parameter Expansion section in the urls below:

https://stackoverflow.com/questions/3601515/how-to-check-if-a-variable-is-set-in-bash/16753536
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02

Change-Id: I826c34efc63c77f0e3e9677fff30a3eb2219a377
@dims dims force-pushed the move-goldflags-to-an-overrideable-default branch from 1ece630 to 7e01702 Compare April 18, 2019 01:55
@BenTheElder
Copy link
Member

/retest

@dims
Copy link
Member Author

dims commented Apr 18, 2019

/test pull-kubernetes-e2e-gce-device-plugin-gpu

Copy link
Member

@BenTheElder BenTheElder left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve
/hold

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 18, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenTheElder, dims

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

@BenTheElder
Copy link
Member

@dims if you want to wait for them go ahead, AFAICT this change is good, otherwise feel free to /hold cancel :-)

@dims
Copy link
Member Author

dims commented Apr 18, 2019

/hold cancel

thanks! @BenTheElder

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 18, 2019
@k8s-ci-robot k8s-ci-robot merged commit 7115257 into kubernetes:master Apr 18, 2019
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/release Categorizes an issue or PR as relevant to SIG Release. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants