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

Ensure sequential task errors result in termination of all tasks #866

Merged
merged 1 commit into from
Jun 11, 2019

Conversation

errordeveloper
Copy link
Contributor

@errordeveloper errordeveloper commented Jun 11, 2019

Description

This is a follow-up from #865.

This is problematic as it results in confusing output message:

[✖]  waiting for CloudFormation stack "eksctl-beautiful-sheepdog-1560245255-cluster" to reach "CREATE_COMPLETE" status: ResourceNotReady: failed waiting for successful resource state
[✖]  invalid cluster config: missing CertificateAuthorityData
[✖]  failed to create cluster "beautiful-sheepdog-1560245255"

The missing CertificateAuthorityData is very misleading.

Checklist

  • Code compiles correctly (i.e make build)
  • Added tests that cover your change (if possible)
  • All unit tests passing (i.e. make test)
  • All integration tests passing (i.e. make integration-test)

This is problematic as it results in confusing output message:

[✖]  waiting for CloudFormation stack "eksctl-beautiful-sheepdog-1560245255-cluster" to reach "CREATE_COMPLETE" status: ResourceNotReady: failed waiting for successful resource state
[✖]  invalid cluster config: missing CertificateAuthorityData
[✖]  failed to create cluster "beautiful-sheepdog-1560245255"

The `missing CertificateAuthorityData` is very misleading.
@errordeveloper errordeveloper force-pushed the sequential-task-errors branch from 9b15ede to 6a9b7f7 Compare June 11, 2019 10:32
desc := task.Describe()
logger.Debug("started task: %s", desc)
errs := make(chan error)
if err := task.Do(errs); err != nil {
allErrs <- err
return
return false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not return an error instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because errors are handled via the channel already and we don't need to worry about the content as it's already take care of by the other mechanism, so this is just a hint, and boolean is easier to check.

@errordeveloper errordeveloper merged commit 06a0f71 into master Jun 11, 2019
@errordeveloper errordeveloper deleted the sequential-task-errors branch June 11, 2019 11:53
torredil pushed a commit to torredil/eksctl that referenced this pull request May 20, 2022
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

Successfully merging this pull request may close these issues.

2 participants