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

🌱 Run GitHub workflows on all pull requests #5723

Conversation

CecileRobertMichon
Copy link
Contributor

What this PR does / why we need it: Run github actions for lint on all PRs, regardless of branch (including release branches). ref #5718 (comment)

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

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 23, 2021
@@ -1,12 +1,8 @@
name: Check Markdown links

on:
push:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was running as post submit, I don't think anyone is paying attention to it though. Running in PRs is enough IMO.

Copy link
Contributor Author

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

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

@CecileRobertMichon
Copy link
Contributor Author

Once this merges, we should backport it to release branches

@sbueringer
Copy link
Member

Thx!
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 23, 2021
@sbueringer
Copy link
Member

sbueringer commented Nov 23, 2021

/cherry-pick release-1.0

@k8s-infra-cherrypick-robot

@sbueringer: once the present PR merges, I will cherry-pick it on top of release-1.0 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.0
/cherry-pick release-0.4
/cherry-pick release-0.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.

@sbueringer
Copy link
Member

/cherry-pick release-0.4

@k8s-infra-cherrypick-robot

@sbueringer: once the present PR merges, I will cherry-pick it on top of release-0.4 in a new PR and assign it to you.

In response to this:

/cherry-pick release-0.4

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.

@sbueringer
Copy link
Member

/cherry-pick release-0.3

@k8s-infra-cherrypick-robot

@sbueringer: once the present PR merges, I will cherry-pick it on top of release-0.3 in a new PR and assign it to you.

In response to this:

/cherry-pick release-0.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.

Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

/lgtm

Comment on lines -5 to -6
branches:
- main
Copy link
Member

Choose a reason for hiding this comment

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

Q: from which branch the linter config will be taken? from main or from the target branch?
Q: If I got this right, we are going to run a newer version of lint on old branches (previously checked with older versions). Could this introduce some problem?

Copy link
Member

@sbueringer sbueringer Nov 24, 2021

Choose a reason for hiding this comment

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

First Q. I think ~ target branch:

The .github/workflows directory in your repository is searched for workflow files at the associated commit SHA or Git ref. The workflow files must be present in that commit SHA or Git ref to be considered.

For example, if the event occurred on a particular repository branch, then the workflow files must be present in the repository on that branch.
https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#example-using-multiple-events-with-activity-types-or-configuration

If I understood it correctly: Second Q.: it would use the version which is specified in the workflow file of the base/main/release branch. Or probably more precise the version which is configured in the last commit of the PR, but as long as the commit doesn't change the version it should be the same as on the base/main/release branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What @sbueringer said is correct. We would still be running the same version of lint that's checked in in the old branches. In order to validate that we can look at the golangci-lint job that will run on the backports of this PR on the release branch.

Copy link
Member

Choose a reason for hiding this comment

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

thanks for the clarification!

Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vincepri

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 Nov 29, 2021
@k8s-ci-robot k8s-ci-robot merged commit c50e5ba into kubernetes-sigs:main Nov 29, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.1 milestone Nov 29, 2021
@k8s-infra-cherrypick-robot

@sbueringer: #5723 failed to apply on top of branch "release-1.0":

Applying: Run GitHub workflows on all pull requests
Using index info to reconstruct a base tree...
M	.github/workflows/golangci-lint.yml
A	.github/workflows/lint-docs.yaml
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): .github/workflows/lint-docs.yaml deleted in HEAD and modified in Run GitHub workflows on all pull requests. Version Run GitHub workflows on all pull requests of .github/workflows/lint-docs.yaml left in tree.
Auto-merging .github/workflows/golangci-lint.yml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Run GitHub workflows on all pull requests
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.0

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.

@k8s-infra-cherrypick-robot

@sbueringer: #5723 failed to apply on top of branch "release-0.4":

Applying: Run GitHub workflows on all pull requests
Using index info to reconstruct a base tree...
M	.github/workflows/golangci-lint.yml
A	.github/workflows/lint-docs.yaml
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): .github/workflows/lint-docs.yaml deleted in HEAD and modified in Run GitHub workflows on all pull requests. Version Run GitHub workflows on all pull requests of .github/workflows/lint-docs.yaml left in tree.
Auto-merging .github/workflows/golangci-lint.yml
CONFLICT (content): Merge conflict in .github/workflows/golangci-lint.yml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Run GitHub workflows on all pull requests
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-0.4

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.

@k8s-infra-cherrypick-robot

@sbueringer: #5723 failed to apply on top of branch "release-0.3":

Applying: Run GitHub workflows on all pull requests
Using index info to reconstruct a base tree...
A	.github/workflows/golangci-lint.yml
A	.github/workflows/lint-docs.yaml
A	.github/workflows/verify.yml
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): .github/workflows/verify.yml deleted in HEAD and modified in Run GitHub workflows on all pull requests. Version Run GitHub workflows on all pull requests of .github/workflows/verify.yml left in tree.
CONFLICT (modify/delete): .github/workflows/lint-docs.yaml deleted in HEAD and modified in Run GitHub workflows on all pull requests. Version Run GitHub workflows on all pull requests of .github/workflows/lint-docs.yaml left in tree.
CONFLICT (modify/delete): .github/workflows/golangci-lint.yml deleted in HEAD and modified in Run GitHub workflows on all pull requests. Version Run GitHub workflows on all pull requests of .github/workflows/golangci-lint.yml left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Run GitHub workflows on all pull requests
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-0.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. 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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants