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

Refactor error handling #820

Merged
merged 50 commits into from
May 17, 2024
Merged

Conversation

cdavernas
Copy link
Member

@cdavernas cdavernas commented Feb 15, 2024

Many thanks for submitting your Pull Request ❤️!

Please specify parts of this PR update:

  • Specification
  • Schema
  • Examples
  • Extensions
  • Roadmap
  • Use Cases
  • Community
  • TCK
  • Other

Discussion or Issue link:

#681
#770
#771
#772
#569
#698
#731

What this PR does / why we need it:
Refactors the error handling

Closes #681
Closes #770
Closes #771
Closes #772

Additional notes for reviewers:

The PR goes well beyond the scope of the initial issue, or the first drafts we produced in past discussions.

  • Retries can now only be performed in case of handled errors. By definition, that's what a retry is

re-enter a command, especially because an error was made the first time.

-- Oxford Languages

  • Error handling can be performed at both action and state level, so retries are possible for both
  • Removed the autoRetries property which did not make sense with the new approach to retries
  • Terms such as retryableErrors/nonRetryableErrors have been removed in favor of using when/exceptWhen clause. It achieves the exact same, but looks IMHO much cleaner (and cooler).
  • Updated actions by adding the ability to throw an error thanks to the errorRef property

Signed-off-by: Charles d'Avernas <charles.davernas@neuroglia.io>
Signed-off-by: Charles d'Avernas <charles.davernas@neuroglia.io>
Signed-off-by: Charles d'Avernas <charles.davernas@neuroglia.io>
Signed-off-by: Charles d'Avernas <charles.davernas@neuroglia.io>
Signed-off-by: Charles d'Avernas <charles.davernas@neuroglia.io>
Signed-off-by: Charles d'Avernas <charles.davernas@neuroglia.io>
Signed-off-by: Charles d'Avernas <charles.davernas@neuroglia.io>
Signed-off-by: Charles d'Avernas <charles.davernas@neuroglia.io>
Signed-off-by: Charles d'Avernas <charles.davernas@neuroglia.io>
@cdavernas cdavernas added this to the v0.9 milestone Feb 15, 2024
@cdavernas cdavernas self-assigned this Feb 15, 2024
@cdavernas cdavernas added change: feature New feature or request. Impacts in a minor version change area: spec Changes in the Specification examples labels Feb 15, 2024
Copy link
Member

@JBBianchi JBBianchi left a comment

Choose a reason for hiding this comment

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

Overall, it looks great. Thanks a lot @cdavernas for this contribution !

specification.md Show resolved Hide resolved
specification.md Outdated Show resolved Hide resolved
specification.md Outdated Show resolved Hide resolved
specification.md Outdated Show resolved Hide resolved
specification.md Show resolved Hide resolved
Signed-off-by: Charles d'Avernas <charles.davernas@neuroglia.io>
Signed-off-by: Charles d'Avernas <charles.davernas@neuroglia.io>
Copy link
Member

@ricardozanini ricardozanini left a comment

Choose a reason for hiding this comment

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

Great work! I'll finish the feature review tomorrow. Today's only content structure. Many thanks, that's amazing!

schema/errors.json Outdated Show resolved Hide resolved
specification.md Show resolved Hide resolved
specification.md Show resolved Hide resolved
specification.md Outdated Show resolved Hide resolved
specification.md Outdated Show resolved Hide resolved
specification.md Outdated Show resolved Hide resolved
specification.md Outdated Show resolved Hide resolved
specification.md Outdated Show resolved Hide resolved
specification.md Outdated Show resolved Hide resolved
specification.md Outdated Show resolved Hide resolved
specification.md Outdated Show resolved Hide resolved
cdavernas and others added 3 commits March 8, 2024 11:56
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Copy link
Member

@ricardozanini ricardozanini left a comment

Choose a reason for hiding this comment

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

LGTM! Just a side note about accepting the grammar/typos suggestions.

cdavernas and others added 4 commits May 17, 2024 15:12
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
cdavernas and others added 23 commits May 17, 2024 15:14
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
@cdavernas cdavernas merged commit 6e2d402 into serverlessworkflow:main May 17, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: spec Changes in the Specification change: feature New feature or request. Impacts in a minor version change
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Refactor retries Add means to throw an error Refactor error Add multi retryRef to action
4 participants