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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] SRVCLI-401: 馃巵 Add kn-event configuration #154

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cardil
Copy link
Member

@cardil cardil commented May 9, 2024

Changes

  • 馃巵 Add kn-event configuration

Fixes SRVCLI-401

Here's the current config diff for kn-event: https://gist.github.com/cardil/adedaf1313446a6329fb9a958670198a (I'll keep it updated)

@openshift-ci openshift-ci bot requested review from aliok and pierDipi May 9, 2024 15:52
Copy link

openshift-ci bot commented May 9, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: cardil
Once this PR has been reviewed and has the lgtm label, please assign skonto for approval. 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

@cardil cardil marked this pull request as draft May 9, 2024 15:53
@cardil cardil changed the title 馃巵 Add kn-event configuration [WIP] 馃巵 Add kn-event configuration May 9, 2024
@cardil cardil changed the title [WIP] 馃巵 Add kn-event configuration [WIP] 馃巵 SRVCLI-401 Add kn-event configuration May 9, 2024
@cardil cardil changed the title [WIP] 馃巵 SRVCLI-401 Add kn-event configuration [WIP] SRVCLI-401: 馃巵 Add kn-event configuration May 9, 2024
@openshift-ci-robot
Copy link

@cardil: This pull request references SRVCLI-401 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set.

In response to this:

Changes

  • 馃巵 Add kn-event configuration

Fixes SRVCLI-401

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 openshift-eng/jira-lifecycle-plugin repository.

@cardil
Copy link
Member Author

cardil commented May 9, 2024

/kind enhancement

@openshift-ci openshift-ci bot added the kind/enhancement New feature or request label May 9, 2024
@cardil
Copy link
Member Author

cardil commented May 10, 2024

repositories:
- org: openshift-knative
repo: kn-plugin-event
imagePrefix: client-plugin-event

Choose a reason for hiding this comment

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

It's a bit nit picking, but I wonder how the final names is generated from all those values. Is it going too verbose? I'd keep kn-plugin-event here. Wdyt?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is how they used to be called: https://github.com/openshift/release/blob/a45d8237303d117149c08a5c4c56a558fd62dfbf/ci-operator/config/openshift-knative/kn-plugin-event/openshift-knative-kn-plugin-event-release-next__415.yaml#L74-L79

However, I don't know if I'll be able to keep the current naming, and will be force to adjust kn-event to follow hack's machinery.

This is what I am currently getting (WIP):

     test:
     - as: test
+      cli: latest
       commands: openshift/e2e-tests.sh
       dependencies:
-      - env: TEST_IMAGES_EVENTSHUB
+      - env: CLIENT_PLUGIN_EVENT_BUILD_IMAGE
+        name: client-plugin-event-build-image
+      - env: CLIENT_PLUGIN_EVENT_SENDER
+        name: client-plugin-event-sender
+      - env: CLIENT_PLUGIN_EVENT_SOURCE_IMAGE
+        name: client-plugin-event-source-image
+      - env: CLIENT_PLUGIN_EVENT_TEST_EVENTSHUB
         name: client-plugin-event-test-eventshub
-      - env: TEST_IMAGES_WATHOLA_FORWARDER
+      - env: CLIENT_PLUGIN_EVENT_TEST_WATHOLA_FORWARDER
         name: client-plugin-event-test-wathola-forwarder
-      - env: IMAGES_KN_EVENT_SENDER
-        name: client-plugin-event-sender
-      from: src
+      from: client-plugin-event-source-image
       resources:
         requests:
           cpu: 100m
       timeout: 30m0s

Copy link
Member Author

Choose a reason for hiding this comment

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

Here's a full diff, if you're interested: https://gist.github.com/cardil/adedaf1313446a6329fb9a958670198a

Comment on lines +21 to +24
binaryBuildCommands: |-
export HOME=/tmp
export TEST_IMAGES_DIR=/usr/bin
./mage build

Choose a reason for hiding this comment

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

In case of client, I've been looking at this stanza and my thought's been to wrap it into Dockerfile stage build to simplify CI config. Similarly to Makefile PR in the kn-plugin-event midstream, but also execute the make withing Docker builds.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is how Openshift CI advises building binaries in a separate step, and later use the bin image contents, while building the images.

Since then, most Serverless repos moved to pure Docker approach, when the bin building doesn't matter, as everything is done in the build image step: https://github.com/openshift-knative/serving/blob/release-next/openshift/ci-operator/knative-images/activator/Dockerfile

IDK, if I keep kn-event current setup or shift it to how other repos does this. I'm leaning towards the pure Dockerfile approach.

Comment on lines +300 to +301
env:
SKIP_MESH_AUTH_POLICY_GENERATION: "true"

Choose a reason for hiding this comment

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

Is it related to work on event plugin? Would it make more sense to check in S-O Makefile if PROW and based on that define defaults skips? Maybe we will need more skips in the future.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a rather messy env var introduced in #77

Now, it is added to every command. I didn't like that, so I added support for defining the environmental variables.

I believe this variable makes sense only in terms of S-O, that's why I added it just to its config. Is it right, @skonto?

generate-ci-no-clean: generate-eventing-ci generate-serving-ci generate-serverless-operator-ci
.PHONY: generate-ci-no-clean

generate-eventing-ci:

Choose a reason for hiding this comment

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

These cmd name changes will most likely break GitHub actions that execute generators periodically.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll update the workflows in this repo. Are you aware of other cross-repo references to those targets?

@openshift-ci-robot
Copy link

@cardil: This pull request references SRVCLI-401 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set.

In response to this:

Changes

  • 馃巵 Add kn-event configuration

Fixes SRVCLI-401

Here's the current config diff for kn-event: https://gist.github.com/cardil/adedaf1313446a6329fb9a958670198a (I'll keep it updated)

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 openshift-eng/jira-lifecycle-plugin repository.

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.

None yet

3 participants