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

[konflux] add assembly type to app name, component name #1105

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ashwindasr
Copy link
Contributor

@ashwindasr ashwindasr commented Nov 1, 2024

When we tried to trigger stream builds, openshift did not let us update the Component since it was tied to a test GH branch. Hence we want to separate Application and Component CRDs based on version and assembly and names have to be unique in a namespace.

So an application from now on will look like openshift-4-18-stream / openshift-4-18-test and a component will look like stream-4-18-ose-etcd / test-4-18-ose-etcd

Also since Kubernetes resources have a maximum character length of 63 characters, lets no onboard a component with very long distgit names.

Copy link
Contributor

openshift-ci bot commented Nov 1, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from ashwindasr. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

app_name = self._config.group_name.replace(".", "-")
group_name = self._config.group_name.replace(".", "-")
app_name = group_name
app_name = f"{app_name}-{metadata.runtime.assembly}"
Copy link
Contributor

Choose a reason for hiding this comment

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

use group_name directly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

component_name = f"{app_name}-{metadata.distgit_key}".replace(".", "-").replace("_", "-")
# Since Component is a CRD, it has to be unique in the namespace. Also once a Component and Application is created, the branches that its linked to cannot be modified
# Hence prefixing the assembly and version to the component name to make it unique, eg: "stream-4-18-ose-etcd"
component_name = f"{metadata.runtime.assembly}-{group_name.removeprefix(f'openshift-')}-{metadata.distgit_key}".replace(".", "-").replace("_", "-")
Copy link
Contributor

Choose a reason for hiding this comment

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

rather than computing something from distgit-key, can we have the konflux name entity hard coded rather than calculated through an attribute in ocp-build-data?

Copy link
Contributor

openshift-ci bot commented Nov 1, 2024

@ashwindasr: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/security 50c127b link false /test security

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@ashwindasr ashwindasr added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 1, 2024
@vfreex
Copy link
Contributor

vfreex commented Nov 6, 2024

We might need to ship a release coming from mixed assemblies (e.g. stream and 4.y.z). I am not sure if it will be an issue if we separate assemblies and components by assembly name. Do you have any other reason (except shortening resource names) to make this change?

Also it guess it might be fine to just truncate the distgit keys in some way or having a new field as suggested by @joepvd . What do you think?

@thegreyd
Copy link
Contributor

Yeah this change makes me weary a little bit.. we have to do a good amount of config admin work with application names / component names in konflux-release-dev repo for releases. So why exactly are we doing this? or what is the problem right now that this would solve?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants