-
Notifications
You must be signed in to change notification settings - Fork 374
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
First install of krew 0.4.0 sets it to the detached index #630
Comments
Here are a couple things I could think of:
@ahmetb @corneliusweig do you guys have any suggestions? |
What if we got rid of the notion that there's a Our pre-multiindex behavior was also that "upgrade" doesn't succeed if there are such plugins, and developers must remove them to get rid of those errors. |
Ah ok I thought that upgrade would work for manifest plugins pre-multiindex. How did krew used to detect that a plugin was installed with a manifest before? I thought that was new with the modification to receipts. If the behavior before was that upgrading manifest plugins failed then I think its fine to remove |
It didn't. :) Try out for yourself if you want.
|
Hmm maybe I'm misunderstanding. I was thinking the workflow is:
I tried simulating these steps by picking a random krew-index plugin and installing an older version (I installed score 1.8.0 and its at 1.8.1 in krew-index now):
|
First of all, I find the Of the suggested options, I think changing the installation instructions gives us the least headache. It works for the old and the new The only downside I see is that users will have to download the krew tarball twice. To reduce that pain, we can instead seek to reduce the tarball size. For example, produce separate archives for each platform. However, download size should not matter too much anyway, because it's a one-time thing. This should work (tested only in bash/zsh): diff --git site/content/docs/user-guide/setup/install.md site/content/docs/user-guide/setup/install.md
index d51e962..0217dcc 100644
--- site/content/docs/user-guide/setup/install.md
+++ site/content/docs/user-guide/setup/install.md
@@ -22,11 +22,10 @@ Krew self-hosts).
```sh
(
set -x; cd "$(mktemp -d)" &&
- curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/krew.{tar.gz,yaml}" &&
+ curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/krew.tar.gz
tar zxvf krew.tar.gz &&
KREW=./krew-"$(uname | tr '[:upper:]' '[:lower:]')_amd64" &&
- "$KREW" install --manifest=krew.yaml --archive=krew.tar.gz &&
- "$KREW" update
+ "$KREW" install krew
)
```
@@ -49,11 +48,10 @@ Krew self-hosts).
```fish
begin
set -x; set temp_dir (mktemp -d); cd "$temp_dir" &&
- curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/krew.{tar.gz,yaml}" &&
+ curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/krew.tar.gz &&
tar zxvf krew.tar.gz &&
set KREWNAME krew-(uname | tr '[:upper:]' '[:lower:]')_amd64 &&
- ./$KREWNAME install \
- --manifest=krew.yaml --archive=krew.tar.gz &&
+ ./$KREWNAME install krew &&
set -e KREWNAME; set -e temp_dir
end
```
@@ -72,14 +70,12 @@ Krew self-hosts).
## Windows {#windows}
1. Make sure `git` is installed on your system.
-1. Download `krew.exe` and `krew.yaml` from the [Releases][releases] page to
- a directory.
+1. Download `krew.exe` from the [Releases][releases] page to a directory.
1. Launch a command-line window (`cmd.exe`) and navigate to that directory.
-1. Run the following command to install krew (pass the correct
- paths to `krew.yaml` and `krew.zip` below):
+1. Run the following command to install krew:
```sh
- krew install --manifest=krew.yaml
+ krew install krew
```
1. Add `%USERPROFILE%\.krew\bin` directory to your `PATH` environment variable |
Yeah, I believe the only reason we used My initial feeling is: let's apply that patch as it solves this problem However, I feel like we're making a potentially offline installation process not-so-offline anymore. For example, you could previously download+install Similarly, what if an operator installs |
This should still be ok though right? Also, the docs should probably mention something about krew not being able to upgrade itself when the default index is changed though. |
I think warning about a detached
Well it's still possible to install Once we have that and update the docs, we can start another attempt to release v0.4.0, right? |
I don't think we need to update the docs for this particular caveat of "detached" krew. We already changed Install docs to say "krew install krew", so I think we can go tag a release again right away. |
Now that the multi-index changes are in, when a user follows these instructions and runs:
the installation of krew will have the "detached" index in its receipt because it is being installed via manifest. This will prevent them from receiving krew upgrades in the future.
/area multi-index
The text was updated successfully, but these errors were encountered: