Introduce "after" Relation in Workflows
@csviri ci sta già lavorando.
Dal 17/2/2023.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Description of the Problem
Workflows now has only the "depends on" relation. What mean if a dependent resource C depends on dependent resource A and B, it will be reconciled if both A and B are reconciled and ready. So both reconcile preconditions needs to hold if any, but also ready post conditions needs to be true for A and B if present.
While this probably covers most of the cases, and semantically feels natural: If a resource depends on other resource (so probably has to do something with those, like using some values from status, or calling their API after deployed) that one needs to be reconciled and ready first. And this might cover most of the cases, but also we can identify cases when this is not sufficient:
-
A resource needs to be after others but not all, only one or just a subset. So for example A would needs to be reconciled after B or C, but only one of those needs to exists (because maybe some precondition not holds for B). So basically a logical "or". Note that a reconcile precondition (RP) for A it is possible to check whether B or C was reconciled, or with what outcome, so it's not simply an "or" but a very generic approach to give a possibility to cover all kind of scenarios.
-
But an other example, B depends on A: A <- B. But we want to have B reconciled even if a precondition for A does not hold. In other words, A is an optional resource, but if present B needs to be reconciled after.
In other words we need a more generic relation, where we can just say, no matters if the previous resource was reconciled or not (because the reconcile precondition not holds).
Definition of after
An after relationship between a resource A and other resources B1 ...Bn . Where A is reconciled or evaulated for reconciliation (like checking preconditions). If all resources B1 ... Bn were evaluated for for reconciliation and/or reconciled - and if reconciled the ready post condition holds.
Combining depends_on and after
after is not a replacement for depends_on it's rather a complementary solution. So should it be possible to describe that C depends on A, but it is after B. So A <- C ; B - C. Well semantically it would mean to reconciled C we needs to reconcile A, but also B (optionally). Of course this could be described with two after relations: A - C ; B - C and a reconcile precondition, where we check if A exists.
So basically we can say these two can be combined; unless if we discover that it makes some semantic mess,( or it's very complex implementation wise. )
Additional Samples / Cases
Consider also the following situation: A <- B - C . B depends on A; C is after B. But the precondition for A does not hold. So B would not be reconciled either, but C will.
Notes
- Should after just processed after a ready condition is true? - probably yes, it based on those cases, that would be probably reasonable still (although, will loose a little bit generality). Alternatively just take into account the reconcile precondition, not the ready conditions.
- Notation: we can use arrow (
<-) fordepends onand just line/minus sign for after (-) . We read left to right so left happens always first.
- Lingua principale
- Java
- Stelle
- 944
- Fork
- 242
- Merge medio
- 1g 14h
- PR unite (30g)
- 46
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di operator-framework/java-operator-sdk
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
operator-framework/java-operator-sdk#3621 · 7 commenti · 1 assegnatario ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
operator-framework/java-operator-sdk#3615 · 1 commento · 3 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
operator-framework/java-operator-sdk#3568 · 1 commento · 1 reazione ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Support for Virtual Threads Aperta
operator-framework/java-operator-sdk#3538 · 2 commenti · 2 assegnatari ·
Tutte le issue di operator-framework/java-operator-sdk
Issue simili
-
certification
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Apertabug ecr
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Needs: Triage Type: Feature request
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
AntennaPod/AntennaPod#8794 ·
-
agentic-workflows
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
github/copilot-sdk#2760 ·