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

Add pipefail for etcd verify presubmit #32563

Merged
merged 1 commit into from
May 5, 2024
Merged

Conversation

jmhbnz
Copy link
Member

@jmhbnz jmhbnz commented May 4, 2024

As part of the etcd make verify, golangci-lint installs successfully:

golangci/golangci-lint info checking GitHub for tag 'v1.57.2'
golangci/golangci-lint info found version: 1.57.2 for v1.57.2/linux/amd64
golangci/golangci-lint info installed /home/prow/go/bin/golangci-lint 

Yet then goes on to error saying golangci-lint not found:

 PASSES="lint" ./scripts/test.sh
Running with --race
Starting at: Sat May  4 05:21:19 UTC 2024
              
'lint' started at Sat May  4 05:21:19 UTC 2024
% (cd api && 'golangci-lint' 'run' '--config' '/home/prow/go/src/github.com/etcd-io/etcd/tools/.golangci.yaml' './...')
stderr: ./scripts/test_lib.sh: line 148: golangci-lint: command not found
�[0;31mFAIL: (code:127):
  % (cd api && 'golangci-lint' 'run' '--config' '/home/prow/go/src/github.com/etcd-io/etcd/tools/.golangci.yaml' './...') 

Interestingly the job passes despite this failure. I think we should align with github actions where this does fail, the only difference I can see is that in github actions we set pipefail before calling make verify.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 4, 2024
@k8s-ci-robot k8s-ci-robot requested a review from ahrtr May 4, 2024 07:06
@k8s-ci-robot k8s-ci-robot added the area/config Issues or PRs related to code in /config label May 4, 2024
@k8s-ci-robot k8s-ci-robot requested a review from serathius May 4, 2024 07:06
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. area/jobs size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. sig/etcd Categorizes an issue or PR as relevant to SIG Etcd. sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels May 4, 2024
@liangyuanpeng
Copy link
Contributor

link to the issue:

@jmhbnz
Copy link
Member Author

jmhbnz commented May 4, 2024

link to the issue:

* [Investigate pull-etcd-verify golangci-lint not found etcd-io/etcd#17637](https://github.com/etcd-io/etcd/issues/17637)

Thanks - For this PR I just want to test if we can fix the job not failing. We will need a further pr / investigation into why the golangci-lint command is not found.

Copy link
Member

@ivanvc ivanvc left a comment

Choose a reason for hiding this comment

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

Hi @jmhbnz, thanks for investigating why it was failing. As part of etcd-io/etcd#17929 (and unaware that etcd-io/etcd#17637 existed). I investigated why golangci-lint was failing. My suggestion addresses this issue and will avoid having failure builds until a follow-up PR.

However, if you think it's better to address it in a follow-up, we can do it that way. Let me know what you think.

config/jobs/etcd/etcd-presubmits.yaml Outdated Show resolved Hide resolved
@ivanvc
Copy link
Member

ivanvc commented May 4, 2024

I just verified that it has a different message at the exit with your changes 🎉 (note the last line, that wasn't in previous runs):

FAIL: 'go_fmt_for_package ./...' checking failed (!=0 return code)
There was a Failure in module api, aborting...
FAIL: 'gofmt' FAILED at Sat May  4 14:50:52 UTC 2024
make: *** [Makefile:66: verify-gofmt] Error 255
{"component":"entrypoint","error":"wrapped process failed: exit status 2","file":"k8s.io/test-infra/prow/entrypoint/run.go:84","func":"k8s.io/test-infra/prow/entrypoint.Options.internalRun","level":"error","msg":"Error executing test process","severity":"error","time":"2024-05-04T14:50:52Z"}

If you decide to merge without my suggestion, I think it's fine with me, and I can address my suggestion in a follow-up. In that case /lgtm

Copy link
Member

@ivanvc ivanvc left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot
Copy link
Contributor

@ivanvc: changing LGTM is restricted to collaborators

In response to this:

/lgtm

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-sigs/prow repository.

@ivanvc
Copy link
Member

ivanvc commented May 4, 2024

@ivanvc: changing LGTM is restricted to collaborators

Oh yeah, I don't have rights in this repository 😅

@ahrtr
Copy link
Member

ahrtr commented May 5, 2024

/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 May 5, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, ivanvc, jmhbnz

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 merged commit 0dc2e87 into kubernetes:master May 5, 2024
7 checks passed
@k8s-ci-robot
Copy link
Contributor

@jmhbnz: Updated the job-config configmap in namespace default at cluster test-infra-trusted using the following files:

  • key etcd-presubmits.yaml using file config/jobs/etcd/etcd-presubmits.yaml

In response to this:

As part of the etcd make verify, golangci-lint installs successfully:

golangci/golangci-lint info checking GitHub for tag 'v1.57.2'
golangci/golangci-lint info found version: 1.57.2 for v1.57.2/linux/amd64
golangci/golangci-lint info installed /home/prow/go/bin/golangci-lint 

Yet then goes on to error saying golangci-lint not found:

PASSES="lint" ./scripts/test.sh
Running with --race
Starting at: Sat May  4 05:21:19 UTC 2024
             
'lint' started at Sat May  4 05:21:19 UTC 2024
% (cd api && 'golangci-lint' 'run' '--config' '/home/prow/go/src/github.com/etcd-io/etcd/tools/.golangci.yaml' './...')
stderr: ./scripts/test_lib.sh: line 148: golangci-lint: command not found
�[0;31mFAIL: (code:127):
 % (cd api && 'golangci-lint' 'run' '--config' '/home/prow/go/src/github.com/etcd-io/etcd/tools/.golangci.yaml' './...') 

Interestingly the job passes despite this failure. I think we should align with github actions where this does fail, the only difference I can see is that in github actions we set pipefail before calling make verify.

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-sigs/prow repository.

@ahrtr
Copy link
Member

ahrtr commented May 5, 2024

Oh yeah, I don't have rights in this repository

You are already a member an etcd and you are leading the workflow migration to K8s prow together with @jmhbnz , I think it's fair to add you as a K8s member as well. cc @jmhbnz

@jmhbnz
Copy link
Member Author

jmhbnz commented May 5, 2024

Oh yeah, I don't have rights in this repository

You are already a member an etcd and you are leading the workflow migration to K8s prow together with @jmhbnz , I think it's fair to add you as a K8s member as well. cc @jmhbnz

Completely agree - more than happy to be the second sponsor. @ivanvc please complete the issue template here requesting kubernetes and kubernetes-sigs orgs https://github.com/kubernetes/org/issues/new?assignees=&labels=area%2Fgithub-membership&projects=&template=membership.yml&title=REQUEST%3A+New+membership+for+%3Cyour-GH-handle%3E.

@ivanvc
Copy link
Member

ivanvc commented May 12, 2024

Completely agree - more than happy to be the second sponsor. @ivanvc please complete the issue template here requesting kubernetes and kubernetes-sigs org

Done in kubernetes/org#4946. Thanks for the sponsorship guys ❤️

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 area/jobs 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/etcd Categorizes an issue or PR as relevant to SIG Etcd. 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.

5 participants