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

Add version subcommand #94

Closed
invidian opened this issue May 4, 2020 · 0 comments · Fixed by #251
Closed

Add version subcommand #94

invidian opened this issue May 4, 2020 · 0 comments · Fixed by #251
Labels
priority/backlog Higher priority than priority/awaiting-more-evidence. size/S estimate of the amount of work to address the issue

Comments

@invidian
Copy link
Contributor

invidian commented May 4, 2020

With tink binary, it should be possible to check version of both CLI tool and ideally server, similar to kubectl version functionality, as currently, there is no way to reference which version of the binary is in use when reporting the issues.

@thebsdbox thebsdbox added fix-required priority/backlog Higher priority than priority/awaiting-more-evidence. size/S estimate of the amount of work to address the issue labels Jul 21, 2020
@displague displague mentioned this issue Aug 15, 2020
3 tasks
@mergify mergify bot closed this as completed in #251 Aug 19, 2020
mergify bot added a commit that referenced this issue Aug 19, 2020
## Description

* Fixes testing via Makefile `make test` (did not test anything before)
* Fixes #94 based on the git SHA and eventual git tags (blocked by #74)
  * Adds `tink-cli --version` output
  * Because `tink-server` and `tink-worker` do not currently take parameters, the version is now emitted at start.
    * `tink-server` emits this at INFO level (because it is a long-lived process)
    * `tink-worker` emits this at DEBUG level (because the default run is quiet, afaict)
* Adds a `tink-cli completion` subcommand

<!--- Please describe what this PR is going to change -->

## Why is this needed

<!--- Link to issue you have raised -->

Fixes: #94

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

* `tink-cli completion --help`
* `tink-cli completion bash`
* ```
   cmd/tink-cli/tink-cli --version
   tink version f9500b2
   ```
* ```
   PACKET_VERSION="x" PACKET_ENV="t" ROLLBAR_TOKEN="t" cmd/tink-server/tink-server 
   {"level":"info","ts":1597460174.581983,"caller":"tink-server/main.go:30","msg":"starting version f9500b2","service":"github.com/tinkerbell/tink"}
   {"level":"info","ts":1597460174.582356,"caller":"metrics/metrics.go:58","msg":"initializing label values","service":"github.com/tinkerbell/tink"}
   ```
* ```
   TINKERBELL_CERT_URL="l" PACKET_VERSION="x" PACKET_ENV="t" ROLLBAR_TOKEN="t" WORKER_LOG_LEVEL=debug cmd/tink-worker/tink-worker
   DEBU[0000] Starting version f9500b2                     
   INFO[0000] RETRY_INTERVAL not set. Using default, 3 seconds 
   INFO[0000] MAX_RETRY not set. Using default, 3 retries. 
   FATA[0000] fetch cert: Get "l": unsupported protocol scheme ""
   ```

## How are existing users impacted? What migration steps/scripts do we need?

<!--- Fixes a bug, unblocks installation, removes a component of the stack etc -->
<!--- Requires a DB migration script, etc. -->


## Checklist:

I have:

- [ ] updated the documentation and/or roadmap (if required)
- [ ] added unit or e2e tests
- [ ] provided instructions on how to upgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/backlog Higher priority than priority/awaiting-more-evidence. size/S estimate of the amount of work to address the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants