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

[KOGITO-8792] - Add events to build controllers and the ability to restart a build #318

Merged
merged 4 commits into from
Dec 20, 2023

Conversation

ricardozanini
Copy link
Member

@ricardozanini ricardozanini commented Dec 5, 2023

See https://issues.redhat.com/browse/KOGITO-8792

In this PR:

  • We add the ability to register events for build phase changes within the workflow object.
  • Users can now rebuild a failed build (or for any other reasons they need) by setting the annotation sonataflow.org/restartBuild: true to a given build instance.
  • There's a small refactoring where we remove the PostReconcile method from the StateSupport struct since it does not belong there. The tradeoff is to add the noop implementation to other states. We could infer the annotation in the reconciliation state loop by verifying if it implements the post-reconcile hook and then calls it or we could create a hook and only call if it's not null. However, I decided to go to this path that looks cleaner and makes the interface easier to understand.

Description of the change:

Motivation for the change:

Checklist

  • Add or Modify a unit test for your change
  • Have you verified that tall the tests are passing?
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.

@ricardozanini
Copy link
Member Author

@jakubschwan @domhanak @wmedvede can you please review?

@ricardozanini ricardozanini merged commit 08c8854 into apache:main Dec 20, 2023
4 checks passed
@ricardozanini ricardozanini deleted the kogito-8792 branch December 20, 2023 19:07
rgdoliveira pushed a commit to rgdoliveira/kogito-serverless-operator that referenced this pull request Jan 29, 2024
…start a build (apache#318)

* [KOGITO-8792] - Add events to build controllers and the ability to restart a build

Signed-off-by: Ricardo Zanini <[email protected]>

* Add the ability to restart builds and signal to workflows

Signed-off-by: Ricardo Zanini <[email protected]>

* Rollout deployment after a successful build

Signed-off-by: Ricardo Zanini <[email protected]>

* Fix rollout deployment once a build finishes

Signed-off-by: Ricardo Zanini <[email protected]>

---------

Signed-off-by: Ricardo Zanini <[email protected]>
rgdoliveira pushed a commit to rgdoliveira/kogito-serverless-operator that referenced this pull request Jan 29, 2024
…start a build (apache#318)

* [KOGITO-8792] - Add events to build controllers and the ability to restart a build

Signed-off-by: Ricardo Zanini <[email protected]>

* Add the ability to restart builds and signal to workflows

Signed-off-by: Ricardo Zanini <[email protected]>

* Rollout deployment after a successful build

Signed-off-by: Ricardo Zanini <[email protected]>

* Fix rollout deployment once a build finishes

Signed-off-by: Ricardo Zanini <[email protected]>

---------

Signed-off-by: Ricardo Zanini <[email protected]>
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.

3 participants