devspace-sh / devspace

DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
https://devspace.sh
Apache License 2.0
4.31k stars 361 forks source link

devspace hook event: ["devCommand:after:deploy"] stopped working after upg to v6 #2279

Open slazak opened 2 years ago

slazak commented 2 years ago

What happened? I've upgraded devspace from v5 to v6 and hook event: ["devCommand:after:deploy"] stopped working (do not trigger)

What did you expect to happen instead? That hooks are still working similar to the v5 devspace version as defined in the yaml file.

How can we reproduce the bug? (as minimally and precisely as possible)

  1. Prepare devspace.yaml with deployments
  2. Add hook event: ["devCommand:after:deploy"]
  3. Run: devspace dev

My devspace.yaml:

version: v1beta11
...
deployments:
- name: app-kalendarium-ui
  helm:
    componentChart: true
    ...
...
hooks:
- command: "kubectl"
  args: ["port-forward", "pod/mongo-mongodb-replicaset-0", "27018:27017"]
  background: true
  events: ["devCommand:after:deploy"]

Local Environment:

Anything else we need to know? Was working in v5 version

/kind bug

FabianKramm commented 2 years ago

@slazak thanks for creating this issue! The hook was removed in v6, and we recommend to use the after:deploy event instead. Would that work for you?

slazak commented 2 years ago

I use "devCommand:before:execute" and it works as well in my case. It would be good to update v6 docs with the hooks that were removed. Thanks