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

Consolidate transformers for common CRD fields, registry and config #29

Merged
merged 2 commits into from
Apr 28, 2020

Conversation

jcrossley3
Copy link
Contributor

Fixes #26

Also factored the common test utilities out of images.go and into a common/testing package.

All tests should remain intact -- eventing had a few more than serving -- now all in a single place.

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Apr 22, 2020
@knative-prow-robot knative-prow-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Apr 22, 2020
@jcrossley3
Copy link
Contributor Author

/retest

Copy link
Contributor

@markusthoemmes markusthoemmes left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve
/hold
/assign @aliok @houshengbo

I'd love if somebody else could take a look as well. I don't feel quite qualified enough.

@knative-prow-robot knative-prow-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels Apr 27, 2020
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jcrossley3, markusthoemmes

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

The pull request process is described 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

Fixes knative#26

Also factored the common test utilities out of images.go and into a
common/testing package.

All tests should remain intact -- eventing had a few more than serving
-- now all in a single place.
I like seeing the exact list of transformers in the reconciler's
transform function.
@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Apr 27, 2020
@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-sandbox-operator-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/common/config_maps.go Do not exist 92.3%
pkg/reconciler/common/extensions.go Do not exist 64.3%
pkg/reconciler/common/images.go Do not exist 86.7%

@jcrossley3
Copy link
Contributor Author

/retest

if overrideImage := registry.Override[containerName]; overrideImage != "" {
return overrideImage
func getNewImage(registry *v1alpha1.Registry, containerName, parent string) string {
if image, ok := registry.Override[parent+delimiter+containerName]; ok {
Copy link
Contributor

Choose a reason for hiding this comment

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

This made the operator CR support /containerName as valid key when parent is empty. I know it does not seem harmful, but is this what you intentionally to enable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It wasn't intentional, but I'm not sure it's worth accounting for since / isn't a valid character in container names. At least, that's how I interpret this: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#path-segment-names

@houshengbo
Copy link
Contributor

/hold cancel
/lgtm

@knative-prow-robot knative-prow-robot added lgtm Indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Apr 28, 2020
@knative-prow-robot knative-prow-robot merged commit 7bd06d0 into knative:master Apr 28, 2020
matzew added a commit to matzew/knative-operator that referenced this pull request Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove all duplicate transformer code
7 participants