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

Improve pre-commit UX part 2 #5329

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

nawazkh
Copy link
Member

@nawazkh nawazkh commented Dec 10, 2024

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
This PR updates the below.

  • run go-test in pre-push stage

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Part of #5318

Special notes for your reviewer:

  • A sample git push would look like below. Note: it took me 3 mins to finish the push
~/msftcode/cluster-api-provider-azure on improve-pre-commit-ux *4                                                                                         took 13s at 01:35:26 PM
❯ ggpush --force
Run make verify-modules..................................................Passed
Run make verify-gen......................................................Passed
Run make verify-shellcheck...............................................Passed
Run make verify-conversions..............................................Passed
Run make verify-tiltfile.................................................Passed
Run make go-test.........................................................Passed
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 10 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 573 bytes | 573.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To github.com:nawazkh/cluster-api-provider-azure.git
 + 5348dcc15...71103553f improve-pre-commit-ux -> improve-pre-commit-ux (forced update)

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests
  • cherry-pick candidate

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Dec 10, 2024
@nawazkh nawazkh requested a review from bryan-cox December 10, 2024 20:05
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 10, 2024
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 10, 2024
@nawazkh
Copy link
Member Author

nawazkh commented Dec 10, 2024

/cc @mboersma

Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.51%. Comparing base (4b18ac2) to head (9fa2b4a).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5329      +/-   ##
==========================================
- Coverage   52.53%   52.51%   -0.02%     
==========================================
  Files         272      272              
  Lines       29422    29431       +9     
==========================================
  Hits        15457    15457              
- Misses      13166    13172       +6     
- Partials      799      802       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bryan-cox
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 10, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 21162b98cfaf4b2296e855cc67b97081d9b51bc4

Copy link
Contributor

@mboersma mboersma left a comment

Choose a reason for hiding this comment

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

go test -race used to be a lot slower than just go test. Does this add a lot of time to committing? We need to keep it snappy if we want developers in general to use this.

.pre-commit-config.yaml Outdated Show resolved Hide resolved
@nawazkh
Copy link
Member Author

nawazkh commented Dec 10, 2024

Does this add a lot of time to committing?

Committing is still snappy. Current changes run go test in pre-push stage, so committing is still snappy. And the pre-push stage took 5 mins for me.
verify-gen and lint were the slow runners.

go test -race used to be a lot slower than just go test.

Oh. I did not look into the time delay due to race detector enabled. Lemme change it to make go-test instead.

@nawazkh nawazkh force-pushed the improve-pre-commit-ux branch from 5348dcc to 7110355 Compare December 10, 2024 21:39
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 10, 2024
@nawazkh nawazkh requested a review from mboersma December 10, 2024 21:39
@bryan-cox
Copy link
Contributor

@nawazkh - you might want to update your commit message now.

Copy link
Contributor

@mboersma mboersma 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

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 10, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: c478537d940437f610c2a79230ccb32f8733b744

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mboersma

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 Dec 10, 2024
@nawazkh
Copy link
Member Author

nawazkh commented Dec 10, 2024

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 10, 2024
- run go test in pre push stage
@nawazkh nawazkh force-pushed the improve-pre-commit-ux branch from 7110355 to 9fa2b4a Compare December 10, 2024 22:18
@nawazkh
Copy link
Member Author

nawazkh commented Dec 10, 2024

@nawazkh - you might want to update your commit message now.

Updated the commit message, ready to ship.

@nawazkh
Copy link
Member Author

nawazkh commented Dec 10, 2024

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 10, 2024
@bryan-cox
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot merged commit 61c6f3f into kubernetes-sigs:main Dec 10, 2024
21 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.18 milestone Dec 10, 2024
@nawazkh nawazkh deleted the improve-pre-commit-ux branch December 11, 2024 00:24
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants