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-tools#2751: Remove references to Quarkus and Kogito versions; Automatic change of platform images based on env context #2794

Merged
merged 3 commits into from
Dec 20, 2024

Conversation

ricardozanini
Copy link
Member

Fix #2751

In this PR:

  • Removal of hardcoded Quarkus and Kogito versions from the operator
  • Add Kogito and Quarkus versions to all images in the platform
  • When adding a new extension, use the Kogito and Quarkus versions from the platform
  • Operator won't pass versions from the platform to the builder anymore; hence the builder will fetch the extension based on the platform version. It's still possible to pass the version if needed by users
  • Removal of every docker.io mention in the code that's not generated
  • Added a script to update the controllers_cfg.yaml and SonataflowBuilder.dockerfile files based on the env context from dependant images

@tiagobento tiagobento changed the title Fix #2751 - Remove references to Quarkus and Kogito versions; Automatic change of platform images based on env context kie-tools#2751: Remove references to Quarkus and Kogito versions; Automatic change of platform images based on env context Dec 7, 2024
imageName=$(pnpm build-env sonataFlowOperator.registry)/$(pnpm build-env sonataFlowOperator.account)/$(pnpm build-env sonataFlowOperator.name)
imageTag=$(pnpm build-env sonataFlowOperator.buildTag)
version=$(pnpm build-env sonataFlowOperator.version)

targetSonataflowBuilderImage=$(pnpm build-env sonataFlowOperator.sonataflowBuilderImage)
Copy link
Contributor

Choose a reason for hiding this comment

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

@ricardozanini If I don't remember wrong, this bump-version.sh script is executed as part of the automations executed during the release process, to adjust the image names to the version to be released etc.

If the image names setting is removed from this script to the make invoked python update_controllers_cfg.py, are you sure this is also executed as part of the automations?

Not saying this is bad, just double checking

Copy link
Member Author

@ricardozanini ricardozanini Dec 12, 2024

Choose a reason for hiding this comment

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

@wmedvede I've removed it here because we are bumping the new Python script.

This script runs during the build process, guaranteeing our versioning and image values. So, if the automation uses pnpm build:prod and follows the patterns we established in this repo, we should not have any problems.

If we would, I'd blame @tiagobento 🤣

GroupId string `yaml:"groupId,omitempty"`
ArtifactId string `yaml:"artifactId,omitempty"`
Version string `yaml:"version,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

OK, so the idea is that we remove the version from here, and at the time of executing run_quarkus_mvn_add_extension (bla, bla), the extension number will be taken from the kogito-version or the quarkus-version that corresponds to current product version (just built) accordingly, right?

And the mechanism works on the basis that, to have the version auto-filling, extensions must mandatory belong to gropups io.quarkus, org.kie, or "kogito".

This leaves out the possibility of configuring an extension that don't belong to any of these groups right? (at least in controllers_cfg.yaml)

Also, one thing that comes to my mind. With this new mechanism (in a given installation) it's not possible to configure the controllers config file to point to a different version, right?

Thinking about situations where you want to quickly do something like this:

  1. something is not good
  2. I quickly configure the controllers config ConfigMap with a different version ej 9.101.xxxxx, instead of 9.102.xxxxx
  3. restart the operator pod, And I can quickly see if things works with the previous version to test, etc.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can just the data structure/processing as is, and keep the version field.
However, we don't set it anymore. So, if not set, the automatic mechanism will be applied.
But we keep the trapdoor.

Copy link
Member Author

Choose a reason for hiding this comment

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

@wmedvede I'd rather remove for good the possibility of adding the version since the platform will provide it. If we need to add the version to any other future library to the controller_cfg, we can then create a new data structure for it. But even in these cases, I'd rather have dependency control within the platform.

This hack you mentioned crossed my mind (change the version to check if the workaround works). In this case, one can use the build ARGS QUARKUS_EXTENSIONS directly to the SonataFlowBuild.

@ricardozanini
Copy link
Member Author

I'll rebase this PR after #2818

@jomarko
Copy link
Contributor

jomarko commented Dec 17, 2024

FYI #2813 was merged, probably causes conflicts to this PR.

ricardozanini and others added 3 commits December 18, 2024 12:09
…utomatic change of platform images based on env context

Signed-off-by: Ricardo Zanini <[email protected]>
Signed-off-by: Ricardo Zanini <[email protected]>
Signed-off-by: Ricardo Zanini <[email protected]>
@ricardozanini
Copy link
Member Author

@wmedvede @rgdoliveira can you please review?

@ricardozanini ricardozanini merged commit c690d46 into apache:main Dec 20, 2024
15 checks passed
@ricardozanini ricardozanini deleted the issue-2751 branch December 20, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[sonataflow-operator] Remove hardcoded version in SonataFlow Operator/CLI artifacts
5 participants