Skip to content

Conversation

@dspo
Copy link
Contributor

@dspo dspo commented May 9, 2025

fix test case:
https://github.com/kubernetes-sigs/gateway-api/blob/main/conformance/tests/httproute-invalid-cross-namespace-parent-ref.go#L35-L70

Simplify the logic for setting HTTPRoute status conditions by introducing helper functions and improving cross-namespace validation. The changes include refactoring condition status updates, adding proper namespace checks for ParentRef, and streamlining the status update process in the HTTPRoute controller.

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

Simplify the logic for setting HTTPRoute status conditions by introducing helper functions and improving cross-namespace validation. The changes include refactoring condition status updates, adding proper namespace checks for ParentRef, and streamlining the status update process in the HTTPRoute controller.
@dspo dspo changed the title chore: Refactor HTTPRoute status handling and condition setting (WIP)chore: Refactor HTTPRoute status handling and condition setting May 9, 2025
…ance-test-case-HTTPRouteInvalidCrossNamespaceParentRef

# Conflicts:
#	internal/controller/utils.go
#	test/conformance/conformance_test.go
@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2025

conformance test report

apiVersion: gateway.networking.k8s.io/v1
date: "2025-05-13T08:52:48Z"
gatewayAPIChannel: standard
gatewayAPIVersion: v1.2.0
implementation:
  contact: null
  organization: APISIX
  project: apisix-ingress-controller
  url: https://github.com/apache/apisix-ingress-controller.git
  version: v2.0.0
kind: ConformanceReport
mode: default
profiles:
- core:
    result: partial
    skippedTests:
    - GatewayInvalidTLSConfiguration
    - GatewaySecretInvalidReferenceGrant
    - GatewaySecretMissingReferenceGrant
    - HTTPRouteHTTPSListener
    - HTTPRouteInvalidCrossNamespaceBackendRef
    - HTTPRouteInvalidReferenceGrant
    - HTTPRoutePartiallyInvalidViaInvalidReferenceGrant
    - HTTPRouteReferenceGrant
    statistics:
      Failed: 0
      Passed: 25
      Skipped: 8
  name: GATEWAY-HTTP
  summary: Core tests partially succeeded with 8 test skips.

Removed hardcoded conformance tests and introduced a dedicated function `SetRouteConditionResolvedRefs` for managing resolved references conditions. Additionally, disabled an unstable test case related to HTTPRoutePolicy status changes for further investigation.
@dspo dspo changed the title (WIP)chore: Refactor HTTPRoute status handling and condition setting fix: conformance test case: HTTPRouteInvalidCrossNamespaceParentRef May 12, 2025
dspo added 2 commits May 12, 2025 09:41
Re-enable the `HTTPRouteInvalidBackendRefUnknownKind` test case by uncommenting it, while also commenting out two other test cases (`HTTPRouteMatching` and `HTTPRouteMatchingAcrossRoutes`) to adjust the test suite configuration. These changes refine the test selection to focus on specific conformance scenarios.
@dspo dspo requested a review from ronething May 12, 2025 02:41
@dspo dspo marked this pull request as draft May 12, 2025 05:36
@dspo dspo marked this pull request as ready for review May 12, 2025 07:06
@dspo dspo marked this pull request as draft May 12, 2025 09:34
@dspo dspo marked this pull request as ready for review May 12, 2025 12:55
@dspo dspo requested a review from AlinsRan May 13, 2025 01:04
…ance-test-case-HTTPRouteInvalidCrossNamespaceParentRef

# Conflicts:
#	internal/controller/httproute_controller.go
#	internal/controller/utils.go
#	test/conformance/conformance_test.go
dspo added 2 commits May 13, 2025 12:22
…ance-test-case-HTTPRouteInvalidCrossNamespaceParentRef

# Conflicts:
#	test/conformance/conformance_test.go
@dspo dspo merged commit c9d2f9d into release-v2-dev May 13, 2025
9 checks passed
@dspo dspo deleted the fix/conformance-test-case-HTTPRouteInvalidCrossNamespaceParentRef branch June 23, 2025 07:27
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.

4 participants