openaustralia / yinyo

A wonderfully simple API driven service to reliably execute many long running scrapers in a super scaleable way
https://yinyo.io
Apache License 2.0
6 stars 1 forks source link

`make skaffold` fails on old versions of skaffold #159

Closed jamezpolley closed 4 years ago

jamezpolley commented 4 years ago

Describe the bug When running make skaffold for the first time, I'm getting the error:

Error: UPGRADE FAILED: "yinyo" has no deployed releases To Reproduce Steps to reproduce the behavior:

  1. make skaffold
  2. UPGRADE FAILED

Expected behavior If there's no existing deployed release, something else should happen instead of an upgrade

Screenshots or logs

Successfully tagged openaustralia/yinyo-scraper:v0.9-beta.2-90-g0d20ea9-dirty
Tags used in deployment:
 - openaustralia/yinyo-server -> openaustralia/yinyo-server:f642086429f899d7e96b2f1d8bf30aa3f035eb1fc9c4285af500ffc38e7c6a27
 - openaustralia/yinyo-scraper -> openaustralia/yinyo-scraper:ee9e21cc1b84c4178db1f61fd0acb46cfa8ae7877d1b43bb1c9a7be467a1feb2
   local images can't be referenced by digest. They are tagged and referenced by a unique ID instead
Starting deploy...
Error: UPGRADE FAILED: "yinyo" has no deployed releases
Cleaning up...
Error: unknown flag: --purge
Error: unknown flag: --purge
Error: unknown flag: --purge
FATA[0310] exiting dev mode because first deploy failed: deploying yinyo: exit status 1
make: *** [Makefile:44: skaffold] Error 1

Additional context

james@bully:~/src/oaf/yinyo$ helm version
version.BuildInfo{Version:"v3.1.2", GitCommit:"d878d4d45863e42fd5cff6743294a11d28a9abce", GitTreeState:"clean", GoVersion:"go1.13.8"}
james@bully:~/src/oaf/yinyo$ skaffold version
v1.0.0
james@bully:~/src/oaf/yinyo$ minikube version
minikube version: v1.8.2
commit: eb13446e786c9ef70cb0a9f85a633194e62396a1
james@bully:~/src/oaf/yinyo$ go version
go version go1.14 linux/amd64
james@bully:~/src/oaf/yinyo$ kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.3", GitCommit:"b3cbbae08ec52a7fc73d334838e18d17e8512749", GitTreeState:"clean", BuildDate:"2019-11-13T11:23:11Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.3", GitCommit:"06ad960bfd03b39c8310aaf92d1e7c12ce618213", GitTreeState:"clean", BuildDate:"2020-02-11T18:07:13Z", GoVersion:"go1.13.6", Compiler:"gc", Platform:"linux/amd64"}
mlandauer commented 4 years ago

When I have no helm releases deployed and I run skaffold I don't get this error. So, something else is probably going on.

mlandauer commented 4 years ago
Error: unknown flag: --purge

This looks suspicious to me and is not something I see.

mlandauer commented 4 years ago

@jamezpolley what version of helm do you have?

jamezpolley commented 4 years ago

3.1.2. updated context with versions of skaffold etc as well

jamezpolley commented 4 years ago
Starting deploy...
DEBU[0000] Executing template &{envTemplate 0xc00060fc00 0xc000053a40  } with environment ......
DEBU[0000] Running command: [helm --kube-context minikube get yinyo]
INFO[0000] Building helm dependencies...
DEBU[0000] Running command: [helm --kube-context minikube dep build deployments/helm/yinyo]
DEBU[0000] EnvVarMap: map[string]string{"DIGEST":"openaustralia/yinyo-server:ddc5f408fde6d5f3f38c851599ecda9b3372c1caec5619da2a0ec2c8ea89852a", "DIGEST2":"openaustralia/yinyo-scraper:50f5f2f250b5ccb916ee8efa73e94fb99e4586ba79cf69abab99280c703b5c84", "DIGEST$ALGO":"openaustralia/yinyo-server", "DIGEST_ALGO2":"openaustralia/yinyo-scraper", "DIGEST_HEX":"ddc5f408fde6d5f3f38c851599ecda9b3372c1caec5619da2a0ec2c8ea89852a", "DIGEST_HEX2":"50f5f2f250b5ccb916ee8efa73e94fb99e4586ba79cf69abab99280c703b5c84", "IMAGE_NAME"$"openaustralia/yinyo-server", "IMAGE_NAME2":"openaustralia/yinyo-scraper"}
DEBU[0000] Running command: [helm --kube-context minikube upgrade yinyo deployments/helm/yinyo -f deployments/helm/yinyo-dev-values.yaml --set image=openaustralia/yinyo-server:ddc5f408fde6d5f3f38c851599ecda9b3372c1caec5619da2a0ec2c8ea89852a --set runImage=o$enaustralia/yinyo-scraper:50f5f2f250b5ccb916ee8efa73e94fb99e4586ba79cf69abab99280c703b5c84]
Error: UPGRADE FAILED: "yinyo" has no deployed releases
DEBU[0000] Running command: [helm --kube-context minikube get yinyo]
INFO[0000] error decoding parsed yaml: yaml: line 3: mapping values are not allowed in this context
jamezpolley commented 4 years ago

DEBU[0000] Running command: [helm --kube-context minikube get yinyo]

I can't run that command:

james@bully:~/src/oaf/yinyo$ helm --kube-context minikube get yinyo

This command consists of multiple subcommands which can be used to
get extended information about the release, including:

- The values used to generate the release
- The generated manifest file
- The notes provided by the chart of the release
- The hooks associated with the release

Usage:
  helm get [command]

Available Commands:
  all         download all information for a named release

helm --kube-context minikube get all yinyo works for me.

I was able to use:

james@bully:~/src/oaf/yinyo$ helm --kube-context minikube install yinyo deployments/helm/yinyo -f deployments/helm/yinyo-dev-values.yaml --set image=openaustralia/yinyo-server:ddc5f408fde6d5f3f38c851599ecda9b3372c1caec5619da2a0ec2c8ea89852a --set runImage=o$enaustralia/yinyo-scraper:50f5f2f250b5ccb916ee8efa73e94fb99e4586ba79cf69abab99280c703b5c84

to install yinyo the first time, and now make skaffold is able to upgrade yinyo. However, this means that minion now has the same symptoms:

DEBU[0011] Running command: [helm --kube-context minikube upgrade minio --version ~5.0.17 stable/minio -f deployments/helm/minio-dev-values.yaml]
Error: UPGRADE FAILED: "minio" has no deployed releases
DEBU[0012] Running command: [helm --kube-context minikube get minio]
INFO[0012] error decoding parsed yaml: yaml: line 3: mapping values are not allowed in this context
jamezpolley commented 4 years ago
v1.0.0

Ugh. I'd updated skaffold, but my $PATH pointed at a different binary which was an older version... Clearing that out of the way means that it's now working

jamezpolley commented 4 years ago

I'm not sure if it's worth taking any action here. As soon as I'd seen the error message and realised that skaffold was issuing commands that helm didn't recognise it was clear that there was a version mismatch. The install instructions do result in a working version of skaffold being installed, unless the user has already got an old version installed in an unusual place.

mlandauer commented 4 years ago

@jamezpolley okay. In that case I think it's fair to close this issue.