Closed rm3l closed 1 year ago
Name | Link |
---|---|
Latest commit | 3c06ce04d59a1181135f27084db0fef8cb66d5bf |
Latest deploy log | https://app.netlify.com/sites/odo-docusaurus-preview/deploys/64f88aebdf7b170008df0474 |
In CI, we can see that the working tree has local changes, which is weird to me. I'm looking into this..
[odo] __
[odo] / \__ Initializing a new component
[odo] \__/ \
[odo] / \__/ odo version: v3.14.0 (6721c668b-dirty)
[odo] \__/
[odo]
[odo] • Downloading devfile "go:latest" ...
[odo] I0906 09:05:22.048551 11880 registry.go:5
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
In CI, we can see that the working tree has local changes, which is weird to me. I'm looking into this..
[odo] __ [odo] / \__ Initializing a new component [odo] \__/ \ [odo] / \__/ odo version: v3.14.0 (6721c668b-dirty) [odo] \__/ [odo] [odo] • Downloading devfile "go:latest" ... [odo] I0906 09:05:22.048551 11880 registry.go:5
Ok, the problem is that after cloning odo in CI, we are copying the local repo of odo to a temporary directory before running the tests. For the repo in the temporary directory not to be marked as dirty, the Git index needs to be refreshed (either manually or using other Git commands that can auto-refresh it), but that should not be an issue for the doc automation tests here. 3c06ce0
(#7074) just ignores the Git commit ID when comparing the outputs.
/hold cancel
What type of PR is this: /kind task
What does this PR do / why we need it: To help with troubleshooting, this PR appends the Git commit ID next to the
odo
version in the output of commands where the version is shown. This currently includes:odo version
odo init
odo dev
odo deploy
Furthermore, the Git commit ID displayed is enriched with the current state of the working tree, like
-dirty
if the working tree has local changes. This will help quickly understand the version and help troubleshoot commands that run in CI for example.Example:
Which issue(s) this PR fixes: Fixes #6131
PR acceptance criteria:
[ ] Unit test
[x] Integration test
[ ] Documentation
How to test changes / Special notes to the reviewer: