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

kie-kogito-serverless-operator-459: Restructuring of the Cloud -> Operator -> Persistence chapter #628

Merged
merged 29 commits into from
May 22, 2024

Conversation

wmedvede
Copy link
Contributor

@wmedvede wmedvede commented May 17, 2024

Closes #608

Description:

Please make sure that your PR meets the following requirements:

  • You have read the contributions doc
  • Pull Request title is properly formatted: Issue-XYZ Subject
  • Pull Request title contains the target branch if not targeting main: [0.9.x] Issue-XYZ Subject
  • The nav.adoc file has a link to this guide in the proper category
  • The index.adoc file has a card to this guide in the proper category, with a meaningful description
How to backport a pull request to a different branch?

In order to automatically create a backporting pull request please add one or more labels having the following format backport-<branch-name>, where <branch-name> is the name of the branch where the pull request must be backported to (e.g., backport-7.67.x to backport the original PR to the 7.67.x branch).

NOTE: backporting is an action aiming to move a change (usually a commit) from a branch (usually the main one) to another one, which is generally referring to a still maintained release branch. Keeping it simple: it is about to move a specific change or a set of them from one branch to another.

Once the original pull request is successfully merged, the automated action will create one backporting pull request per each label (with the previous format) that has been added.

If something goes wrong, the author will be notified and at this point a manual backporting is needed.

NOTE: this automated backporting is triggered whenever a pull request on main branch is labeled or closed, but both conditions must be satisfied to get the new PR created.

Copy link
Contributor

github-actions bot commented May 17, 2024

🎊 PR Preview a412e50 has been successfully built and deployed. See the documentation preview: https://sonataflow-docs-preview-pr-628.surge.sh

@wmedvede
Copy link
Contributor Author

Hi @kaldesai would you mind review this PR?

Copy link
Contributor

@nmirasch nmirasch left a comment

Choose a reason for hiding this comment

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

Looks good to me, I've added small suggestions. Feel free to take them into account

Copy link
Member

@ricardozanini ricardozanini left a comment

Choose a reason for hiding this comment

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

oh that's a big one! Many thanks, Walter! Looks really neat. The majority of my comments are style, nitpicks only. Thanks!

---
[NOTE]
====
Persistence configurations are applied at workflow deployment time, and potential changes in the SonataFlowPlatform will not impact already deployed workflows.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Persistence configurations are applied at workflow deployment time, and potential changes in the SonataFlowPlatform will not impact already deployed workflows.
Persistence configurations are applied at workflow deployment time, and potential changes in the `SonataFlowPlatform` will not impact already deployed workflows.

is this true? During the platform reconciliation, we do update the persistence configuration. So in case the pod restarts, so it will be the persistence values.

Copy link
Contributor Author

@wmedvede wmedvede May 22, 2024

Choose a reason for hiding this comment

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

Good catch, I didn't know it was expected to work this way, so this is why I added this note as a warning.

So, I did some tests and it looks like it works more or less this way:

I have changed for example the SFP platform persistence, and it looks like the DI, the JS, and the workflow are all restarted. (I mean, not in case the pod restarts, it was forced to restart)

However, we have an issue 😠 with the jobs-service in that case.

The job-service has two database connections:

One connection string, is passed as an env var QUARKUS_DATASOURCE_JDBC_URL in the Deployment.
All good, this connection is updated as part of the restart I commented above.

The second connection string, is passed in the jobs-service-properties config map 😠 , with a property quarkus.datasource.reactive.url. (IDK why it was done this way)

But the config map is not updated as part of the restart procedure. So, the JS restart, is not working well 😠, since the connection passed as env var points to the new database (was refreshed as part of the restart procedure), and the connection passed in the jobs-service-config map points to the old-one (not refreshed as part of the procedure). 😠

While not a blocker, we can't say that this sort of casecade update is working 100% well.

So, I have opened an issue for this situation: apache/incubator-kie-kogito-serverless-operator#468

Alternatives here:

  1. we update the documentation saying that this automatic restart/refresh exists, and immediately add a know issue saying that it's not working.

  2. we let the documentation as is to not confuse people.

wdyt? @domhanak @ricardozanini

wmedvede and others added 13 commits May 22, 2024 08:53
wmedvede and others added 13 commits May 22, 2024 13:10
@ricardozanini
Copy link
Member

Hey @wmedvede not sure if you know, but if you go to the "review page", you can click on "add to batch" and then commit once :D

@ricardozanini ricardozanini merged commit 2de2970 into apache:main May 22, 2024
2 checks passed
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.

Restructuring of the Cloud -> Operator -> Persistence chapter
5 participants