Closed alex-harvey-z3q closed 9 months ago
This adds some code to print a clearer error message similar to Terraform's when a cyclical dependency is detected in the graph.
Before this change an error message would look like:
Dependency cycle detected: configmap-lambda eks-securitygroups
After this change it becomes:
Dependency cycle detected: eks-securitygroups -> configmap-lambda, configmap-lambda -> eks-securitygroups
An example of a Terraform error message would be:
Error: Cycle: aws_scheduler_schedule.gh_runners_ubuntu_stop, aws_iam_role.gh_runners_ubuntu_scheduler_role, aws_scheduler_schedule.gh_runners_ubuntu_start
And for comparison see this related section of the source code for Terraform: https://github.com/hashicorp/terraform/blob/268c8e264d22604f2a4ec516ed4df7a5bdef421f/internal/dag/dag.go#L117-L148
[Resolve #issue-number]
poetry run tox
poetry run pre-commit run --all-files
Guide to writing a good commit
This adds some code to print a clearer error message similar to Terraform's when a cyclical dependency is detected in the graph.
Before this change an error message would look like:
After this change it becomes:
An example of a Terraform error message would be:
And for comparison see this related section of the source code for Terraform: https://github.com/hashicorp/terraform/blob/268c8e264d22604f2a4ec516ed4df7a5bdef421f/internal/dag/dag.go#L117-L148
PR Checklist
[Resolve #issue-number]
.poetry run tox
) are passing.poetry run pre-commit run --all-files
).Approver/Reviewer Checklist
Other Information
Guide to writing a good commit