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

Rewrite commitchecker so it validates bumps as well #24234

Merged
merged 1 commit into from
Dec 2, 2019

Conversation

tnozicka
Copy link
Contributor

/cc @sttts @deads2k

@openshift/sig-master

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. sig/master size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 27, 2019
@sttts
Copy link
Contributor

sttts commented Nov 27, 2019

Naive question: why do we need a full rewrite?

@tnozicka
Copy link
Contributor Author

Naive question: why do we need a full rewrite?

Can't say I wasn't expecting that question. The godeps have been pretty bundled to it and all the function were assuming they never get bump commits.

@tnozicka tnozicka force-pushed the enforce-bumps branch 4 times, most recently from 78fcc86 to ee8636d Compare November 28, 2019 17:10
@tnozicka tnozicka changed the title [WIP] Rewrite commitchecker so it validates bumps as well Rewrite commitchecker so it validates bumps as well Nov 28, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 28, 2019
@tnozicka
Copy link
Contributor Author

/retest

2 similar comments
@sttts
Copy link
Contributor

sttts commented Nov 29, 2019

/retest

@sttts
Copy link
Contributor

sttts commented Dec 2, 2019

/retest

var allErrors []string

if strings.HasPrefix(commit.Email, "root@") {
allErrors = append(allErrors, fmt.Sprintf("Commit %s has invalid email %q", commit.Sha, commit.Email))
Copy link
Contributor

Choose a reason for hiding this comment

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

why strings for errors?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

errors may not start with capital letter

// patchRegexps holds regexps for paths inside vendor dir that are allowed to be patched directly.
// It must corresponds to published repositories.
PatchRegexps = []*regexp.Regexp{
regexp.MustCompile("^k8s.io/.*"),
Copy link
Contributor

Choose a reason for hiding this comment

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

actually only k8s.io/kubernetes. Staging dirs also have that prefix. k8s.io/{utils,kube-openapi,gengo,....} must not be patched.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, looks like we only publish staging dirs, this should match that list

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Technically not even the staging dirs, but just kube. Your linked commit looks good.

@sttts
Copy link
Contributor

sttts commented Dec 2, 2019

/retest
/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 2, 2019
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sttts, tnozicka

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 2, 2019
@openshift-merge-robot openshift-merge-robot merged commit 5f69ab6 into openshift:master Dec 2, 2019
@tnozicka tnozicka deleted the enforce-bumps branch December 3, 2019 08:07
@tnozicka
Copy link
Contributor Author

tnozicka commented Dec 6, 2019

/cherry-pick release-4.3

@openshift-cherrypick-robot

@tnozicka: new pull request created: #24261

In response to this:

/cherry-pick release-4.3

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.

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. sig/master size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants