Using a Condition to test if dependencies are met
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 62/100
Direção de pesquisa
Start from the @Dependent annotation and the code that interprets dependsOn and reconcilePrecondition (io.javaoperatorsdk.operator.processing.dependent.* and the Condition interface) to see where deletion on a false precondition is triggered. Design where the new dependenciesMetPrecondition option would be evaluated in the reconcile cycle so it gates work without deleting an existing secondary resource, and decide how it interacts with dependsOn. Done looks like: the new option is honored during ongoing reconcile cycles, existing precondition deletion behavior is unchanged, and unit/integration tests around dependent resources pass.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Is your feature request related to a problem? Please describe.
Currently, we can describe a resource's dependencies using their names in dependsOn and we can also test preconditions with a reconcilePrecondition. However, sometimes a resource may need to depend one "at least one of" some other resource. For example, either an Ingress or a Route depending on the underlying cluster. In this case, dependsOn is not possible and a reconcilePrecondition returning false would delete the resource, which is undesirable for ongoing reconcile cycles.
There could also be cases where, for example, downstream dependents need a generated Route's hostname, but do not depend on the route actually becoming ready for further processing of the workflow, etc. Using a Condition could allow dependencies on sub-resources and not only on a resource's full readiness.
Describe the solution you'd like
An additional option on @Dependent (such as dependenciesMetPrecondition) that would allow programmatic checking on dependencies without removal of an existing secondary resource if it exists. This could be either mutually exclusive with, or in addition to whatever is given in dependsOn. Allowing both would provide a way to test simple dependencies and more complex ones at the same time.
Describe alternatives you've considered
I think more complicated workflows with "virtual" resources (always returning ReconcileResult.noOperation(primary) from reconcile) together with a readyPostcondition could be made to behave similarly, but with the burden of additional code and dependencies in the @Workflow.
Additional context
N/A
- Linguagem predominante
- Java
- Estrelas
- 942
- Forks
- 246
- Merge médio
- 1d 11h
- PRs com merge (30d)
- 28
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de operator-framework/java-operator-sdk
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 45/100
operator-framework/java-operator-sdk#3568 · 1 comentário · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
operator-framework/java-operator-sdk#3563 ·
Mantenedores costumam responder em até 1 dia
-
Support for Virtual ThreadsTalvez já em andamento @xstefank assumiu há 62 dias. Aberta
operator-framework/java-operator-sdk#3538 · 2 comentários · 2 responsáveis ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
operator-framework/java-operator-sdk#3498 · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
operator-framework/java-operator-sdk#3452 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de operator-framework/java-operator-sdk
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
apache/rocketmq-dashboard#6610 ·
Mantenedores costumam responder em até 3 dias
-
`RedisList.reversed()` view returns an empty `range` and `trim` removes all elementsTalvez já em andamento @CCCLL assumiu hoje. Abertastatus: waiting-for-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
spring-projects/spring-data-redis#3461 ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 73/100
javapathfinder/jpf-core#649 ·
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
devops-thiago/ThrillhouseBot#1093 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
wimdeblauwe/htmx-spring-boot#205 ·