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

HOSTEDCP-2176: Introduce golangci-lint to make verify and only turn on gci linter #5322

Merged
merged 7 commits into from
Jan 9, 2025

Conversation

bryan-cox
Copy link
Member

@bryan-cox bryan-cox commented Dec 19, 2024

What this PR does / why we need it:
This PR introduces golangci-lint to make verify. All default linters are turned off at the moment as their is an issue causing the proxy create cluster test to fail that still needs to be tracked down. See #4739 for further details.

However, it would be nice to introduce golangci-lint now and turn on the gci linter so we can ensure all imports are sorted in all files in a consistent fashion. The ordering of the imports can be found in the Enable GCI to sort imports commit.

Which issue(s) this PR fixes:
Initial PR for HOSTEDCP-2176.

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 19, 2024
Copy link
Contributor

openshift-ci bot commented Dec 19, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@bryan-cox
Copy link
Member Author

/test all

@openshift-ci openshift-ci bot added area/ci-tooling Indicates the PR includes changes for CI or tooling area/cli Indicates the PR includes changes for CLI labels Dec 19, 2024
Copy link
Contributor

openshift-ci bot commented Dec 19, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bryan-cox

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 openshift-ci bot added area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/control-plane-pki-operator Indicates the PR includes changes for the control plane PKI operator - in an OCP release approved Indicates a PR has been approved by an approver from all required OWNERS files. area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release and removed do-not-merge/needs-area labels Dec 19, 2024
Copy link
Contributor

openshift-ci bot commented Dec 19, 2024

@bryan-cox: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test e2e-aks
/test e2e-aws
/test e2e-aws-4-18
/test e2e-aws-override
/test e2e-aws-upgrade-hypershift-operator
/test e2e-kubevirt-aws-ovn-reduced
/test images
/test security
/test unit
/test verify

The following commands are available to trigger optional jobs:

/test e2e-aws-metrics
/test e2e-azure-aks-ovn-conformance
/test e2e-conformance
/test e2e-kubevirt-aws-ovn
/test e2e-kubevirt-azure-ovn
/test e2e-kubevirt-metal-conformance
/test e2e-openstack-aws
/test e2e-openstack-aws-conformance
/test e2e-openstack-aws-csi-cinder
/test e2e-openstack-aws-csi-manila
/test e2e-openstack-aws-nfv
/test okd-scos-e2e-aws-ovn
/test okd-scos-images

Use /test all to run the following jobs that were automatically triggered:

pull-ci-openshift-hypershift-main-e2e-aks
pull-ci-openshift-hypershift-main-e2e-aws
pull-ci-openshift-hypershift-main-e2e-aws-4-18
pull-ci-openshift-hypershift-main-e2e-aws-upgrade-hypershift-operator
pull-ci-openshift-hypershift-main-e2e-kubevirt-aws-ovn-reduced
pull-ci-openshift-hypershift-main-images
pull-ci-openshift-hypershift-main-okd-scos-e2e-aws-ovn
pull-ci-openshift-hypershift-main-security
pull-ci-openshift-hypershift-main-unit
pull-ci-openshift-hypershift-main-verify

In response to this:

/test e2e-was

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.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 21, 2024
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 7, 2025
@bryan-cox
Copy link
Member Author

/test all

@bryan-cox bryan-cox changed the title Init golangci HOSTEDCP-2176: Introduce golangci-lint to make verify and only turn on gci linter Jan 7, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 7, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 7, 2025

@bryan-cox: This pull request references HOSTEDCP-2176 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target either version "4.19." or "openshift-4.19.", but it targets "4.18" instead.

In response to this:

What this PR does / why we need it:
This PR introduces golangci-lint to make verify. All default linters are turned off at the moment as their is an issue causing the proxy create cluster test to fail that still needs to be tracked down. See #4739 for further details.

However, it would be nice to introduce golangci-lint now and turn on the gci linter so we can ensure all imports are sorted in all files in a consistent fashion. The ordering of the imports can be found in the _Enable GCI to sort imports commit.

Which issue(s) this PR fixes:
Initial PR for HOSTEDCP-2176.

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 7, 2025

@bryan-cox: This pull request references HOSTEDCP-2176 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target either version "4.19." or "openshift-4.19.", but it targets "4.18" instead.

In response to this:

What this PR does / why we need it:
This PR introduces golangci-lint to make verify. All default linters are turned off at the moment as their is an issue causing the proxy create cluster test to fail that still needs to be tracked down. See #4739 for further details.

However, it would be nice to introduce golangci-lint now and turn on the gci linter so we can ensure all imports are sorted in all files in a consistent fashion. The ordering of the imports can be found in the Enable GCI to sort imports commit.

Which issue(s) this PR fixes:
Initial PR for HOSTEDCP-2176.

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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 openshift-eng/jira-lifecycle-plugin repository.

@bryan-cox
Copy link
Member Author

/test all

@bryan-cox bryan-cox marked this pull request as ready for review January 7, 2025 20:14
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 7, 2025
@openshift-ci openshift-ci bot requested review from davidvossel and hasueki January 7, 2025 20:16
@Patryk-Stefanski
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 8, 2025
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 830af05 and 2 for PR HEAD ba8f52f in total

Add golangci-lint to verify in Makefile so common mistakes are caught in
 presubmit PRs.

Signed-off-by: Bryan Cox <[email protected]>
This commit disables the standard golangci linters for now. There is an
issue with one of the fixes found by one of the lint checkers that I
will submit a follow-up PR for.

Signed-off-by: Bryan Cox <[email protected]>
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 8, 2025
@Patryk-Stefanski
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 8, 2025
@bryan-cox
Copy link
Member Author

/test e2e-aws-4-18

@bryan-cox
Copy link
Member Author

/retest-required

Copy link
Contributor

openshift-ci bot commented Jan 9, 2025

@bryan-cox: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 1986ca3 into openshift:main Jan 9, 2025
15 checks passed
@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

Distgit: hypershift
This PR has been included in build ose-hypershift-container-v4.19.0-202501090738.p0.g1986ca3.assembly.stream.el9.
All builds following this will include this PR.

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/ci-tooling Indicates the PR includes changes for CI or tooling area/cli Indicates the PR includes changes for CLI area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/control-plane-pki-operator Indicates the PR includes changes for the control plane PKI operator - in an OCP release area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants