-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Improve kustomize version output #4630
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: KnVerey 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 |
/hold on verifying release behaviour will be correct |
@KnVerey: This PR has multiple commits, and the default merge method is: merge. 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/test-infra repository. |
316cd16
to
1089b67
Compare
c604e48
to
3c91cf7
Compare
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
b54821f
to
6d64657
Compare
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
6d64657
to
cca7bfa
Compare
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
switch setting.Key { | ||
case "vcs.revision": | ||
p.GitCommit = setting.Value | ||
case "vcs.modified": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We never had this before and it wasn't working properly in the release, so 🔥 for now
case "false": | ||
p.GitTreeState = "clean" | ||
} | ||
case "vcs.time": // TODO: This is the commit time, not the build time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 this change as well. The build date used by kubectl really is the build date, not the commit date. I think it comes from here, ultimately: https://github.com/kubernetes/kubernetes/blob/f33ddd1b9c1f53ca9bb7dd8a55c7e15ced1292a8/hack/lib/version.sh#L168
@@ -100,9 +100,6 @@ builds: | |||
|
|||
ldflags: > | |||
-s | |||
-X sigs.k8s.io/kustomize/api/provenance.version={{.Version}} | |||
-X sigs.k8s.io/kustomize/api/provenance.gitCommit={{.Commit}} | |||
-X sigs.k8s.io/kustomize/api/provenance.buildDate={{.Date}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We at least do need to keep the date flag. Based on the notes I left on this PR, it seems possible the others always work from the BuildInfo source, in which case we can keep them deleted (but we need to confirm). Perhaps we can add any that we're keeping to the Makefile so that local builds are more sane anyway.
Closing in favour of #5000 |
kubectl version
offers, when available from BuildInfo: goVersion, gitTreeState🚨 TODO: verify that the information will really be correct on a tagged commit, and in the goreleaser context. Most of the information isn't populated in tests: golang/go#33976. Everything looks good on
make kustomize
(which doesgo install
), but the version is(devel)
so not good confirmation.Local build before
Local build after