Skip to content

Conversation

@mkenigs
Copy link
Contributor

@mkenigs mkenigs commented Nov 23, 2021

Besides eliminating code duplication, this will allow more easily unit
testing functions that call resourceapply.* functions, which will help
in migrating from using ./lib to library-go

Created a new type manifestPaths to wrap all the arguments needed for
applyManifests

Copy link
Contributor

@yuqi-zhang yuqi-zhang left a comment

Choose a reason for hiding this comment

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

The diff view is a bit wonky but I see everything was just abstracted to syncManifests, which makes a lot of sense.

Out of curiosity, are

type manifestPaths struct {
	clusterRoles        []string
	roleBindings        []string
	clusterRoleBindings []string
	serviceAccounts     []string
	secrets             []string
	daemonsets          []string
}

Those specific types consolidated in library-go?

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 26, 2021
@mkenigs
Copy link
Contributor Author

mkenigs commented Nov 29, 2021

No idea if they're in library-go, but I don't expect there's a function that takes those exact arguments. I guess I could also just pass all of them as args to syncManifests rather than creating a struct. Not sure if that would be cleaner

@kikisdeliveryservice
Copy link
Contributor

/assign

Copy link
Contributor

@kikisdeliveryservice kikisdeliveryservice left a comment

Choose a reason for hiding this comment

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

Some comments / questions

@kikisdeliveryservice
Copy link
Contributor

/retest-required

Besides eliminating code duplication, this will allow more easily unit
testing functions that call resourceapply.* functions, which will help
in migrating from using ./lib to library-go

Created a new type manifestPaths to wrap all the arguments needed for
applyManifests
@mkenigs mkenigs changed the title Consolidate duplicated code into syncManifests Consolidate duplicated code into applyManifests Dec 2, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 3, 2021

@mkenigs: The following tests 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/e2e-vsphere-upgrade eeef059 link false /test e2e-vsphere-upgrade
ci/prow/okd-e2e-aws eeef059 link false /test okd-e2e-aws
ci/prow/e2e-aws-workers-rhel8 eeef059 link false /test e2e-aws-workers-rhel8
ci/prow/e2e-aws-workers-rhel7 eeef059 link false /test e2e-aws-workers-rhel7
ci/prow/e2e-aws-disruptive eeef059 link false /test e2e-aws-disruptive

Full PR test history. Your PR dashboard.

Details

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/test-infra repository. I understand the commands that are listed here.

Copy link
Contributor

@kikisdeliveryservice kikisdeliveryservice left a comment

Choose a reason for hiding this comment

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

great job @mkenigs

@kikisdeliveryservice
Copy link
Contributor

Zack, can you give this a once over and I'll leave the final lgtm to you =)
/assign @cheesesashimi

@mkenigs
Copy link
Contributor Author

mkenigs commented Dec 3, 2021

@kikisdeliveryservice thanks and thanks for the feedback :)

@cheesesashimi
Copy link
Member

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 3, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 3, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheesesashimi, kikisdeliveryservice, mkenigs, yuqi-zhang

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [kikisdeliveryservice,yuqi-zhang]

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

@openshift-merge-robot openshift-merge-robot merged commit 6870f56 into openshift:master Dec 3, 2021
@mkenigs mkenigs deleted the sync-refactor branch March 18, 2022 13:49
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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants