Skip to content

Conversation

@ronething
Copy link
Contributor

Signed-off-by: ashing [email protected]

Type of change:

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches
  • Documentation
  • Refactor
  • Chore
  • CI/CD or Tests

What this PR does / why we need it:

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

Signed-off-by: ashing <[email protected]>
Signed-off-by: ashing <[email protected]>
Signed-off-by: ashing <[email protected]>
@ronething ronething requested a review from Copilot April 27, 2025 05:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR upgrades the golangci-lint version to v2 and adjusts linter configuration and related code comments to work with the new version. Key changes include:

  • Addition of //nolint:staticcheck comments to suppress linter warnings.
  • Replacement of deprecated function calls and variable naming adjustments.
  • Redefinition of the .golangci.yml configuration structure.

Reviewed Changes

Copilot reviewed 26 out of 27 changed files in this pull request and generated no comments.

File Description
test/e2e/framework/dashboard.go Updated helm chart lookup call using the new API.
pkg/dashboard/cluster.go Renamed an internal error variable to remove the underscore.
.golangci.yml Revised configuration to comply with golangci-lint v2 schema.
(Other files) Addition of //nolint:staticcheck for linter compliance.
Files not reviewed (1)
  • Makefile: Language not supported
Comments suppressed due to low confidence (3)

pkg/dashboard/cluster.go:66

  • The renaming of the error variable to remove the underscore prefix improves consistency; ensure that all references to this variable are updated accordingly.
errReadOnClosedResBody = errors.New("http: read on closed response body")

test/e2e/framework/dashboard.go:280

  • Review the new usage of install.LocateChart against the updated library docs to ensure that the parameters and behavior match the intended functionality.
chartPath, err := install.LocateChart("api7/api7ee3", cli.New())

.golangci.yml:1

  • Verify that the updated .golangci.yml configuration structure (including the new sections and exclusions) is fully supported by your CI environment and golangci-lint v2.
version: "2"

@github-actions
Copy link
Contributor

github-actions bot commented Apr 27, 2025

conformance test report

apiVersion: gateway.networking.k8s.io/v1
date: "2025-04-27T05:31:39Z"
gatewayAPIChannel: standard
gatewayAPIVersion: v1.2.0
implementation:
  contact: null
  organization: API7
  project: api7-ingress-controller
  url: https://github.com/api7/api7-ingress-controller.git
  version: v2.0.0
kind: ConformanceReport
mode: default
profiles:
- core:
    result: partial
    skippedTests:
    - GatewayInvalidTLSConfiguration
    - GatewaySecretInvalidReferenceGrant
    - GatewaySecretMissingReferenceGrant
    - GatewaySecretReferenceGrantAllInNamespace
    - GatewaySecretReferenceGrantSpecific
    - HTTPRouteExactPathMatching
    - HTTPRouteHTTPSListener
    - HTTPRouteHeaderMatching
    - HTTPRouteHostnameIntersection
    - HTTPRouteInvalidBackendRefUnknownKind
    - HTTPRouteInvalidCrossNamespaceBackendRef
    - HTTPRouteInvalidCrossNamespaceParentRef
    - HTTPRouteInvalidNonExistentBackendRef
    - HTTPRouteInvalidParentRefNotMatchingSectionName
    - HTTPRouteInvalidReferenceGrant
    - HTTPRouteListenerHostnameMatching
    - HTTPRouteMatching
    - HTTPRouteMatchingAcrossRoutes
    - HTTPRoutePartiallyInvalidViaInvalidReferenceGrant
    - HTTPRouteReferenceGrant
    - HTTPRouteRequestHeaderModifier
    - HTTPRouteWeight
    statistics:
      Failed: 0
      Passed: 11
      Skipped: 22
  name: GATEWAY-HTTP
  summary: Core tests partially succeeded with 22 test skips.

Signed-off-by: ashing <[email protected]>
Copy link
Contributor

@dspo dspo left a comment

Choose a reason for hiding this comment

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

good job

@ronething ronething merged commit c891c8b into release-v2-dev Apr 27, 2025
8 checks passed
@ronething ronething deleted the chore/upgrade_lint branch April 27, 2025 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants