Add a `dapr update` command to update the CLI itself
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
The issue does not name implementation files or tests. Start by locating the CLI command definitions and existing install or release handling; then map the platform-specific binary replacement and checksum paths described here. Done means dapr update handles stable and specified versions, leaves package manager installs alone, verifies downloads, and reports the stated failure cases; the author says an implementation is already ready and plans a PR.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the feature
Add a dapr update command that updates the Dapr CLI itself, on Linux, macOS and Windows. Today users have to look up the install script URL (or remember which package manager they used) to update the CLI. Many other CLIs provide a single self-update command.
Proposed behavior
dapr updateupdates the CLI to the latest stable release.dapr update --version <version>installs a specific version (including release candidates and downgrades). A partial version like1.18orlatestis rejected up front.- Package manager installs are left alone. If the CLI was installed with Homebrew or the Windows MSI/winget, the command doesn't touch the binary and prints the right command instead, for example
brew upgrade dapr/tap/dapr-cliorwinget upgrade Dapr.CLI(winget install Dapr.CLI.Preview --version Xfor RCs). - The latest stable version comes from
https://github.com/dapr/cli/releases.atom, skippingrctags, which is the same sourceinstall.shuses. There's no GitHub API rate limit.releases/latestisn't used, because releases are published as pre-releases and promoted by hand, so it lags behind. - Downloads are verified against the published
.sha256file before anything is replaced. - The binary is replaced safely:
- The new binary is written next to the current one, then moved into place with an atomic rename on Linux/macOS.
- On Windows the running
dapr.exeis renamed aside first, with a rollback if the swap fails. - If anything fails, the existing binary is left untouched.
- Clear errors:
- Offline or airgapped machines get a clear error.
- A non-writable install directory (for example
/usr/local/bin) suggestssudo dapr updateor an elevated shell. - A version that doesn't exist gets a "not found for /" error.
Out of scope
- No background "new version available" check, and no caching. The CLI only contacts the network when
dapr updateruns. This is deliberately simpler than #1059. - Runtime binaries are not updated. Only the CLI binary changes; nothing installed by
dapr initis touched.
Related
- #1059: proposal to check for CLI and runtime updates while other commands run
- #1454: CLI install script release source
I have an implementation ready, with unit tests and a smoke test against the real GitHub releases, and will open a PR referencing this issue.
Release Note
RELEASE NOTE: ADD dapr update command to update the Dapr CLI to the latest stable or a specific version.
- Lingua principale
- Go
- Stelle
- 354
- Fork
- 221
- Merge medio
- 4g 13h
- PR unite (30g)
- 11
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di dapr/cli
-
dapr init: option to run Sentry in self-hosted modeForse di nuovo libera @ayushsarode l’ha presa 127 giorni fa e non c’è nessuna pull request aperta. Apertagood first issue kind/proposal
Difficoltà 5/5 Più di una settimana Idoneità per principianti 42/100
I maintainer di solito rispondono entro 1 giorno
-
Minimalist `dapr init`, ideally as the defaultForse di nuovo libera @alicejgibbons l’ha presa 278 giorni fa e non c’è nessuna pull request aperta. Apertagood first issue kind/proposal
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Docs (Automation) - Dapr CLIForse di nuovo libera @mikeee l’ha presa 586 giorni fa e non c’è nessuna pull request aperta. ApertaP1 pinned
dapr/cli#1507 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Update the CLI install script release sourceForse di nuovo libera @mikeee l’ha presa 760 giorni fa e non c’è nessuna pull request aperta. Apertakind/bug pinned
dapr/cli#1454 · 8 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
dapr run -k -f ... doesn't seem to support valueFrom for referencing secretsForse di nuovo libera @siri-varma l’ha presa 811 giorni fa e non c’è nessuna pull request aperta. Apertaarea/cli good first issue help wanted kind/enhancement P1 size/S triaged/resolved
dapr/cli#1393 · 1 commento · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 61/100
I maintainer di solito rispondono entro 1 giorno
-
stage-fail
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
siyuan-note/bazaar#2405 ·
I maintainer di solito rispondono entro 1 giorno
-
bug priority: high workstream:cache
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
rossoctl/context-guru#707 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
prime-radiant-inc/evener#5028 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno