-
Notifications
You must be signed in to change notification settings - Fork 2
fix: merge duplicate ssl object when translate gateway #139
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
Conversation
Signed-off-by: ashing <[email protected]>
conformance test reportapiVersion: gateway.networking.k8s.io/v1
date: "2025-05-14T09:59:43Z"
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:
- GatewaySecretInvalidReferenceGrant
- GatewaySecretMissingReferenceGrant
- HTTPRouteHTTPSListener
- HTTPRouteInvalidCrossNamespaceBackendRef
- HTTPRouteInvalidReferenceGrant
- HTTPRoutePartiallyInvalidViaInvalidReferenceGrant
- HTTPRouteReferenceGrant
statistics:
Failed: 0
Passed: 26
Skipped: 7
name: GATEWAY-HTTP
summary: Core tests partially succeeded with 7 test skips. |
Signed-off-by: ashing <[email protected]>
There was a problem hiding this 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 aims to fix conformance test issues by reducing the initialization synchronization delay and enhancing the SSL merging logic in the ADC translator. Key changes include:
- Reducing the InitSyncDelay from 30 minutes to 1 minute within the test suite.
- Adding debug logging and implementing a merge function for SSL objects with identical IDs.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test/conformance/suite_test.go | Reduced the initialization synchronization delay to speed up test execution. |
| internal/provider/adc/translator/gateway.go | Added debug logs and a function to merge SSL objects with duplicate IDs. |
Comments suppressed due to low confidence (1)
test/conformance/suite_test.go:162
- Consider adding a comment to explain the rationale behind reducing InitSyncDelay from 30 minutes to 1 minute so that future maintainers understand this test-specific configuration.
InitSyncDelay: 1 * time.Minute,
Signed-off-by: ashing <[email protected]>
There was a problem hiding this 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 fixes an issue where duplicate SSL objects were not merged during gateway translation. Key changes include:
- Reducing the test suite's sync delay from 30 minutes to 1 minute.
- Adding a new mergeSSLWithSameID function to consolidate duplicate SSL objects.
- Introducing debug logging for generated SSL IDs.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/conformance/suite_test.go | Reduced the initialization sync delay to speed up test execution |
| internal/provider/adc/translator/gateway.go | Added a function to merge duplicate SSL objects and enhanced logging |
Comments suppressed due to low confidence (1)
internal/provider/adc/translator/gateway.go:277
- Consider adding unit tests for the mergeSSLWithSameID function to validate its behavior with various duplicate SSL scenarios.
mergedSSL := make([]*adctypes.SSL, 0, len(sslMap))
| } | ||
| } | ||
|
|
||
| // mergeSSLWithSameID merge ssl with same id |
Copilot
AI
May 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider revising the function comment to 'Merge SSL objects with identical IDs' for improved clarity.
Type of change:
What this PR does / why we need it:
Pre-submission checklist: