idea: CLI update option
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 11.5k
- Forks
- 1.4k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 53
Description
Rather than needing to run curl -sL https://run.linkerd.io/install | sh to get a new version of the CLI, it would be nice if the CLI provided a mechanism for updating itself (e.g. linkerd cli-update).
A naive implementation would just be to wrap curl -sL https://run.linkerd.io/install | sh into something like linkerd cli-update. That might be a suitable first step. Some things to consider:
- Following semver, any minor version updates within the same major version should be backwards compatible and safe for the end user. Major version updates, if any, should potentially have a confirmation from the end user before proceeding. It's not clear if this is a use case that needs considered for the foreseeable future.
- By default, running
curl -sL https://run.linkerd.io/install | shinstalls the linkerd CLI to$HOME/.linkerd2/bin. However, the end user may have moved the CLI to a different location, so at minimum acli-updatecommand should verify$HOME/.linkerd2/binexists before proceeding. If it doesn't exist, it's probably best not to "update" a new version there. Maybe the update logic should attempt to locate wherelinkerdis at (which linkerd?), or prompt the user to provide a location? - Anything else?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the proposed linkerd cli-update entry point and the existing curl -sL https://run.linkerd.io/install | sh installer flow. Clarify version-update behavior, confirmation for major releases, and how to handle $HOME/.linkerd2/bin or the path returned by which linkerd; done means the CLI can safely update itself without overwriting an unknown location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100