Skip to content

Conversation

@dspo
Copy link
Contributor

@dspo dspo commented Apr 9, 2025

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:

When generating ids for resources in adc.yaml, there is a chance that an id like 8e287857 will be generated, which adc will recognize as a number and cause an error. We can use a json file instead of a yaml file.

services:
  - hosts:
      - httpbin.example
    id: 8e287857
...

adc lint log

The following errors were found in configuration:
#1 Expected string, received number at service: "ingress-apisix-e2e-tests-default-894183279_httpbin-0006_0", field: "id"

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

@dspo dspo requested a review from Copilot April 9, 2025 01:58
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.

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

Comments suppressed due to low confidence (1)

internal/provider/adc/adc.go:120

  • The code now uses json.Marshal but the 'encoding/json' package is not imported. Please add 'encoding/json' to the import block to avoid build errors.
data, err := json.Marshal(task.Resources)

@github-actions
Copy link
Contributor

github-actions bot commented Apr 9, 2025

conformance test report

apiVersion: gateway.networking.k8s.io/v1
date: "2025-04-09T02:19:53Z"
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:
    failedTests:
    - HTTPRoutePathMatchOrder
    - HTTPRouteSimpleSameNamespace
    result: failure
    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: 2
      Passed: 9
      Skipped: 22
  name: GATEWAY-HTTP
  summary: Core tests failed with 2 test failures.

@dspo dspo requested a review from AlinsRan April 9, 2025 02:31
@dspo dspo merged commit 73f8801 into release-v2-dev Apr 9, 2025
8 checks passed
@AlinsRan AlinsRan deleted the fix/marshal-id-error branch May 8, 2025 07:22
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