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

Improve gvproxy error reporting, and improve gvproxy --version in a corner case #315

Merged
merged 3 commits into from
Feb 1, 2024

Conversation

cfergeau
Copy link
Collaborator

See the git commit logs for more details about what was done.

Some errors are currently not logged, or without much context.
This commit adds prefixes to some of these, to make it easier to
understand the codepaths which caused gvproxy to exit.

Signed-off-by: Christophe Fergeau <[email protected]>
if an annotated tag is found, the git describe string will be similar to:
v0.7.2-15-g2c897d90

When using shallow clones, the commit being built may not have an
annotated tag in its history, `git describe` will only be the
abbreviated commit hash in this case:
2c897d9

This commit tries to detect these situations, and adds a 'git' prefix to
the hash in these cases to make the version info look a bit better:

$ gvproxy --version:
gvproxy version git2c897d90

Signed-off-by: Christophe Fergeau <[email protected]>
gvproxy --version uses the `git describe` to automatically generate the
version.
actions/checkout by default creates a 1 commit checkout with no
history/no tags, which will prevent git describe from generating a
useful version.

This commit instructs actions/checkout to use full checkouts with all
tags.

Signed-off-by: Christophe Fergeau <[email protected]>
@praveenkumar
Copy link
Contributor

/lgtm
/approve

Copy link
Contributor

openshift-ci bot commented Feb 1, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfergeau, praveenkumar

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

@openshift-merge-bot openshift-merge-bot bot merged commit 493d512 into containers:main Feb 1, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants