Skip to content

Conversation

@barbacbd
Copy link
Contributor

@barbacbd barbacbd commented Dec 1, 2025

pkg/agent/logging.go:
QF1006: could lift into loop condition
Skip lint check.

pkg/asset/manifests/azure/cluster.go:
QF1003: could use tagged switch on subnetType
Use a switch instead of if-else

pkg/infrastructure/azure/storage.go:
QF1007: could merge conditional assignment into variable declaration

pkg/infrastructure/baremetal/image.go:
QF1009: probably want to use time.Time.Equal instead Use function for time.Equal rather than ==.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Dec 1, 2025
@openshift-ci-robot
Copy link
Contributor

@barbacbd: This pull request explicitly references no jira issue.

In response to this:

pkg/agent/logging.go:
QF1006: could lift into loop condition
Skip lint check.

pkg/asset/manifests/azure/cluster.go:
QF1003: could use tagged switch on subnetType
Use a switch instead of if-else

pkg/infrastructure/azure/storage.go:
QF1007: could merge conditional assignment into variable declaration

pkg/infrastructure/baremetal/image.go:
QF1009: probably want to use time.Time.Equal instead Use function for time.Equal rather than ==.

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 openshift-ci bot requested review from elfosardo and jhixson74 December 1, 2025 19:12
@barbacbd
Copy link
Contributor Author

barbacbd commented Dec 1, 2025

Adding some context here:

The following PR was opened to update the golangci-lint used in the installer. Then the PR was opened to update the CI side. This PR will fix the "Quick Fix" issues raised by the update to the installer. We will skip certain errors but these are found and needed to be fixed.

pkg/agent/logging.go:
QF1006: could lift into loop condition
Skip lint check.

pkg/asset/manifests/azure/cluster.go:
QF1003: could use tagged switch on subnetType
Use a switch instead of if-else

pkg/infrastructure/azure/storage.go:
QF1007: could merge conditional assignment into variable declaration

pkg/infrastructure/baremetal/image.go:
QF1009: probably want to use time.Time.Equal instead
Use function for time.Equal rather than ==.
Copy link
Member

@tthvo tthvo left a comment

Choose a reason for hiding this comment

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

I think we need to update ./hack/go-lint.sh to point to the new v2 config:

golangci-lint run -v --new-from-rev=dcf8122 "${@}"

There seems to be a few more to fix 👇

pkg/asset/agent/common/infraenv.go:1:9: var-naming: avoid meaningless package names (revive)
package common
        ^
pkg/types/common/common.go:1:9: var-naming: avoid meaningless package names (revive)
package common
        ^
pkg/utils/vmware.go:1:9: var-naming: avoid meaningless package names (revive)
package utils
        ^
3 issues:
* revive: 3

Copy link
Member

@tthvo tthvo left a comment

Choose a reason for hiding this comment

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

/approve

Local test showed v2 go-lint is happy.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 2, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tthvo

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 2, 2025
@tthvo
Copy link
Member

tthvo commented Dec 3, 2025

/retest

@tthvo
Copy link
Member

tthvo commented Dec 3, 2025

I ran lint locally with this PR + the new v2 config: There is no more lint issues reported as of now (i.e. other PR merge might introduce more).

level=info msg="[runner] linters took 1m33.559256263s with stages: goanalysis_metalinter: 59.145944699s"
level=info msg="File cache stats: 0 entries of total size 0B"
level=info msg="Memory: 2285 samples, avg is 3236.2MB, max is 17982.2MB"
level=info msg="Execution took 4m5.920901178s"
0 issues.

The changes also match with the complaints from rehearsal: rehearse-72011-pull-ci-openshift-installer-main-golint/1995877671170478080.

/verified by local-lint-runs

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Dec 3, 2025
@openshift-ci-robot
Copy link
Contributor

@tthvo: This PR has been marked as verified by local-lint-runs.

In response to this:

I ran lint locally with this PR + the new v2 config: There is no more lint issues reported as of now (i.e. other PR merge might introduce more).

level=info msg="[runner] linters took 1m33.559256263s with stages: goanalysis_metalinter: 59.145944699s"
level=info msg="File cache stats: 0 entries of total size 0B"
level=info msg="Memory: 2285 samples, avg is 3236.2MB, max is 17982.2MB"
level=info msg="Execution took 4m5.920901178s"
0 issues.

The changes also match with the complaints from rehearsal: rehearse-72011-pull-ci-openshift-installer-main-golint/1995877671170478080.

/verified by local-lint-runs

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.

@barbacbd
Copy link
Contributor Author

barbacbd commented Dec 3, 2025

/retest-required

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 3, 2025

@barbacbd: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-agent-compact-ipv4-iso-no-registry 1a338cf link false /test e2e-agent-compact-ipv4-iso-no-registry
ci/prow/e2e-metal-assisted 1a338cf link false /test e2e-metal-assisted
ci/prow/e2e-azurestack 1a338cf link false /test e2e-azurestack
ci/prow/e2e-metal-ovn-two-node-fencing 1a338cf link false /test e2e-metal-ovn-two-node-fencing
ci/prow/e2e-agent-two-node-fencing-ipv4 1a338cf link false /test e2e-agent-two-node-fencing-ipv4
ci/prow/e2e-azure-ovn-shared-vpc 1a338cf link false /test e2e-azure-ovn-shared-vpc

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.

@barbacbd
Copy link
Contributor Author

barbacbd commented Dec 3, 2025

/hold

This is a nice to have and will be looked at again after release.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 3, 2025
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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants