-
Notifications
You must be signed in to change notification settings - Fork 42
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
[KOGITO-9982] Add Persistence field in SonataFlow CRD #322
[KOGITO-9982] Add Persistence field in SonataFlow CRD #322
Conversation
a3b93f8
to
317038d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes looks good to me. Please also check and resolve failing PR checks.
@jordigilh another rebase should solve the test issues. |
317038d
to
4391cad
Compare
Looks like the added test case is not working here on CI:
|
4391cad
to
ce93deb
Compare
Fixed 😄 |
5a721cd
to
81e5814
Compare
@ricardozanini ready to be merged. Please note that I had to remove the |
@jordigilh many thanks! we Will wait for QE verification first with @domhanak |
Thanks! I've removed this env var too in an opened PR! 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just left some minor comments if you don't mind. Otherwise looks good! Many thanks!
} | ||
|
||
var ( | ||
postgreSQLPort = 5432 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit; are you using this var outside the TestMergePodSpec_OverrideContainers_WithPostgreSQL_and_ServiceRef
test scope?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd keep it within the test scope then.
template: | ||
buildArgs: | ||
- name: QUARKUS_EXTENSIONS | ||
value: org.kie.kogito:kogito-addons-quarkus-jobs-knative-eventing:999-SNAPSHOT,org.kie.kogito:kogito-addons-quarkus-persistence-jdbc:999-SNAPSHOT,io.quarkus:quarkus-jdbc-postgresql:3.2.9.Final,io.quarkus:quarkus-agroal:3.2.9.Final |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wmedvede I think it's worth adding those to the images, so we keep them in the cache to facilitate persistence use cases. wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jordigilh @ricardozanini @tchughesiv @masayag
I think we need to assess here, because the persistence is a sort of all or nothing.
I mean, if we add the org.kie.kogito:kogito-addons-quarkus-persistence-jdbc:999-SNAPSHOT to the kogito-swf-builder, then, every workflow image we produce must use persistence, otherwise we'll have runtime start-up failures.
Additionally, we have the following scenarios:
1) The images is produced externally:
The workflow must come already built with the proper extensions incorporated in the produced image, and users might decide in a per-workflow basis to include the persistence related addons.
The operator just relies on the workflow CRD con connect with the DB, and just produce the ENV vars as Jordi is doing.
If the image is not ok, it's not the operator problem. Which make sense in my opinion.
(right now, AFAIK Parodos team is using the kogito-swf-builder series, however they might eventually produce the images by adding the persistence related extensions in a per-workflow basis,
or always add them if they always want persistence)
2) The Image is produced by the operator, and thus, managed by Kaniko or OpenShift based builds, etc.
In these cases, we could eventually manage to add the persistence extensions somehow dynamically, since in the end, for example with the Kaniko build we are producing a sonataflow-my-workflow-builder CM and here we can maybe manage to add these extensions.
But, since Parodos is working with 1), I think they should add those extensions in their images build system.
test/testdata/persistence/workflow/by_service/03-sonataflow_callbackstatetimeouts.sw.yaml
Show resolved
Hide resolved
test/testdata/persistence/workflow/by_service/03-sonataflow_callbackstatetimeouts.sw.yaml
Outdated
Show resolved
Hide resolved
@tchughesiv can you please review it too? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
1d717ba
to
0af9418
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I have added a general comment regarding the images generation that I think make sense, take a look please
test/testdata/persistence/workflow/by_service/03-sonataflow_callbackstatetimeouts.sw.yaml
Show resolved
Hide resolved
e7d5100
to
76116ce
Compare
Hi @jordigilh , it looks like we have some merge conflicts now, would you mind take a look please. |
811f961
to
1086910
Compare
Signed-off-by: Jordi Gil <[email protected]>
…ataFlow CRD Signed-off-by: Jordi Gil <[email protected]>
Signed-off-by: Jordi Gil <[email protected]>
Signed-off-by: Jordi Gil <[email protected]>
Signed-off-by: Jordi Gil <[email protected]>
…r worfklows that end very quickly, like callbackstatetimeouts Signed-off-by: Jordi Gil <[email protected]>
1086910
to
fa42ecd
Compare
Signed-off-by: Jordi Gil <[email protected]>
Signed-off-by: Jordi Gil <[email protected]>
fa42ecd
to
89ef882
Compare
@ricardozanini PR is green. Can we merge it? |
Let's wait for @wmedvede approval. I'll also take a look on it tomorrow. |
@jordigilh @ricardozanini |
@jordigilh can you please open a task to update the docs too? Thank you! |
* Added Persistence field in SonataFlow CRD Signed-off-by: Jordi Gil <[email protected]> * Added implementation to manage PostgreSQL persistence type in the SonataFlow CRD Signed-off-by: Jordi Gil <[email protected]> * Added end to end tests Signed-off-by: Jordi Gil <[email protected]> * Retry health endpoints Signed-off-by: Jordi Gil <[email protected]> * Changes based on Ricardo's feedback Signed-off-by: Jordi Gil <[email protected]> * Reorganized persistence e2e test and tweaked health check to cover for worfklows that end very quickly, like callbackstatetimeouts Signed-off-by: Jordi Gil <[email protected]> * Changes after merge conflicts with platform e2e tests Signed-off-by: Jordi Gil <[email protected]> * Added additional check for failing test in workflowproj Signed-off-by: Jordi Gil <[email protected]> --------- Signed-off-by: Jordi Gil <[email protected]>
* Added Persistence field in SonataFlow CRD Signed-off-by: Jordi Gil <[email protected]> * Added implementation to manage PostgreSQL persistence type in the SonataFlow CRD Signed-off-by: Jordi Gil <[email protected]> * Added end to end tests Signed-off-by: Jordi Gil <[email protected]> * Retry health endpoints Signed-off-by: Jordi Gil <[email protected]> * Changes based on Ricardo's feedback Signed-off-by: Jordi Gil <[email protected]> * Reorganized persistence e2e test and tweaked health check to cover for worfklows that end very quickly, like callbackstatetimeouts Signed-off-by: Jordi Gil <[email protected]> * Changes after merge conflicts with platform e2e tests Signed-off-by: Jordi Gil <[email protected]> * Added additional check for failing test in workflowproj Signed-off-by: Jordi Gil <[email protected]> --------- Signed-off-by: Jordi Gil <[email protected]>
Persistence
field is empty or nil, no persistence is defined.@tchughesiv @wmedvede @ricardozanini PTAL.