CCIP-11855 client_id + name for aggregator client#1236
Open
bukata-sa wants to merge 2 commits into
Open
Conversation
592d14c to
27c8662
Compare
|
Code coverage report:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates aggregator client configuration to support a separate “client name” (for display/logging) alongside the stable client ID, and updates devenv configs/tests accordingly.
Changes:
- Replaced
ClientConfig.DescriptionwithClientConfig.Nameand addedGetClientName()(fallbacks toClientIDwhen empty). - Updated HMAC auth middleware logging to use
GetClientName()and adjusted related mocks/tests. - Removed
description = ...entries from devenv TOML configs (converted to comments).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| build/devenv/services/aggregator.go | Stops emitting client description into generated aggregator config; currently does not populate ClientConfig.Name. |
| build/devenv/env.toml | Replaces per-client description fields with comments. |
| build/devenv/env-phased.toml | Replaces description with comments; introduces incorrect TOML table paths for api_clients in the first committeeccv aggregator block. |
| build/devenv/env-cl-16.toml | Replaces per-client description fields with comments. |
| aggregator/tests/utils.go | Updates integration test server config to no longer set Description. |
| aggregator/pkg/model/config.go | Replaces Description with Name and adds GetClientName() fallback logic. |
| aggregator/pkg/model/config_test.go | Updates mock to satisfy the new GetClientName() interface requirement. |
| aggregator/pkg/middlewares/hmac_auth_middleware.go | Logs client “name” (fallbacks to ID) instead of always logging client ID. |
| aggregator/pkg/middlewares/hmac_auth_middleware_test.go | Updates mock to satisfy the new GetClientName() interface requirement. |
| aggregator/pkg/auth/client.go | Extends ClientConfig interface with GetClientName(). |
Comments suppressed due to low confidence (1)
build/devenv/services/aggregator.go:280
- ClientConfig gained a Name field, but the devenv config generation no longer sets any human-readable name for clients (and removed Description). If the intent is to support distinct display names (per PR title), the generator should populate ClientConfig.Name from input (e.g., a new
namefield in AggregatorClientConfig / env TOML) so it survives into the rendered aggregator config.
for _, client := range a.APIClients {
config.APIClients = append(config.APIClients, &model.ClientConfig{
ClientID: client.ClientID,
Enabled: client.Enabled,
Groups: client.Groups,
APIKeyPairs: make([]*model.APIKeyPairEnv, 0, len(client.APIKeyPairs)),
})
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
carte7000
previously approved these changes
Jul 6, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
aggregator/pkg/auth/client.go:20
- PR description says
GetClientName()is exposed on theAPIKeyPairinterface, but the change here adds it toClientConfig. Please align the PR description (or, if the intent really isAPIKeyPair, update the code accordingly).
// ClientConfig provides access to client configuration.
type ClientConfig interface {
// GetClientID returns the unique client identifier.
GetClientID() string
// GetClientName returns the client text representation.
GetClientName() string
// GetGroups returns the list of groups the client belongs to.
GetGroups() []string
// IsEnabled returns whether the client is enabled.
IsEnabled() bool
a2c248e to
5ac3ee0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
namefield toClientConfig, replacingdescriptionfor human-readable client identification.GetClientName()onAPIKeyPairinterface; falls back toclient_idwhennameis unset.GetClientName()in HMAC auth middleware log output instead ofGetClientID().env.toml,env-phased.toml,env-cl-16.toml) fromdescriptionto inline comments; addnamefield matching the client alias where appropriate.Testing
tested metrics in grafana
Checklist
changelogdirectory)just lint fix- no new lint errorsjust generate- mocks and protobufs are up to date