You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to an error on my end, there was no .git folder in my build environment which means the git env vars could not be populated correctly. However, the value of each git environment value was VERGEN_IDEMPOTENT_OUTPUT which is very unexpected and cost me a lot of time troubleshooting in the wrong direction. Ideally, these should be filled with another value to indicate the error.
I understand that the .quiet() call and lack of .fail_on_error() make this error harder to spot, but I still think the current behavior is very weird.
The text was updated successfully, but these errors were encountered:
This behavior is intentional. As a build tool, I don't want vergen to block your build if something has failed internally, unless specifically configured. So by default vergen will populate with those values unless you turn on fail_on_error. With quiet off, you would get warnings that those values had been replaced. I recommend developing with fail_on_error turned on and quiet off. When you reach a stable state, flip them off.
I understand that it is intentional to fill in some value rather than fail by default, but this issue is to report that it should be a different value that indicates that the value is filled in because of an error, not because the value is not idempotent. It doesn't make sense for VERGEN_GIT_SHA to ever be VERGEN_IDEMPOTENT_OUTPUT because the value should always be stable.
I also find the behavior not helpful. We use VERGEN_GIT_SHA to compute a version string. If we build from a tarball, with .git being absent, we get a string like 1.8.1-VERGEN_IDEMPOTENT_OUTPUT+sequoia-openpgp-1.19.0.
In previous versions of vergen, the environment variable was simply absent. I think I'll try to go back to this behavior by opting in to the errors, and ignoring them.
I am using the following configuration:
Due to an error on my end, there was no
.git
folder in my build environment which means the git env vars could not be populated correctly. However, the value of each git environment value wasVERGEN_IDEMPOTENT_OUTPUT
which is very unexpected and cost me a lot of time troubleshooting in the wrong direction. Ideally, these should be filled with another value to indicate the error.I understand that the
.quiet()
call and lack of.fail_on_error()
make this error harder to spot, but I still think the current behavior is very weird.The text was updated successfully, but these errors were encountered: