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: return result when calling workflow explicitly #2601

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

metacosm
Copy link
Collaborator

Signed-off-by: Chris Laprun [email protected]

@metacosm metacosm self-assigned this Nov 20, 2024
@metacosm metacosm requested review from csviri and xstefank November 20, 2024 17:14

import io.javaoperatorsdk.operator.api.reconciler.dependent.DependentResource;

@SuppressWarnings("rawtypes")
public class WorkflowCleanupResult extends WorkflowResult {
private Boolean allPostConditionsMet;
public interface WorkflowCleanupResult extends WorkflowResult {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can this kind of change go in not a major release? This is a public class so it will break user code if someone extended it originally and now it's an interface.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Theoretically, yes. Practically, these classes are not meant to be extended by the user, they're objects that the SDK returns as part of its processing. The only case where I could potentially imagine a user extending these classes would be in tests but even so, that would be quite a stretch, in my opinion…

Copy link
Collaborator

Choose a reason for hiding this comment

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

This targets next, what will be a major release.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Also, yes! Forgot about that! 🤦😅

import java.util.Optional;

import io.javaoperatorsdk.operator.api.reconciler.dependent.DependentResource;

@SuppressWarnings("rawtypes")
public class WorkflowReconcileResult extends WorkflowResult {
public interface WorkflowReconcileResult extends WorkflowResult {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here.

@metacosm metacosm merged commit bb3910b into next Nov 27, 2024
57 checks passed
@metacosm metacosm deleted the workflow-result-2 branch November 27, 2024 13:07
metacosm added a commit that referenced this pull request Nov 27, 2024
csviri pushed a commit that referenced this pull request Dec 6, 2024
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.

3 participants