Skip to content

Conversation

@Aias00
Copy link
Contributor

@Aias00 Aias00 commented Jan 16, 2026

Ⅰ. Describe what this PR did

improve ingress sorting

Ⅱ. Does this pull request fix one issue?

fixes #3327

Ⅲ. Why don't you add test cases (unit test/integration test)?

yes

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

Ⅵ. AI Coding Tool Usage Checklist (if applicable)

Please check all applicable items:

  • For new standalone features (e.g., new wasm plugin or golang-filter plugin):

    • I have created a design/ directory in the plugin folder
    • I have added the design document to the design/ directory
    • I have included the AI Coding summary below
  • For regular updates/changes (not new plugins):

    • I have provided the prompts/instructions I gave to the AI Coding tool below
    • I have included the AI Coding summary below

AI Coding Prompts (for regular updates)

AI Coding Summary

…y variants and add codebase analysis documentation.
Copilot AI review requested due to automatic review settings January 16, 2026 06:15
Copy link

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 fixes ingress sorting to ensure base ingress resources are prioritized over canary variants when they have the same creation timestamp. The sorting key is changed from Name.Namespace to Namespace.Name format.

Changes:

  • Modified sorting logic to use Namespace.Name instead of Name.Namespace for tie-breaking when timestamps are equal
  • Updated documentation to clarify the sorting behavior for canary ingress resources
  • Added comprehensive test case to verify canary ingress sorting behavior

Reviewed changes

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

File Description
pkg/ingress/kube/common/tool.go Changed sorting concatenation order from Name.Namespace to Namespace.Name and updated function documentation
pkg/ingress/kube/common/tool_test.go Added test case to verify base ingress is sorted before canary variants with the same namespace

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant