helmfile: [BUG] needs dependency graph is broken

With helmfile v0.139.9 it seems that the needs dependencies behaviour is broken.

With the following example:

- name: amazing-app-test-1
  chart: my-repo/amazing-app
  version: 2.0.14
  installed: true
  timeout: 300
  needs:
  - devops/amazing-app-test-3
  values: []
- name: amazing-app-test-2
  chart: my-repo/amazing-app
  version: 2.0.14
  installed: true
  timeout: 300
  needs:
  - devops/amazing-app-test-1
  values: []
- name: amazing-app-test-3
  chart: my-repo/amazing-app
  version: 2.0.14
  installed: true
  timeout: 300
  needs: []
  values: []

Previous behaviour - v0.138.4 (correct):

Upgrading release=amazing-app-test-3, chart=my-repo/amazing-app
Release "amazing-app-test-3" does not exist. Installing it now.
NAME: amazing-app-test-3
LAST DEPLOYED: Mon Jun 14 10:55:29 2021
NAMESPACE: devops
STATUS: deployed
REVISION: 1
TEST SUITE: None

Listing releases matching ^amazing-app-test-3$
amazing-app-test-3	devops   	1       	2021-06-14 10:55:29.884771 +0300 IDT	deployed	amazing-app-2.0.14	1.0

Upgrading release=amazing-app-test-1, chart=my-repo/amazing-app
Release "amazing-app-test-1" does not exist. Installing it now.
NAME: amazing-app-test-1
LAST DEPLOYED: Mon Jun 14 10:56:28 2021
NAMESPACE: devops
STATUS: deployed
REVISION: 1
TEST SUITE: None

Listing releases matching ^amazing-app-test-1$
amazing-app-test-1	devops   	1       	2021-06-14 10:56:28.275669 +0300 IDT	deployed	amazing-app-2.0.14	1.0

Upgrading release=amazing-app-test-2, chart=my-repo/amazing-app
Release "amazing-app-test-2" does not exist. Installing it now.
NAME: amazing-app-test-2
LAST DEPLOYED: Mon Jun 14 10:57:09 2021
NAMESPACE: devops
STATUS: deployed
REVISION: 1
TEST SUITE: None

Listing releases matching ^amazing-app-test-2$
amazing-app-test-2	devops   	1       	2021-06-14 10:57:09.207185 +0300 IDT	deployed	amazing-app-2.0.14	1.0

New behaviour - v0.139.9 (incorrect - releases 1 & 2 are installed in parallel):

Upgrading release=amazing-app-test-3, chart=my-repo/amazing-app
Release "amazing-app-test-3" does not exist. Installing it now.
NAME: amazing-app-test-3
LAST DEPLOYED: Mon Jun 14 11:01:38 2021
NAMESPACE: devops
STATUS: deployed
REVISION: 1
TEST SUITE: None

Listing releases matching ^amazing-app-test-3$
amazing-app-test-3	devops   	1       	2021-06-14 11:01:38.096974 +0300 IDT	deployed	amazing-app-2.0.14	1.0

Upgrading release=amazing-app-test-2, chart=my-repo/amazing-app
Upgrading release=amazing-app-test-1, chart=my-repo/amazing-app
Release "amazing-app-test-1" does not exist. Installing it now.
NAME: amazing-app-test-1
LAST DEPLOYED: Mon Jun 14 11:02:16 2021
NAMESPACE: devops
STATUS: deployed
REVISION: 1
TEST SUITE: None

Listing releases matching ^amazing-app-test-1$
Release "amazing-app-test-2" does not exist. Installing it now.
NAME: amazing-app-test-2
LAST DEPLOYED: Mon Jun 14 11:02:16 2021
NAMESPACE: devops
STATUS: deployed
REVISION: 1
TEST SUITE: None

Listing releases matching ^amazing-app-test-2$
amazing-app-test-1	devops   	1       	2021-06-14 11:02:16.553073 +0300 IDT	deployed	amazing-app-2.0.14	1.0

amazing-app-test-2	devops   	1       	2021-06-14 11:02:16.419325 +0300 IDT	deployed	amazing-app-2.0.14	1.0

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 5
  • Comments: 26 (10 by maintainers)

Most upvoted comments

yep, I’ve got a pretty simple test set up on my end, and needs does nothing right now.

@dm3ch Ah that’s a good point! Maybe we should enable --include-needs by default, rather than enabling --skip-needs?

If anyone could submit a feature to change the default, like I’ve done for --skip-needs in https://github.com/roboll/helmfile/pull/1835, I would gladly review it.

Running into this as well.