Skip to content

Commit 6b1456f

Browse files
committed
Merge branch 'INFOPLAT-2963-beholder-rotating-auth-headers-loop-impl' of github.com:smartcontractkit/chainlink-common into INFOPLAT-2963-beholder-rotating-auth-headers-loop-impl
2 parents 2cf0fcf + 7a0497f commit 6b1456f

File tree

12 files changed

+202
-72
lines changed

12 files changed

+202
-72
lines changed

pkg/capabilities/capabilities.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,4 +627,6 @@ type CapabilityConfiguration struct {
627627

628628
// v2 / "NoDAG" capabilities
629629
CapabilityMethodConfig map[string]CapabilityMethodConfig
630+
// if true, the capability won't be callable via don2don
631+
LocalOnly bool
630632
}

pkg/capabilities/pb/registry.pb.go

Lines changed: 13 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/capabilities/pb/registry.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,7 @@ message CapabilityConfig {
8080

8181
// v2 ("NoDAG") capabilities
8282
map<string, CapabilityMethodConfig> method_configs = 7;
83+
// if true, the capability won't be callable via don2don
84+
bool local_only = 8;
8385
}
8486

pkg/chipingress/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ ChipIngress is a gRPC client library for interacting with the ChipIngress servic
88
- **Authentication Support**: Multiple authentication methods including basic auth and token-based auth
99
- **Secure Communication**: Support for both TLS and insecure connections
1010
- **Event Management**: Utilities for creating, converting, and managing CloudEvents
11+
- **OpenTelemetry Integration**: Built-in OpenTelemetry support for distributed tracing and metrics
1112

1213
## Installation
1314

@@ -84,12 +85,60 @@ if err != nil {
8485
}
8586
```
8687

88+
### OpenTelemetry Integration
89+
90+
The client automatically instruments gRPC calls with OpenTelemetry for distributed tracing and metrics.
91+
92+
#### Using Global Providers
93+
94+
By default, the client uses the global OpenTelemetry providers:
95+
96+
```go
97+
import (
98+
"go.opentelemetry.io/otel"
99+
"go.opentelemetry.io/otel/sdk/trace"
100+
)
101+
102+
// Set up your OpenTelemetry tracer provider
103+
tp := trace.NewTracerProvider(...)
104+
otel.SetTracerProvider(tp)
105+
106+
// Create client - it will automatically use the global tracer
107+
client, err := chipingress.NewClient("example.com:9090", chipingress.WithTLS())
108+
```
109+
110+
#### Using Custom Providers
111+
112+
You can also pass custom MeterProvider and TracerProvider instances to the client:
113+
114+
```go
115+
import (
116+
"go.opentelemetry.io/otel/metric"
117+
"go.opentelemetry.io/otel/sdk/metric"
118+
"go.opentelemetry.io/otel/sdk/trace"
119+
"go.opentelemetry.io/otel/trace"
120+
)
121+
122+
// Create custom providers
123+
meterProvider := metric.NewMeterProvider(...)
124+
tracerProvider := trace.NewTracerProvider(...)
125+
126+
// Create client with custom providers
127+
client, err := chipingress.NewClient("example.com:9090",
128+
chipingress.WithTLS(),
129+
chipingress.WithMeterProvider(meterProvider),
130+
chipingress.WithTracerProvider(tracerProvider))
131+
```
132+
133+
The client uses `otelgrpc.NewClientHandler()` to automatically create spans for all gRPC calls, including metrics for request duration, message sizes, and error rates.
134+
87135
## Dependencies
88136

89137
- `github.com/cloudevents/sdk-go/v2` - CloudEvents SDK
90138
- `github.com/google/uuid` - UUID generation
91139
- `google.golang.org/grpc` - gRPC communication
92140
- `google.golang.org/protobuf` - Protocol buffer support
141+
- `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` - OpenTelemetry gRPC instrumentation
93142

94143
## License
95144

pkg/chipingress/client.go

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import (
88
"time"
99

1010
"github.com/google/uuid"
11+
"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
12+
"go.opentelemetry.io/otel/metric"
13+
"go.opentelemetry.io/otel/trace"
1114
"google.golang.org/grpc"
1215
"google.golang.org/grpc/credentials"
1316
"google.golang.org/grpc/credentials/insecure"
@@ -41,6 +44,8 @@ type clientConfig struct {
4144
headerProvider HeaderProvider
4245
insecureConnection bool
4346
host string
47+
meterProvider metric.MeterProvider
48+
tracerProvider trace.TracerProvider
4449
}
4550

4651
func newClientConfig(host string) *clientConfig {
@@ -68,8 +73,18 @@ func NewClient(address string, opts ...Opt) (Client, error) {
6873
for _, opt := range opts {
6974
opt(cfg)
7075
}
76+
// Build otelgrpc handler options
77+
var otelOpts []otelgrpc.Option
78+
if cfg.meterProvider != nil {
79+
otelOpts = append(otelOpts, otelgrpc.WithMeterProvider(cfg.meterProvider))
80+
}
81+
if cfg.tracerProvider != nil {
82+
otelOpts = append(otelOpts, otelgrpc.WithTracerProvider(cfg.tracerProvider))
83+
}
84+
7185
grpcOpts := []grpc.DialOption{
7286
grpc.WithTransportCredentials(cfg.transportCredentials),
87+
grpc.WithStatsHandler(otelgrpc.NewClientHandler(otelOpts...)),
7388
}
7489
// Auth
7590
if cfg.perRPCCredentials != nil {
@@ -162,6 +177,18 @@ func WithTLS() Opt {
162177
}
163178
}
164179

180+
// WithMeterProvider sets a custom OpenTelemetry MeterProvider for metrics collection.
181+
// If not set, the global meter provider will be used.
182+
func WithMeterProvider(provider metric.MeterProvider) Opt {
183+
return func(c *clientConfig) { c.meterProvider = provider }
184+
}
185+
186+
// WithTracerProvider sets a custom OpenTelemetry TracerProvider for distributed tracing.
187+
// If not set, the global tracer provider will be used.
188+
func WithTracerProvider(provider trace.TracerProvider) Opt {
189+
return func(c *clientConfig) { c.tracerProvider = provider }
190+
}
191+
165192
// newHeaderInterceptor creates a unary interceptor that adds headers from a HeaderProvider
166193
func newHeaderInterceptor(provider HeaderProvider) grpc.UnaryClientInterceptor {
167194
return func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {

pkg/chipingress/go.mod

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,31 @@ require (
66
github.com/cloudevents/sdk-go/binding/format/protobuf/v2 v2.16.1
77
github.com/cloudevents/sdk-go/v2 v2.16.1
88
github.com/google/uuid v1.6.0
9-
github.com/stretchr/testify v1.10.0
10-
google.golang.org/grpc v1.72.1
11-
google.golang.org/protobuf v1.36.6
9+
github.com/stretchr/testify v1.11.1
10+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0
11+
go.opentelemetry.io/otel/metric v1.38.0
12+
go.opentelemetry.io/otel/trace v1.38.0
13+
google.golang.org/grpc v1.75.0
14+
google.golang.org/protobuf v1.36.8
1215
)
1316

1417
require (
1518
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
19+
github.com/go-logr/logr v1.4.3 // indirect
20+
github.com/go-logr/stdr v1.2.2 // indirect
1621
github.com/json-iterator/go v1.1.12 // indirect
1722
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
1823
github.com/modern-go/reflect2 v1.0.2 // indirect
1924
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
2025
github.com/stretchr/objx v0.5.2 // indirect
26+
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
27+
go.opentelemetry.io/otel v1.38.0 // indirect
2128
go.uber.org/multierr v1.11.0 // indirect
2229
go.uber.org/zap v1.27.0 // indirect
23-
golang.org/x/net v0.40.0 // indirect
24-
golang.org/x/sys v0.33.0 // indirect
25-
golang.org/x/text v0.25.0 // indirect
26-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250519155744-55703ea1f237 // indirect
30+
golang.org/x/net v0.43.0 // indirect
31+
golang.org/x/sys v0.35.0 // indirect
32+
golang.org/x/text v0.28.0 // indirect
33+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 // indirect
2734
gopkg.in/yaml.v3 v3.0.1 // indirect
2835
)
2936

pkg/chipingress/go.sum

Lines changed: 37 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
66
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
77
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
88
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
9-
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
10-
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
9+
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
10+
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
11+
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
1112
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
1213
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
1314
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
@@ -19,60 +20,66 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
1920
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
2021
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
2122
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
23+
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
24+
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
2225
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
2326
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
2427
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
2528
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
2629
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
2730
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
2831
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
29-
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
30-
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
3132
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
3233
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
3334
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
35+
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
36+
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
3437
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
3538
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
3639
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
3740
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
38-
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
39-
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
41+
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
42+
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
4043
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
4144
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
4245
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
4346
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
44-
go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY=
45-
go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI=
46-
go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ=
47-
go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE=
48-
go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A=
49-
go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU=
50-
go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk=
51-
go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w=
52-
go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k=
53-
go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE=
47+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 h1:YH4g8lQroajqUwWbq/tr2QX1JFmEXaDLgG+ew9bLMWo=
48+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0/go.mod h1:fvPi2qXDqFs8M4B4fmJhE92TyQs9Ydjlg3RvfUp+NbQ=
49+
go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
50+
go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM=
51+
go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA=
52+
go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI=
53+
go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E=
54+
go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg=
55+
go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM=
56+
go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA=
57+
go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE=
58+
go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs=
5459
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
5560
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
5661
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
5762
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
5863
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
5964
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
60-
golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY=
61-
golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds=
62-
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
63-
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
64-
golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4=
65-
golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA=
65+
golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
66+
golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
67+
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
68+
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
69+
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
70+
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
6671
golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE=
6772
golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
68-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250519155744-55703ea1f237 h1:cJfm9zPbe1e873mHJzmQ1nwVEeRDU/T1wXDK2kUSU34=
69-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250519155744-55703ea1f237/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
70-
google.golang.org/grpc v1.72.1 h1:HR03wO6eyZ7lknl75XlxABNVLLFc2PAb6mHlYh756mA=
71-
google.golang.org/grpc v1.72.1/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM=
72-
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
73-
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
73+
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
74+
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
75+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 h1:eaY8u2EuxbRv7c3NiGK0/NedzVsCcV6hDuU5qPX5EGE=
76+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5/go.mod h1:M4/wBTSeyLxupu3W3tJtOgB14jILAS/XWPSSa3TAlJc=
77+
google.golang.org/grpc v1.75.0 h1:+TW+dqTd2Biwe6KKfhE5JpiYIBWq865PhKGSXiivqt4=
78+
google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ=
79+
google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc=
80+
google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
7481
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
75-
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
76-
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
82+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
83+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
7784
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
7885
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

pkg/loop/internal/core/services/capability/capabilities_registry.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ func (cr *capabilitiesRegistryClient) ConfigForCapability(ctx context.Context, c
177177
RemoteTargetConfig: remoteTargetConfig,
178178
RemoteExecutableConfig: remoteExecutableConfig,
179179
CapabilityMethodConfig: methodConfig,
180+
LocalOnly: res.CapabilityConfig.LocalOnly,
180181
}, nil
181182
}
182183

@@ -439,6 +440,8 @@ func (c *capabilitiesRegistryServer) ConfigForCapability(ctx context.Context, re
439440
}
440441
}
441442

443+
ccp.LocalOnly = cc.LocalOnly
444+
442445
return &pb.ConfigForCapabilityReply{
443446
CapabilityConfig: ccp,
444447
}, nil

pkg/loop/internal/core/services/capability/capabilities_registry_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ func TestCapabilitiesRegistry_ConfigForCapabilities_IncludingV2Methods(t *testin
448448
RemoteExecutableConfig: &rec,
449449
},
450450
},
451+
LocalOnly: true,
451452
}
452453
reg.On("ConfigForCapability", mock.Anything, capID, donID).Once().Return(expectedCapConfig, nil)
453454

0 commit comments

Comments
 (0)