Skip to content
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

error adding edge from "..." to "...": edge would create a cycle #6033

Open
ilya-lesikov opened this issue Apr 2, 2024 · 0 comments
Open

Comments

@ilya-lesikov
Copy link
Member

ilya-lesikov commented Apr 2, 2024

Version

1.2.296+

Issue

werf converge suddenly starts producing errors like this:

Error: error building deploy plan: error connecting internal dependencies: error adding dependency: error adding edge from "update/default::ConfigMap:mycm" to "recreate/default:batch:Job:myjob": edge would create a cycle

Reason

New deployment engine (Nelm), activated by default since v1.2.296, cannot ignore mistakes made in your charts that result in the wrong deployment order of your resources. For example, if you have a Job with helm.sh/hook: pre-upgrade that mounts a ConfigMap, but the ConfigMap is a non-hook resource, then your deployment order will be Job > ConfigMap, but it must be vice versa. In the old deployment engine the resources will still be applied in this (wrong) order, but in the new deployment engine this would create a cycle in the underlying graph.

Mitigation

These errors indicate resource ordering mistakes made in resource manifests in your chart. Fixing the order of resources in your chart is the correct solution. Just make sure, that the resource that you depend on (e.g. ConfigMap) is deployed at the same "stage" as the resource with a dependency (e.g. Job), or at an earlier stage. helm.sh/hook and helm.sh/weight or werf.io/weight annotations will help you with that.

Alternatively, you can temporarily revert back to the old engine by export WERF_NELM=0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant