Skip to content

Conversation

@Wangdai-0800
Copy link
Collaborator

No description provided.

@Wangdai-0800 Wangdai-0800 force-pushed the service_discover branch 3 times, most recently from f307f7d to fe28e1c Compare November 12, 2025 13:34
@Wangdai-0800 Wangdai-0800 force-pushed the service_discover branch 6 times, most recently from bdb78a8 to 5f533ea Compare November 13, 2025 07:09
@Wangdai-0800 Wangdai-0800 force-pushed the service_discover branch 5 times, most recently from b974eb4 to 05c0f1e Compare November 14, 2025 08:34
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

managertypes "github.com/aigw-project/aigw/pkg/aigateway/clustermanager/types"
Copy link
Contributor

Choose a reason for hiding this comment

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

it's not a good idea to reuse the static discovery, introduce a new implementation should be better.
For the code reusing we may introduce a common xds server to avoding copying code, it could be another PR as the second step.

@doujiang24
Copy link
Contributor

@Wangdai-0800 it's not a good idea to use force push, it makes review changes harder.


// updata the snapshot form istio
func (p *StaticClusterProvider) AutoUpdateFromPilot(nodeID string, interval time.Duration) {
go func() {
Copy link

@amazingapple amazingapple Nov 13, 2025

Choose a reason for hiding this comment

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

The AutoUpdateFromPilot function lacks an exit mechanism. It is recommended to use a for+select loop to ensure it can exit at least when context.Done() is triggered.

s.responseChan <- resp
}

func (s *cdsServerImpl) processSubscribedClusters(subscribeClusters []string) {
Copy link

@amazingapple amazingapple Nov 13, 2025

Choose a reason for hiding this comment

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

Add some INFO logs in the key steps to facilitate issue troubleshooting.

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.

5 participants