Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

small refactor for actuator folder #26

Merged
merged 1 commit into from
Jun 26, 2019

Conversation

amy
Copy link
Contributor

@amy amy commented Jun 25, 2019

I moved the Cluster actuator related code from actuators.go to cluster.go under /actuators. This copies the pattern used for actuators/machine.go

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 25, 2019
@k8s-ci-robot k8s-ci-robot requested review from chuckha and detiber June 25, 2019 22:55
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 25, 2019
@amy
Copy link
Contributor Author

amy commented Jun 25, 2019

/assign @chuckha

Copy link
Contributor

@chuckha chuckha left a comment

Choose a reason for hiding this comment

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

yay organization 📁

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: amy, chuckha

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 26, 2019
@detiber
Copy link
Contributor

detiber commented Jun 26, 2019

Not directly related to this change, but any reason to share the same package between cluster and machine actuators? @chuckha

@chuckha
Copy link
Contributor

chuckha commented Jun 26, 2019

@detiber Mostly this is because I prefer fewer packages. If they were their own package, they would each only contain one file and one type, which is somewhat of a go antipattern.

Since the implementation is fairly small and we are limited to the Cluster actuator and the Machine actuator I see little benefit of keeping each in its own package.

What benefits do you see us gaining from having separate packages?

@detiber
Copy link
Contributor

detiber commented Jun 26, 2019

What benefits do you see us gaining from having separate packages?

Mainly naming, cluster.NewActuator() vs actuator.NewClusterActuator(). I also wouldn't expect there to be shared code between the Cluster and Machine actuators, so belonging to the same package just feels a bit weird to me.

That said, I have no strong objections to keeping them in the same package.

@chuckha
Copy link
Contributor

chuckha commented Jun 26, 2019

A fair point! I don't really think about types in packages as having to share code though. It's more of an organizational thing for me 🤔. The naming could use improving for sure though. Anyway, this is totally out of scope to the PR, sorry @amy:)

@detiber
Copy link
Contributor

detiber commented Jun 26, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 26, 2019
@k8s-ci-robot k8s-ci-robot merged commit e9226bc into kubernetes-retired:master Jun 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants