Skip to content

CCIP-11855 client_id + name for aggregator client#1236

Open
bukata-sa wants to merge 2 commits into
mainfrom
ccip-11855/aggregator-client-name
Open

CCIP-11855 client_id + name for aggregator client#1236
bukata-sa wants to merge 2 commits into
mainfrom
ccip-11855/aggregator-client-name

Conversation

@bukata-sa

@bukata-sa bukata-sa commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Description

  • Add name field to ClientConfig, replacing description for human-readable client identification.
  • Expose GetClientName() on APIKeyPair interface; falls back to client_id when name is unset.
  • Use GetClientName() in HMAC auth middleware log output instead of GetClientID().
  • Migrate all devenv TOML configs (env.toml, env-phased.toml, env-cl-16.toml) from description to inline comments; add name field matching the client alias where appropriate.

Testing

tested metrics in grafana

Checklist

  • Breaking changes documented in changelog (see changelog directory)
  • Cross link related PRs (in this or other repositories)
  • just lint fix - no new lint errors
  • just generate - mocks and protobufs are up to date

@bukata-sa bukata-sa force-pushed the ccip-11855/aggregator-client-name branch from 592d14c to 27c8662 Compare July 6, 2026 12:19
@bukata-sa bukata-sa marked this pull request as ready for review July 6, 2026 12:19
@bukata-sa bukata-sa requested review from a team as code owners July 6, 2026 12:19
Copilot AI review requested due to automatic review settings July 6, 2026 12:19
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Code coverage report:

Package main ccip-11855/aggregator-client-name Diff
github.com/smartcontractkit/chainlink-ccv/aggregator 49.83% 49.43% -0.40%
github.com/smartcontractkit/chainlink-ccv/bootstrap 54.43% 54.43% +0.00%
github.com/smartcontractkit/chainlink-ccv/cli 65.13% 65.13% +0.00%
github.com/smartcontractkit/chainlink-ccv/cmd 13.55% 13.55% +0.00%
github.com/smartcontractkit/chainlink-ccv/common 51.82% 51.84% +0.02%
github.com/smartcontractkit/chainlink-ccv/executor 46.88% 46.88% +0.00%
github.com/smartcontractkit/chainlink-ccv/indexer 35.59% 35.55% -0.04%
github.com/smartcontractkit/chainlink-ccv/integration 46.16% 46.25% +0.09%
github.com/smartcontractkit/chainlink-ccv/pkg 100.00% 100.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/pricer 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/protocol 63.06% 63.06% +0.00%
github.com/smartcontractkit/chainlink-ccv/verifier 35.17% 35.18% +0.01%
Total 46.70% 46.80% +0.10%

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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.Description with ClientConfig.Name and added GetClientName() (fallbacks to ClientID when 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 name field 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.

Comment thread build/devenv/env-phased.toml Outdated
Comment thread build/devenv/env-phased.toml Outdated
Comment thread build/devenv/env-phased.toml Outdated
Comment thread build/devenv/env-phased.toml Outdated
Comment thread aggregator/pkg/model/config.go
carte7000
carte7000 previously approved these changes Jul 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 the APIKeyPair interface, but the change here adds it to ClientConfig. Please align the PR description (or, if the intent really is APIKeyPair, 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

Comment thread build/devenv/services/aggregator.go
Comment thread build/devenv/env.toml
Comment thread aggregator/pkg/model/config.go
@bukata-sa bukata-sa force-pushed the ccip-11855/aggregator-client-name branch from a2c248e to 5ac3ee0 Compare July 6, 2026 14: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