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

feat(runtime): fail without retries on ConnectorInputException #3844

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ztefanie
Copy link

Description

Set retries to zero, when ConnectorInputException is thrown.

Related issues

closes #3806

Checklist

  • PR has a milestone or the no milestone label.

@ztefanie ztefanie added this to the 8.7.0-alpha4 milestone Jan 13, 2025
@ztefanie ztefanie requested a review from a team as a code owner January 13, 2025 12:53
@ztefanie ztefanie requested a review from johnBgood January 13, 2025 12:53
if (ex instanceof ConnectorException connectorException) {
errorCode = connectorException.getErrorCode();
Throwable cause = connectorException.getCause();
if (cause instanceof ConnectorInputException) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe check if ex instanceof ConnectorInputException because currently your test might if I replace jobHandler by :

     var jobHandler =
          newConnectorJobHandler(
              context -> {
                throw new ConnectorInputException(
                    "expected Connector Input Exception", new RuntimeException("cause"));
              });

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is because one can create the exception using new ConnectorInputException.. or using the builder, and it will lead to different exceptions.

Copy link
Author

Choose a reason for hiding this comment

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

Good point 👍 Thanks for mentioning and explaining. I adjusted it and added it to the tests.

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.

ConnectorInputException should lead to a failed job without retries (technical error)
2 participants