You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rename dependents to workflow in @ControllerConfiguration in v5 #1773
I don't really agree because dependents has a meaning in the context of operators while workflow is something that doesn't really exist in the domain… if anything should be renamed, it should be workflows, imo. Also, we've talked about dependents a lot in talks and presentations so it'd be more complex to rename as well.
I'm talking about this one field in the annotation, nothing else.
So workflow exists, also there is a builder in standalone mode, to create workflow and orchestrate dependent resources. It a workflow above dependent resources.
What do you mean workflow does not exists in the domain btw, there is a whole nice section about it, what is a workflow: https://javaoperatorsdk.io/docs/workflows
:)
What do you mean workflow does not exists in the domain btw, there is a whole nice section about it, what is a workflow: https://javaoperatorsdk.io/docs/workflows
:)
What I mean is that workflow is not a concept traditionally associated with the operator domain.
I'm talking about this one field in the annotation, nothing else.
I understand but to me, it still doesn't make sense to rename that field as what is being defined by it really are the dependents, not a workflow. There's an implicit workflow if people define conditions on the dependents but there might not be any such conditions. Essentially, when using this field, there will always be dependents but there might not be a workflow associated with them so it'd be weird to me to rename that field workflow… What might make sense, though, would be to rename the properties that define the conditions to maybe be more explicit.
There is always a workflow create in the background. And even if there is no depends on relations or condition, just two or more dependents created in the background, and the fact that those are reconciled in parallel is actually a definition/responsibility of a workflow.
But the main problem I faced, and motivated the issue, is that I tried to explain to someone that how these workflows work on top of dependent resources on our example, and basically we have a nice definition of dependent resources and workflows and nice documentation. The workflows are nowhere to find in the domain language. So had to explain that the complex structure where I reference a bunch of dependent resources under dependeents={...} is actually that workflow that we talk about in the docs. So this is a quite obvious smell to me.
I think that maybe we should just not talk about workflows as they are an implementation detail and just mention that you can create relations between dependents. The fact that there is something like a workflow that gets created by the implementation shouldn't make it necessary to bubble the concept up. For example, explaining dependents without any relations wouldn't make any sense if the attribute was named workflow… It probably shouldn't be a separate part in the documentation either, actually, but rather part of the documentation on dependents.
These two concepts have clear boundaries. Remember, we have standalone dependents which are independent from workflows. Basically if anybody wan't to implement it's own logic in what order and/or under what condition reconcile resources can use standalone dependent resources, that is quite powerful, and makes dependent resources much more powerful. There is no reason to mix there depends on relation or conditions, since users do it in their own code (in case of standalone).
On the other hand we offer a quite generic way to handle ordering and conditional way to reconcile dependents. But that is limited, will never cover all cases. (That is why even extensions like after might needed in the future to cover more: #1774 ).
So workflows is a complementary feature to dependents, since it is very much make sense to use dependents without workflows.
On the other hand with annotation we create workflows. As mentioned, even parallelism and other features might be configurable within that annotation like:
@ControllerConfiguration( workflow = @Workflow( parallelism = 10, // possible other configs fow workflowdependents={
@Dependent(type=SampleDependent1.class),
@Dependent(type=SampleDependent1.class)}))
But we are defining there a workflow with annotation, always. And the problem is it is not called that way.
Activity
metacosm commentedon Feb 16, 2023
I don't really agree because
dependentshas a meaning in the context of operators while workflow is something that doesn't really exist in the domain… if anything should be renamed, it should be workflows, imo. Also, we've talked about dependents a lot in talks and presentations so it'd be more complex to rename as well.csviri commentedon Feb 16, 2023
I'm talking about this one field in the annotation, nothing else.
So workflow exists, also there is a builder in standalone mode, to create workflow and orchestrate dependent resources. It a workflow above dependent resources.
csviri commentedon Feb 16, 2023
What do you mean workflow does not exists in the domain btw, there is a whole nice section about it, what is a workflow:
https://javaoperatorsdk.io/docs/workflows
:)
metacosm commentedon Feb 20, 2023
What I mean is that
workflowis not a concept traditionally associated with the operator domain.metacosm commentedon Feb 20, 2023
I understand but to me, it still doesn't make sense to rename that field as what is being defined by it really are the dependents, not a workflow. There's an implicit workflow if people define conditions on the dependents but there might not be any such conditions. Essentially, when using this field, there will always be dependents but there might not be a workflow associated with them so it'd be weird to me to rename that field
workflow… What might make sense, though, would be to rename the properties that define the conditions to maybe be more explicit.csviri commentedon Feb 21, 2023
There is always a workflow create in the background. And even if there is no depends on relations or condition, just two or more dependents created in the background, and the fact that those are reconciled in parallel is actually a definition/responsibility of a workflow.
But the main problem I faced, and motivated the issue, is that I tried to explain to someone that how these workflows work on top of dependent resources on our example, and basically we have a nice definition of dependent resources and workflows and nice documentation. The workflows are nowhere to find in the domain language. So had to explain that the complex structure where I reference a bunch of dependent resources under
dependeents={...}is actually that workflow that we talk about in the docs. So this is a quite obvious smell to me.metacosm commentedon Feb 21, 2023
I think that maybe we should just not talk about workflows as they are an implementation detail and just mention that you can create relations between dependents. The fact that there is something like a workflow that gets created by the implementation shouldn't make it necessary to bubble the concept up. For example, explaining dependents without any relations wouldn't make any sense if the attribute was named
workflow… It probably shouldn't be a separate part in the documentation either, actually, but rather part of the documentation on dependents.csviri commentedon Feb 21, 2023
These two concepts have clear boundaries. Remember, we have standalone dependents which are independent from workflows. Basically if anybody wan't to implement it's own logic in what order and/or under what condition reconcile resources can use standalone dependent resources, that is quite powerful, and makes dependent resources much more powerful. There is no reason to mix there
depends onrelation or conditions, since users do it in their own code (in case of standalone).On the other hand we offer a quite generic way to handle ordering and conditional way to reconcile dependents. But that is limited, will never cover all cases. (That is why even extensions like
aftermight needed in the future to cover more: #1774 ).So workflows is a complementary feature to dependents, since it is very much make sense to use dependents without workflows.
On the other hand with annotation we create workflows. As mentioned, even parallelism and other features might be configurable within that annotation like:
But we are defining there a workflow with annotation, always. And the problem is it is not called that way.
csviri commentedon Feb 21, 2023
actually might be even good to have a dedicated
@Workflowannotation as above, for future compatibility.github-actions commentedon Apr 23, 2023
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.
3 remaining items
github-actions commentedon Aug 23, 2023
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.
github-actions commentedon Oct 23, 2023
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.
github-actions commentedon Dec 23, 2023
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.
github-actions commentedon Feb 22, 2024
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.