-
Notifications
You must be signed in to change notification settings - Fork 118
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
Add the new commit count and git hash to the version #2038
Add the new commit count and git hash to the version #2038
Conversation
This helps diagnose bugs in versions of Zebra built from git branches, rather than git version tags.
79bd2fb
to
c4b1860
Compare
impl From<Network> for &'static str { | ||
fn from(network: Network) -> &'static str { | ||
(&network).into() | ||
} | ||
} |
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.
👍
// strip the leading "v", if present | ||
if &vergen_git_semver[0..1] == "v" { |
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.
lol, this is such a funny convention variance, depending on where published
("branch", option_env!("VERGEN_GIT_BRANCH").map(Into::into)), | ||
("git commit", Self::git_commit().map(Into::into)), |
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.
👍
@@ -233,7 +289,7 @@ impl Application for ZebradApp { | |||
let guard = sentry::init( | |||
sentry::ClientOptions { | |||
debug: true, | |||
release: Self::git_commit().map(Into::into), | |||
release: Some(app_version().to_string().into()), |
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.
👍
I want to squash this one to get rid of the tiny commits and buggy commits. |
Motivation
When someone is running on a git branch, sometimes it's hard to tell which version they branched off.
Solution
Add the following info to the
version
in the panic, ticket template, and sentry report metadata:The code in this pull request has:
Manual Test Output
Cause a port/database conflict panic:
Review
This useful debugging feature can be reviewed by anyone at any time.
Related Issues
Adds commits to PR #2037
Follow Up Work
Use the target triple even if there is no
.git
directory, needs rustyhorde/vergen#64