Skip to content

Add continueOnError option to WorkflowStep #811

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

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

Conversation

hugo-vrijswijk
Copy link

No description provided.

@hugo-vrijswijk
Copy link
Author

I bumped the tlBaseVersion because the extra param is not bincompatible. Not sure if there is a way to avoid this? I could add the default as false and only add the withContinueOnError def. But that doesn't seem very clean

Copy link
Member

@armanbilge armanbilge left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Sorry it took me a while to circle back for review.

The good news is that it is possible to make these changes bincompatibly. You can't change existing method signatures, but you can deprecate them and add new method signatures.

Sometimes, MiMa doesn't recognize internal private implementations, so you may need to add filters for those.

Comment on lines 358 to 359
renderedWorkingDirectory: String,
renderedContinueOnError: String) =
Copy link
Member

Choose a reason for hiding this comment

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

To fix bincompat, add a deprecated overload of this method with the old signature that passes an empty string to renderedContinueOnError

Comment on lines 148 to +172
timeoutMinutes: Option[Int] = None,
workingDirectory: Option[String] = None): Run =
Impl(commands, id, name, cond, env, params, timeoutMinutes, workingDirectory)
workingDirectory: Option[String] = None,
continueOnError: Boolean = false): Run =
Copy link
Member

Choose a reason for hiding this comment

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

Same thing here: unfortunately, adding a default parameter (= false) will not fix bincompat. However, adding a deprecated overload with the old signature, that passes continueOnError = false to the new overload will work.

@hugo-vrijswijk
Copy link
Author

Thanks for the PR! Sorry it took me a while to circle back for review.

The good news is that it is possible to make these changes bincompatibly. You can't change existing method signatures, but you can deprecate them and add new method signatures.

Sometimes, MiMa doesn't recognize internal private implementations, so you may need to add filters for those.

It should be all green now. I've had to remove the default parameters from the bincompatible deprecated methods, or calling it would cause confusion. I've had to add internal filters for private case classes, which worked fine.

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

Successfully merging this pull request may close these issues.

2 participants