-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Migrate the TaskRun controller to genreconciler. #2771
Conversation
This PR cannot be merged: expecting exactly one kind/ label Available
|
2 similar comments
This PR cannot be merged: expecting exactly one kind/ label Available
|
This PR cannot be merged: expecting exactly one kind/ label Available
|
/kind cleanup |
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
oh boy, my favorite. dependency cycles! |
The following is the coverage report on the affected files.
|
/assign @afrittoli @vdemeester @imjasonh Alright, this should be RFAL. There's some cruft to cleanup after this, but this has already started to creep a bit in the cleanup department. 😬 |
The following is the coverage report on the affected files.
|
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.
/lgtm
@@ -14,38 +14,39 @@ See the License for the specific language governing permissions and | |||
limitations under the License. | |||
*/ | |||
|
|||
package config | |||
package config_test |
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 following is the coverage report on the affected files.
|
There are effectively two pieces to this change: 1. Generate and consume the base reconciler (dropping boilerplate) 2. Update tests to plumb certain things differently (the existing tests followed our bad example and used unsafe type cases to root around in the `controller.Reconciler.(*Reconciler)`) The changes in the pipeline run files are mostly for symmetry, or because a common utility changed.
The following is the coverage report on the affected files.
|
@@ -727,8 +662,7 @@ func updateStoppedSidecarStatus(pod *corev1.Pod, tr *v1beta1.TaskRun, c *Reconci | |||
}) | |||
} | |||
} | |||
_, err := c.updateStatus(tr) |
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.
Just making a note here in case this comes into question, but checked this out and seems to be fine without the call to updateStatus
. Thanks for noticing and correcting.
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.
Very nice, thank you!
/approve
@@ -1328,7 +1307,7 @@ func TestReconcile(t *testing.T) { | |||
t.Fatalf("Expected actions to be logged in the kubeclient, got none") | |||
} | |||
|
|||
err = checkEvents(fr, tc.name, tc.wantEvents) | |||
err = checkEvents(testAssets.Recorder, tc.name, tc.wantEvents) |
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.
Nice!! 🤩
Pipeline *fakepipelineclientset.Clientset | ||
Resource *fakeresourceclientset.Clientset | ||
Kube *fakekubeclientset.Clientset | ||
CloudEvents cloudeventclient.CEClient |
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 knew there was a better place to store this client :D only at the time I had no idea :P
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.
/lgtm
/meow
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 kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afrittoli, vdemeester 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 |
/retest |
There are effectively two pieces to this change:
controller.Reconciler.(*Reconciler)
)The changes in the pipeline run files are mostly for symmetry, or because a common utility changed.
This is WIP until #2760 lands.