-
Notifications
You must be signed in to change notification settings - Fork 136
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
src: improved version output #1817
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lkingland 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 |
20cc425
to
6115367
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1817 +/- ##
==========================================
+ Coverage 62.52% 63.66% +1.14%
==========================================
Files 106 106
Lines 13553 13640 +87
==========================================
+ Hits 8474 8684 +210
+ Misses 4281 4134 -147
- Partials 798 822 +24
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
The Knative version is now included in version command verbose output Building an unreleased version no longer returns v0.0.0, but instead the value provided by `git describe --tags` which is the most recent tagged release with a suffix consisting of the number of commits since that release and the short hash. Verbose output now always includes the current commit on a dedicated line.
6115367
to
3ff676d
Compare
Great idea! |
e797c94
to
3ff676d
Compare
I love that now it is semver and commit id in the output for func verison -v
However, it seems
How do yo debug it? Optiont o get more output from test and/or log? |
Thanks for checking @aslom. Yes the failure message at the very end only states that the overall test suite failed, and it is a fairly long set of test cases; some of which spew quite a bit of logs. You can search for
Is that the same error you see locally? Because I am also seeing it on this PR in the GitHub Acation and that of another PR, so there may be a shared (hopefully transient) issue with the Gitlab installation step. |
Now that all tests passed OK /lgtm |
/cherry-pick release-1.10 |
@lance: #1817 failed to apply on top of branch "release-1.10":
In response to this:
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. |
The Knative version is now included in version command verbose output Building an unreleased version no longer returns v0.0.0, but instead the value provided by `git describe --tags` which is the most recent tagged release with a suffix consisting of the number of commits since that release and the short hash. Verbose output now always includes the current commit on a dedicated line.
The Knative version is now included in version command verbose output Building an unreleased version no longer returns v0.0.0, but instead the value provided by `git describe --tags` which is the most recent tagged release with a suffix consisting of the number of commits since that release and the short hash. Verbose output now always includes the current commit on a dedicated line.
The Knative version is now included in version command verbose output Building an unreleased version no longer returns v0.0.0, but instead the value provided by `git describe --tags` which is the most recent tagged release with a suffix consisting of the number of commits since that release and the short hash. Verbose output now always includes the current commit on a dedicated line. Co-authored-by: Luke Kingland <luke@lukekingland.com>
v0.0.0
Ensures that
func version
remains consistent; always returning an ascending semver of the version, with the associated knative tag being part of the verbose version information.Replaces the default v0.0.0 version tag when building from a non-tagged commit to the "human readable" form provided by "git describe". This consists of the most recently tagged version along with a suffix which consists of the number of commits which have been added since the tagged version, and the hash.
The reasoning behind this change is that we must retain the ability to release versions independently of the knative releases, while at the same time communicating which knative release to for which this version is associated. The primary version number is the version of this library, and of the binary itself. At time of this writing, that is
v0.37.0
, and is the most contectually relevant. The knative version to which this library and cli tool relates most closely isv1.10
, and is included as metadata, and printed in verbose mode.Here's how this will look in practice:
The most recent Knative version is v1.10, which was released with Functions v0.37.0. Checking out v0.37.0 correctly displays the versions:
❯ git checkout v0.37.0 && make ❯ ./func version -v Version: v0.37.0 Knative: v1.10.0 Commit: 61179d88 SocatImage: quay.io/boson/alpine-socat:1.7.4.3-r1-non-root TarImage: quay.io/boson/alpine-socat:1.7.4.3-r1-non-root
When building from an unreleased commit, such as the current Function main branch (which is 37 commits ahead of what was released as v0.37.0 in Knative 1.10:
❯ git checkout main && make ❯ ./func version -v Version: v0.37.0-77-gcabba3f9 Knative: v1.10.0 Commit: cabba3f9 SocatImage: quay.io/boson/alpine-socat:1.7.4.3-r1-non-root TarImage: quay.io/boson/alpine-socat:1.7.4.3-r1-non-root
Please note that this only applies to builds triggered with
make build
. Direct builds of the source code do not populate these values: