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

[kubernetes-sigs/kueue] Change the default merge-method #30417

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

trasc
Copy link
Contributor

@trasc trasc commented Aug 18, 2023

Change the default merge method for kueue to squash

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. area/config Issues or PRs related to code in /config sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Aug 18, 2023
@trasc
Copy link
Contributor Author

trasc commented Aug 18, 2023

/cc @alculquicondor
/cc @tenzen-y

@tenzen-y
Copy link
Member

@trasc Although I don't have strong objections, what is the motivation?

@tenzen-y
Copy link
Member

I'm wondering if we should use the squash method as a default. Because there are situations that the merge method is helpful instead of using the squash method.

@trasc
Copy link
Contributor Author

trasc commented Aug 18, 2023

@trasc Although I don't have strong objections, what is the motivation?

To skip the squash step in the context of https://github.com/kubernetes/community/blob/5d54720c251baa4f15ec8a14b36e61afd0d48f58/sig-scheduling/CONTRIBUTING.md?plain=1#L62-L63

@trasc
Copy link
Contributor Author

trasc commented Aug 18, 2023

I'm wondering if we should use the squash method as a default. Because there are situations that the merge method is helpful instead of using the squash method.

The method could be changed for each PR by adding one of the labels:

https://github.com/kubernetes/test-infra/blob/bd6cac2691cb8f0033ad2bf1dcf667aed1b1da58/config/prow/config.yaml#L789-L791C39

@tenzen-y
Copy link
Member

I'm wondering if we should use the squash method as a default. Because there are situations that the merge method is helpful instead of using the squash method.

The method could be changed for each PR by adding one of the labels:

https://github.com/kubernetes/test-infra/blob/bd6cac2691cb8f0033ad2bf1dcf667aed1b1da58/config/prow/config.yaml#L789-L791C39

Yes, it's correct. However, I think it is easy to change the merge method to the squash by adding a label rather than changing the merge method to the merge. Since contributors opened the PR need to do some work like organizing and splitting commits, for changing the merge method to merge by adding a label.

@trasc
Copy link
Contributor Author

trasc commented Aug 18, 2023

However, the document also says: https://github.com/kubernetes/community/blob/5d54720c251baa4f15ec8a14b36e61afd0d48f58/sig-scheduling/CONTRIBUTING.md?plain=1#L65

* Squash the commits when the PR is ready to merge, this does a great favor for the git history.

when the PR is ready to merge is not a real state, I always hope my PR's are ready to merge when I request the review.

@alculquicondor
Copy link
Member

alculquicondor commented Aug 18, 2023

What about doing this? #22663

It would allow us to add /approve /lgtm /hold and request a manual squash. The author can squash and release the hold without requiring another lgtm.
A manual squash is sometimes useful when there are way too many commits and the commit message wouldn't be very meaningful, like it was requested here kubernetes/website#42381 (comment)

I know we haven't been very consistent with this, but we could improve.

@alculquicondor
Copy link
Member

I guess we can have both
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 18, 2023
@trasc
Copy link
Contributor Author

trasc commented Aug 18, 2023

/assign @spiffxp

@alculquicondor
Copy link
Member

Since we still need an approval, can you add kueue to the list for store_tree_hash: true?

@tenzen-y
Copy link
Member

It would allow us to add /approve /lgtm /hold and request a manual squash. The author can squash and release the hold without requiring another lgtm.
A manual squash is sometimes useful when there are way too many commits and the commit message wouldn't be very meaningful, like it was requested here kubernetes/website#42381 (comment)

I know we haven't been very consistent with this, but we could improve.

SGTM

Change the default merge method for kueue to `squash` and
preserve LGTM when squashing.
@trasc trasc force-pushed the kueue-default-merge-method branch from ecddf91 to 9e8a654 Compare August 18, 2023 15:59
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 18, 2023
@trasc
Copy link
Contributor Author

trasc commented Aug 18, 2023

Since we still need an approval, can you add kueue to the list for store_tree_hash: true?

done

@alculquicondor
Copy link
Member

/hold cancel
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 18, 2023
@alculquicondor
Copy link
Member

/unassign spiffxp
/assign wojtek-t

@k8s-ci-robot k8s-ci-robot assigned wojtek-t and unassigned spiffxp Aug 22, 2023
@wojtek-t
Copy link
Member

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor, trasc, wojtek-t

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 Sep 11, 2023
@k8s-ci-robot k8s-ci-robot merged commit 46e4e5d into kubernetes:master Sep 11, 2023
@k8s-ci-robot
Copy link
Contributor

@trasc: Updated the following 2 configmaps:

  • config configmap in namespace default at cluster test-infra-trusted using the following files:
    • key config.yaml using file config/prow/config.yaml
  • plugins configmap in namespace default at cluster test-infra-trusted using the following files:
    • key plugins.yaml using file config/prow/plugins.yaml

In response to this:

Change the default merge method for kueue to squash

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.

@trasc trasc deleted the kueue-default-merge-method branch September 27, 2023 12:00
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. area/config Issues or PRs related to code in /config cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants