-
Notifications
You must be signed in to change notification settings - Fork 16
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
SRVCLI-401: 🎁 Add kn-event configuration #154
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: cardil 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 |
@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:
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. |
/kind enhancement |
repositories: | ||
- org: openshift-knative | ||
repo: kn-plugin-event | ||
imagePrefix: client-plugin-event |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the diff above. I think it's acceptable to proceed.
The naming thing. Yes, we could proceed with an image prefix of kn-plugin-event
, however:
- historically, the images were published under the prefix
client-plugin-event
, so keeping it makes the history consistent - we already burned down the naming convention in [release-1.14] 🧹 o-k/hack naming convention for images kn-plugin-event#442 (and its backports)
So, we can change the image prefix to kn-plugin-event
, but I'm a bit reluctant due to the above points.
config/kn-event.yaml
Outdated
binaryBuildCommands: |- | ||
export HOME=/tmp | ||
export TEST_IMAGES_DIR=/usr/bin | ||
./mage build |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to keep the current approach, as I managed to change the code to support both ways. Also, the current kn-event's approach may be better for multi-arch builds in Openshift CI. The current CI setup for kn-event works, and changing it just for the sake of bringing it on par with other repos seems pointless.
Still, maybe, I'll follow up the kn-event to add a Makefile target that detects Openshift CI environment and sets proper environment variables.
env: | ||
SKIP_MESH_AUTH_POLICY_GENERATION: "true" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generate-ci-no-clean: generate-eventing-ci generate-serving-ci generate-serverless-operator-ci | ||
.PHONY: generate-ci-no-clean | ||
|
||
generate-eventing-ci: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actions are updated, and I restored those targets, as deprecated (they print a warn box when used).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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:
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. |
**Conflicts fixed:** - pkg/prowgen/prowgen.go - pkg/prowgen/prowgen_images_discovery.go
36fd7a7
to
f076418
Compare
Conflicts fixed: - Makefile
/hold Let me provide the full diff, for all the components... EDIT: The gist now contains the full diff, of all the components: https://gist.github.com/cardil/adedaf1313446a6329fb9a958670198a The diff needs to be reviewed... |
ImagePrefix string `json:"imagePrefix,omitempty" yaml:"imagePrefix,omitempty"` | ||
ImageNameOverrides map[string]string `json:"imageNameOverrides,omitempty" yaml:"imageNameOverrides,omitempty"` | ||
SlackChannel string `json:"slackChannel,omitempty" yaml:"slackChannel,omitempty"` | ||
CanonicalGoRepository *string `json:"canonicalGoRepository,omitempty" yaml:"canonicalGoRepository,omitempty"` | ||
E2ETests []E2ETest `json:"e2e,omitempty" yaml:"e2e,omitempty"` | ||
Dockerfiles Dockerfiles `json:"dockerfiles,omitempty" yaml:"dockerfiles,omitempty"` | ||
BaseImages map[string]cioperatorapi.ImageStreamTagReference `json:"baseImages,omitempty" yaml:"baseImages,omitempty"` | ||
SharedInputs map[string]cioperatorapi.ImageBuildInputs `json:"sharedInputs,omitempty" yaml:"sharedInputs,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it make sense to keep variable name as per CI operator API, ImageBuildInputs
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I can name it ImageBuildInputs
although the shared aspect differs here from CI operator API.
In CI operator API, the ImageBuildInputs
is used for a specific image. Here, I'm using that do add common, provided upfront inputs for all images from a given repo.
I could name it SharedImageBuildInputs
, but isn't that too mouthful?
Org string | ||
Repo string | ||
Tag string | ||
Digest string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is digest needed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use it currently, which doesn't mean at any point such image reference might be used in one of Dockerfiles.
Conflicts fixed: - Makefile - pkg/prowgen/prowgen.go
Co-authored-by: David Simansky <dsimansk@redhat.com>
PR needs rebase. 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. |
Changes
Fixes SRVCLI-401
Here's the current config diff for kn-event: https://gist.github.com/cardil/adedaf1313446a6329fb9a958670198a (I'll keep it updated)