From 07a1e6a48072676a5ecf3e986b512e13c02bafd6 Mon Sep 17 00:00:00 2001 From: Kschappacher <56745262+Kschappacher@users.noreply.github.com> Date: Tue, 19 Nov 2024 16:52:24 -0500 Subject: [PATCH 1/3] first pass --- cloud/cloud.go | 22 +++++ go.mod | 62 ++++++------ go.sum | 167 ++++++++++++++++++++------------- protoutils/messages.go | 1 + resource/graph_node.go | 8 +- resource/resource.go | 6 ++ resource/resource_graph.go | 4 +- robot/client/client.go | 3 + robot/impl/local_robot.go | 16 +++- robot/impl/local_robot_test.go | 7 +- robot/impl/resource_manager.go | 30 ++++++ robot/server/server.go | 30 +++++- testutils/resource_utils.go | 4 +- 13 files changed, 251 insertions(+), 109 deletions(-) diff --git a/cloud/cloud.go b/cloud/cloud.go index 278db4d9df3..a3dd828e444 100644 --- a/cloud/cloud.go +++ b/cloud/cloud.go @@ -1,6 +1,8 @@ // Package cloud contains app-related functionality. package cloud +import pb "go.viam.com/api/robot/v1" + // Metadata contains app-related information about the robot. type Metadata struct { PrimaryOrgID string @@ -8,3 +10,23 @@ type Metadata struct { MachineID string MachinePartID string } + +// ResourceNameToProto converts a resource.Name to its proto counterpart. +func CloudMetadataToProto(metadata Metadata) *pb.GetCloudMetadataResponse { + return &pb.GetCloudMetadataResponse{ + MachinePartId: metadata.MachinePartID, + MachineId: metadata.MachineID, + PrimaryOrgId: metadata.PrimaryOrgID, + LocationId: metadata.LocationID, + } +} + +// ResourceNameFromProto converts a proto ResourceName to its rdk counterpart. +func CloudMetadataFromProto(pbMetadata *pb.GetCloudMetadataResponse) Metadata { + return Metadata{ + MachinePartID: pbMetadata.MachinePartId, + MachineID: pbMetadata.MachineId, + PrimaryOrgID: pbMetadata.PrimaryOrgId, + LocationID: pbMetadata.LocationId, + } +} diff --git a/go.mod b/go.mod index 971e22b91f5..34a9d2b4cfc 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/bep/debounce v1.2.1 github.com/bluenviron/gortsplib/v4 v4.8.0 github.com/bluenviron/mediacommon v1.9.2 - github.com/bufbuild/buf v1.21.0 + github.com/bufbuild/buf v1.30.0 github.com/charmbracelet/huh v0.6.0 github.com/charmbracelet/huh/spinner v0.0.0-20240917123815-c9b2c9cdb7b6 github.com/creack/pty v1.1.19-0.20220421211855-0d412c9fbeb1 @@ -44,10 +44,10 @@ require ( github.com/google/go-cmp v0.6.0 github.com/google/uuid v1.6.0 github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 - github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 github.com/invopop/jsonschema v0.6.0 github.com/jedib0t/go-pretty/v6 v6.4.6 - github.com/jhump/protoreflect v1.15.1 + github.com/jhump/protoreflect v1.15.6 github.com/kellydunn/golang-geo v0.7.0 github.com/kylelemons/godebug v1.1.0 github.com/lestrrat-go/jwx v1.2.29 @@ -78,7 +78,7 @@ require ( go.uber.org/atomic v1.11.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - go.viam.com/api v0.1.357 + go.viam.com/api v0.1.363 go.viam.com/test v1.2.3 go.viam.com/utils v0.1.112 goji.io v2.0.2+incompatible @@ -96,7 +96,7 @@ require ( google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 google.golang.org/grpc v1.66.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0 - google.golang.org/protobuf v1.34.2 + google.golang.org/protobuf v1.35.1 gopkg.in/src-d/go-billy.v4 v4.3.2 gorgonia.org/tensor v0.9.24 gotest.tools/gotestsum v1.10.0 @@ -107,6 +107,7 @@ require ( require ( 4d63.com/gocheckcompilerdirectives v1.2.1 // indirect 4d63.com/gochecknoglobals v0.2.1 // indirect + buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.33.0-20240221180331-f05a6f4403ce.1 // indirect cel.dev/expr v0.15.0 // indirect cloud.google.com/go v0.115.1 // indirect cloud.google.com/go/auth v0.9.3 // indirect @@ -117,6 +118,8 @@ require ( cloud.google.com/go/monitoring v1.21.0 // indirect cloud.google.com/go/storage v1.43.0 // indirect cloud.google.com/go/trace v1.11.0 // indirect + connectrpc.com/connect v1.15.0 // indirect + connectrpc.com/otelconnect v0.7.0 // indirect contrib.go.opencensus.io/exporter/stackdriver v0.13.4 // indirect git.sr.ht/~sbinet/gg v0.3.1 // indirect github.com/4meepo/tagalign v1.3.4 // indirect @@ -138,6 +141,7 @@ require ( github.com/alexkohler/nakedret/v2 v2.0.4 // indirect github.com/alexkohler/prealloc v1.0.0 // indirect github.com/alingse/asasalint v0.0.11 // indirect + github.com/antlr4-go/antlr/v4 v4.13.0 // indirect github.com/apache/arrow/go/arrow v0.0.0-20201229220542-30ce2eb5d4dc // indirect github.com/ashanbrown/forbidigo v1.6.0 // indirect github.com/ashanbrown/makezero v1.1.1 // indirect @@ -151,8 +155,9 @@ require ( github.com/bombsimon/wsl/v4 v4.4.1 // indirect github.com/breml/bidichk v0.2.7 // indirect github.com/breml/errchkjson v0.3.6 // indirect - github.com/bufbuild/connect-go v1.8.0 // indirect - github.com/bufbuild/protocompile v0.5.1 // indirect + github.com/bufbuild/protocompile v0.9.0 // indirect + github.com/bufbuild/protovalidate-go v0.6.0 // indirect + github.com/bufbuild/protoyaml-go v0.1.8 // indirect github.com/butuzov/ireturn v0.3.0 // indirect github.com/butuzov/mirror v1.2.0 // indirect github.com/campoy/embedmd v1.0.0 // indirect @@ -160,7 +165,7 @@ require ( github.com/catppuccin/go v0.2.0 // indirect github.com/ccojocar/zxcvbn-go v1.0.2 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/charithe/durationcheck v0.0.10 // indirect @@ -175,7 +180,7 @@ require ( github.com/chewxy/math32 v1.0.8 // indirect github.com/ckaznocha/intrange v0.2.0 // indirect github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b // indirect - github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect + github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect github.com/curioswitch/go-reassign v0.2.0 // indirect github.com/daixiang0/gci v0.13.5 // indirect @@ -184,12 +189,13 @@ require ( github.com/denis-tingaikin/go-header v0.5.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgottlieb/smarty-assertions v1.2.5 // indirect + github.com/distribution/reference v0.5.0 // indirect github.com/dnephin/pflag v1.0.7 // indirect - github.com/docker/cli v24.0.2+incompatible // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v24.0.2+incompatible // indirect - github.com/docker/docker-credential-helpers v0.7.0 // indirect - github.com/docker/go-connections v0.4.0 // indirect + github.com/docker/cli v25.0.4+incompatible // indirect + github.com/docker/distribution v2.8.3+incompatible // indirect + github.com/docker/docker v25.0.6+incompatible // indirect + github.com/docker/docker-credential-helpers v0.8.1 // indirect + github.com/docker/go-connections v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/edaniels/golog v0.0.0-20230215213219-28954395e8d0 // indirect github.com/edaniels/zeroconf v1.0.10 // indirect @@ -199,7 +205,7 @@ require ( github.com/ettle/strcase v0.2.0 // indirect github.com/fatih/camelcase v1.0.0 // indirect github.com/fatih/structtag v1.2.0 // indirect - github.com/felixge/fgprof v0.9.3 // indirect + github.com/felixge/fgprof v0.9.4 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/firefart/nonamedreturns v1.0.5 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect @@ -207,7 +213,7 @@ require ( github.com/ghostiam/protogetter v0.3.6 // indirect github.com/gin-gonic/gin v1.9.1 // indirect github.com/go-audio/riff v1.0.0 // indirect - github.com/go-chi/chi/v5 v5.0.8 // indirect + github.com/go-chi/chi/v5 v5.0.12 // indirect github.com/go-critic/go-critic v0.11.4 // indirect github.com/go-fonts/liberation v0.3.0 // indirect github.com/go-latex/latex v0.0.0-20230307184459-12ec69307ad9 // indirect @@ -227,7 +233,6 @@ require ( github.com/gofrs/flock v0.12.1 // indirect github.com/gofrs/uuid/v5 v5.0.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.2.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.4 // indirect github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect @@ -238,8 +243,9 @@ require ( github.com/golangci/revgrep v0.5.3 // indirect github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed // indirect github.com/gonuts/binary v0.2.0 // indirect + github.com/google/cel-go v0.20.1 // indirect github.com/google/flatbuffers v2.0.6+incompatible // indirect - github.com/google/go-containerregistry v0.15.2 // indirect + github.com/google/go-containerregistry v0.19.0 // indirect github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 // indirect github.com/google/s2a-go v0.1.8 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect @@ -259,7 +265,7 @@ require ( github.com/imdario/mergo v0.3.12 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/jdxcode/netrc v0.0.0-20221124155335-4616370d1a84 // indirect + github.com/jdx/go-netrc v1.0.0 // indirect github.com/jgautheron/goconst v1.7.1 // indirect github.com/jingyugao/rowserrcheck v1.1.1 // indirect github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect @@ -269,7 +275,7 @@ require ( github.com/karamaru-alpha/copyloopvar v1.1.0 // indirect github.com/kisielk/errcheck v1.7.0 // indirect github.com/kkHAIKE/contextcheck v1.1.5 // indirect - github.com/klauspost/compress v1.16.5 // indirect + github.com/klauspost/compress v1.17.7 // indirect github.com/klauspost/pgzip v1.2.6 // indirect github.com/kulti/thelper v0.6.3 // indirect github.com/kunwardeep/paralleltest v1.0.10 // indirect @@ -313,7 +319,7 @@ require ( github.com/nunnatsa/ginkgolinter v0.16.2 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc3 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.2.3 // indirect github.com/pierrec/lz4 v2.0.5+incompatible // indirect @@ -330,7 +336,7 @@ require ( github.com/pion/transport/v2 v2.2.10 // indirect github.com/pion/turn/v2 v2.1.6 // indirect github.com/pion/webrtc/v3 v3.2.36 // indirect - github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect + github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/profile v1.7.0 // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect @@ -369,12 +375,12 @@ require ( github.com/srikrsna/protoc-gen-gotag v0.6.2 // indirect github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect + github.com/stoewer/go-strcase v1.3.0 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/stretchr/testify v1.9.0 // indirect github.com/subosito/gotenv v1.4.1 // indirect github.com/tdakkota/asciicheck v0.2.0 // indirect github.com/tetafro/godot v1.4.17 // indirect - github.com/tetratelabs/wazero v1.2.0 // indirect github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect github.com/timonwong/loggercheck v0.9.4 // indirect github.com/tomarrell/wrapcheck/v2 v2.9.0 // indirect @@ -383,7 +389,7 @@ require ( github.com/ultraware/funlen v0.1.0 // indirect github.com/ultraware/whitespace v0.1.1 // indirect github.com/uudashr/gocognit v1.1.3 // indirect - github.com/vbatts/tar-split v0.11.3 // indirect + github.com/vbatts/tar-split v0.11.5 // indirect github.com/wlynxg/anet v0.0.3 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.1.2 // indirect @@ -401,10 +407,10 @@ require ( go-simpler.org/sloglint v0.7.2 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect - go.opentelemetry.io/otel v1.29.0 // indirect - go.opentelemetry.io/otel/metric v1.29.0 // indirect - go.opentelemetry.io/otel/sdk v1.28.0 // indirect - go.opentelemetry.io/otel/trace v1.29.0 // indirect + go.opentelemetry.io/otel v1.31.0 // indirect + go.opentelemetry.io/otel/metric v1.31.0 // indirect + go.opentelemetry.io/otel/sdk v1.31.0 // indirect + go.opentelemetry.io/otel/trace v1.31.0 // indirect go.uber.org/automaxprocs v1.5.3 // indirect go.uber.org/goleak v1.3.0 // indirect go4.org/unsafe/assume-no-moving-gc v0.0.0-20230525183740-e7c30c78aeb2 // indirect diff --git a/go.sum b/go.sum index 4c432a537fa..bdffdc55faa 100644 --- a/go.sum +++ b/go.sum @@ -3,6 +3,8 @@ 4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo= 4d63.com/gochecknoglobals v0.2.1 h1:1eiorGsgHOFOuoOiJDy2psSrQbRdIHrlge0IJIkUgDc= 4d63.com/gochecknoglobals v0.2.1/go.mod h1:KRE8wtJB3CXCsb1xy421JfTHIIbmT3U5ruxw2Qu8fSU= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.33.0-20240221180331-f05a6f4403ce.1 h1:0nWhrRcnkgw1kwJ7xibIO8bqfOA7pBzBjGCDBxIHch8= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.33.0-20240221180331-f05a6f4403ce.1/go.mod h1:Tgn5bgL220vkFOI0KPStlcClPeOJzAv4uT+V8JXGUnw= cel.dev/expr v0.15.0 h1:O1jzfJCQBfL5BFoYktaxwIhuttaQPsVWerH9/EEKx0w= cel.dev/expr v0.15.0/go.mod h1:TRSuuV7DlVCE/uwv5QbAiW/v8l5O8C4eEPHeu7gf7Sg= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= @@ -58,6 +60,10 @@ cloud.google.com/go/storage v1.43.0 h1:CcxnSohZwizt4LCzQHWvBf1/kvtHUn7gk9QERXPyX cloud.google.com/go/storage v1.43.0/go.mod h1:ajvxEa7WmZS1PxvKRq4bq0tFT3vMd502JwstCcYv0Q0= cloud.google.com/go/trace v1.11.0 h1:UHX6cOJm45Zw/KIbqHe4kII8PupLt/V5tscZUkeiJVI= cloud.google.com/go/trace v1.11.0/go.mod h1:Aiemdi52635dBR7o3zuc9lLjXo3BwGaChEjCa3tJNmM= +connectrpc.com/connect v1.15.0 h1:lFdeCbZrVVDydAqwr4xGV2y+ULn+0Z73s5JBj2LikWo= +connectrpc.com/connect v1.15.0/go.mod h1:bQmjpDY8xItMnttnurVgOkHUBMRT9cpsNi2O4AjKhmA= +connectrpc.com/otelconnect v0.7.0 h1:ZH55ZZtcJOTKWWLy3qmL4Pam4RzRWBJFOqTPyAqCXkY= +connectrpc.com/otelconnect v0.7.0/go.mod h1:Bt2ivBymHZHqxvo4HkJ0EwHuUzQN6k2l0oH+mp/8nwc= contrib.go.opencensus.io/exporter/stackdriver v0.13.4 h1:ksUxwH3OD5sxkjzEqGxNTl+Xjsmu3BnC/300MhSVTSc= contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -78,7 +84,6 @@ github.com/Antonboom/testifylint v1.4.3/go.mod h1:+8Q9+AOLsz5ZiQiiYujJKs9mNz398+ github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c h1:pxW6RcqyfI9/kWtOwnv/G+AzdKuy2ZrqINhenH4HyNs= github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= @@ -137,6 +142,8 @@ github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQ github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= +github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= github.com/apache/arrow/go/arrow v0.0.0-20201229220542-30ce2eb5d4dc h1:zvQ6w7KwtQWgMQiewOF9tFtundRMVZFSAksNV6ogzuY= github.com/apache/arrow/go/arrow v0.0.0-20201229220542-30ce2eb5d4dc/go.mod h1:c9sxoIT3YgLxH4UhLOCKaBlEojuMhVYpk4Ntv3opUTQ= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -197,12 +204,14 @@ github.com/breml/bidichk v0.2.7 h1:dAkKQPLl/Qrk7hnP6P+E0xOodrq8Us7+U0o4UBOAlQY= github.com/breml/bidichk v0.2.7/go.mod h1:YodjipAGI9fGcYM7II6wFvGhdMYsC5pHDlGzqvEW3tQ= github.com/breml/errchkjson v0.3.6 h1:VLhVkqSBH96AvXEyclMR37rZslRrY2kcyq+31HCsVrA= github.com/breml/errchkjson v0.3.6/go.mod h1:jhSDoFheAF2RSDOlCfhHO9KqhZgAYLyvHe7bRCX8f/U= -github.com/bufbuild/buf v1.21.0 h1:fgmvmA5xDFbKYd9wtpExH6YtCcTUo4GDt+7yizSNqUE= -github.com/bufbuild/buf v1.21.0/go.mod h1:o7qgHprFF7rrwY9OEE3Jv+zVMqEjtYjETR+klgPcPoE= -github.com/bufbuild/connect-go v1.8.0 h1:srluNkFkZBfSfg9Qb6DrO+5nMaxix//h2ctrHZhMGKc= -github.com/bufbuild/connect-go v1.8.0/go.mod h1:GmMJYR6orFqD0Y6ZgX8pwQ8j9baizDrIQMm1/a6LnHk= -github.com/bufbuild/protocompile v0.5.1 h1:mixz5lJX4Hiz4FpqFREJHIXLfaLBntfaJv1h+/jS+Qg= -github.com/bufbuild/protocompile v0.5.1/go.mod h1:G5iLmavmF4NsYtpZFvE3B/zFch2GIY8+wjsYLR/lc40= +github.com/bufbuild/buf v1.30.0 h1:V/Gir+aVKukqI/w2Eqoiv4tqUs01KBWP9t3Hz/9/25I= +github.com/bufbuild/buf v1.30.0/go.mod h1:vfr2bN0OlblcfLHKJNMixj7WohlMlFX4yB4L3VZq7A8= +github.com/bufbuild/protocompile v0.9.0 h1:DI8qLG5PEO0Mu1Oj51YFPqtx6I3qYXUAhJVJ/IzAVl0= +github.com/bufbuild/protocompile v0.9.0/go.mod h1:s89m1O8CqSYpyE/YaSGtg1r1YFMF5nLTwh4vlj6O444= +github.com/bufbuild/protovalidate-go v0.6.0 h1:Jgs1kFuZ2LHvvdj8SpCLA1W/+pXS8QSM3F/E2l3InPY= +github.com/bufbuild/protovalidate-go v0.6.0/go.mod h1:1LamgoYHZ2NdIQH0XGczGTc6Z8YrTHjcJVmiBaar4t4= +github.com/bufbuild/protoyaml-go v0.1.8 h1:X9QDLfl9uEllh4gsXUGqPanZYCOKzd92uniRtW2OnAQ= +github.com/bufbuild/protoyaml-go v0.1.8/go.mod h1:R8vE2+l49bSiIExP4VJpxOXleHE+FDzZ6HVxr3cYunw= github.com/butuzov/ireturn v0.3.0 h1:hTjMqWw3y5JC3kpnC5vXmFJAWI/m31jaCYQqzkS6PL0= github.com/butuzov/ireturn v0.3.0/go.mod h1:A09nIiwiqzN/IoVo9ogpa0Hzi9fex1kd9PSD6edP5ZA= github.com/butuzov/mirror v1.2.0 h1:9YVK1qIjNspaqWutSv8gsge2e/Xpq1eqEkslEUHy5cs= @@ -221,8 +230,8 @@ github.com/ccojocar/zxcvbn-go v1.0.2/go.mod h1:g1qkXtUSvHP8lhHp5GrSmTz6uWALGRMQd github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= @@ -259,9 +268,15 @@ github.com/chewxy/hm v1.0.0/go.mod h1:qg9YI4q6Fkj/whwHR1D+bOGeF7SniIP40VweVepLjg github.com/chewxy/math32 v1.0.0/go.mod h1:Miac6hA1ohdDUTagnvJy/q+aNnEk16qWUdb8ZVhvCN0= github.com/chewxy/math32 v1.0.8 h1:fU5E4Ec4Z+5RtRAi3TovSxUjQPkgRh+HbP7tKB2OFbM= github.com/chewxy/math32 v1.0.8/go.mod h1:dOB2rcuFrCn6UHrze36WSLVPKtzPMRAQvBvUwkSsLqs= +github.com/chromedp/cdproto v0.0.0-20230802225258-3cf4e6d46a89/go.mod h1:GKljq0VrfU4D5yc+2qA6OVr8pmO/MBbPEWqWQ/oqGEs= +github.com/chromedp/chromedp v0.9.2/go.mod h1:LkSXJKONWTCHAfQasKFUZI+mxqS4tZqhmtGzzhLsnLs= +github.com/chromedp/sysutil v1.0.0/go.mod h1:kgWmDdq8fTzXYcKIBqIYvRRTnYb9aNS9moAV0xufSww= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= github.com/ckaznocha/intrange v0.2.0 h1:FykcZuJ8BD7oX93YbO1UY9oZtkRbp+1/kJcDjkefYLs= github.com/ckaznocha/intrange v0.2.0/go.mod h1:r5I7nUlAAG56xmkOpw4XVr16BXhwYTUdcuRFeevn1oE= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= @@ -276,8 +291,10 @@ github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b h1:ga8SEFjZ60pxLcmhnTh github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/containerd/stargz-snapshotter/estargz v0.14.3 h1:OqlDCK3ZVUO6C3B/5FSkDwbkEETK84kQgEeFwDC+62k= -github.com/containerd/stargz-snapshotter/estargz v0.14.3/go.mod h1:KY//uOCIkSuNAHhJogcZtrNHdKrA99/FCCRjE3HD36o= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/containerd/stargz-snapshotter/estargz v0.15.1 h1:eXJjw9RbkLFgioVaTG+G/ZW/0kEe2oEKCdS/ZxIyoCU= +github.com/containerd/stargz-snapshotter/estargz v0.15.1/go.mod h1:gr2RNwukQ/S9Nv33Lt6UC7xEx58C+LHRdoqbEKjz1Kk= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -290,7 +307,6 @@ github.com/corona10/goimagehash v1.0.2 h1:pUfB0LnsJASMPGEZLj7tGY251vF+qLGqOgEP4r github.com/corona10/goimagehash v1.0.2/go.mod h1:/l9umBhvcHQXVtQO1V6Gp1yD20STawkhRnnX0D1bvVI= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= @@ -323,18 +339,20 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c= github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dnephin/pflag v1.0.7 h1:oxONGlWxhmUct0YzKTgrpQv9AUA1wtPBn7zuSjJqptk= github.com/dnephin/pflag v1.0.7/go.mod h1:uxE91IoWURlOiTUIA8Mq5ZZkAv3dPUfZNaT80Zm7OQE= -github.com/docker/cli v24.0.2+incompatible h1:QdqR7znue1mtkXIJ+ruQMGQhpw2JzMJLRXp6zpzF6tM= -github.com/docker/cli v24.0.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.2+incompatible h1:eATx+oLz9WdNVkQrr0qjQ8HvRJ4bOOxfzEo8R+dA3cg= -github.com/docker/docker v24.0.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= -github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/cli v25.0.4+incompatible h1:DatRkJ+nrFoYL2HZUzjM5Z5sAmcA5XGp+AW0oEw2+cA= +github.com/docker/cli v25.0.4+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= +github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v25.0.6+incompatible h1:5cPwbwriIcsua2REJe8HqQV+6WlWc1byg2QSXzBxBGg= +github.com/docker/docker v25.0.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker-credential-helpers v0.8.1 h1:j/eKUktUltBtMzKqmfLB0PAgqYyMHOp5vfsD1807oKo= +github.com/docker/docker-credential-helpers v0.8.1/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -385,8 +403,9 @@ github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g= github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= +github.com/felixge/fgprof v0.9.4 h1:ocDNwMFlnA0NU0zSB3I52xkO4sFXk80VK9lXjLClu88= +github.com/felixge/fgprof v0.9.4/go.mod h1:yKl+ERSa++RYOs32d8K6WEXCB4uXdLls4ZaZPpayhMM= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/firefart/nonamedreturns v1.0.5 h1:tM+Me2ZaXs8tfdDw3X6DOX++wMCOqzYUho6tUTYIdRA= @@ -427,8 +446,8 @@ github.com/go-audio/transforms v0.0.0-20180121090939-51830ccc35a5 h1:acgZxkn6oSJ github.com/go-audio/transforms v0.0.0-20180121090939-51830ccc35a5/go.mod h1:z9ahC4nc9/kxKfl1BnTZ/D2Cm5TbhjR2LeuUpepL9zI= github.com/go-audio/wav v1.1.0 h1:jQgLtbqBzY7G+BM8fXF7AHUk1uHUviWS4X39d5rsL2g= github.com/go-audio/wav v1.1.0/go.mod h1:mpe9qfwbScEbkd8uybLuIpTgHyrISw/OTuvjUW2iGtE= -github.com/go-chi/chi/v5 v5.0.8 h1:lD+NLqFcAi1ovnVZpsnObHGW4xb4J8lNmoYVfECH1Y0= -github.com/go-chi/chi/v5 v5.0.8/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= +github.com/go-chi/chi/v5 v5.0.12 h1:9euLV5sTrTNTRUU9POmDUvfxyj6LAABLUcEWO+JJb4s= +github.com/go-chi/chi/v5 v5.0.12/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-critic/go-critic v0.5.4/go.mod h1:cjB4YGw+n/+X8gREApej7150Uyy1Tg8If6F2XOAUXNE= github.com/go-critic/go-critic v0.11.4 h1:O7kGOCx0NDIni4czrkRIXTnit0mkyKOCePh3My6OyEU= github.com/go-critic/go-critic v0.11.4/go.mod h1:2QAdo4iuLik5S9YG0rT4wcZ8QxwHYkrr6/2MWAiv/vc= @@ -516,12 +535,15 @@ github.com/go-xmlfmt/xmlfmt v1.1.2 h1:Nea7b4icn8s57fTx1M5AI4qQT5HEM3rVUO8MuE6g80 github.com/go-xmlfmt/xmlfmt v1.1.2/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= +github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU= +github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= +github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og= +github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/gobwas/ws v1.2.1 h1:F2aeBZrm2NDsc7vbovKrWSogd4wvfAxg0FQ89/iqOTk= +github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY= github.com/goccy/go-graphviz v0.1.3 h1:Pkt8y4FBnBNI9tfSobpoN5qy1qMNqRXPQYvLhaSUasY= github.com/goccy/go-graphviz v0.1.3/go.mod h1:pMYpbAqJT10V8dzV1JN/g/wUlG/0imKPzn3ZsrchGCI= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= @@ -545,8 +567,6 @@ github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGw github.com/golang/geo v0.0.0-20210211234256-740aa86cb551 h1:gtexQ/VGyN+VVFRXSFiguSNcXmS6rkKT+X7FdIrTtfo= github.com/golang/geo v0.0.0-20210211234256-740aa86cb551/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= -github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -612,6 +632,8 @@ github.com/gonuts/binary v0.2.0 h1:caITwMWAoQWlL0RNvv2lTU/AHqAJlVuu6nZmNgfbKW4= github.com/gonuts/binary v0.2.0/go.mod h1:kM+CtBrCGDSKdv8WXTuCUsw+loiy8f/QEI8YCCC0M/E= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/cel-go v0.20.1 h1:nDx9r8S3L4pE61eDdt8igGj8rf5kjYR3ILxWIpWNi84= +github.com/google/cel-go v0.20.1/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/flatbuffers v2.0.6+incompatible h1:XHFReMv7nFFusa+CEokzWbzaYocKXI6C7hdU5Kgh9Lw= github.com/google/flatbuffers v2.0.6+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= @@ -630,8 +652,8 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-containerregistry v0.15.2 h1:MMkSh+tjSdnmJZO7ljvEqV1DjfekB6VUEAZgy3a+TQE= -github.com/google/go-containerregistry v0.15.2/go.mod h1:wWK+LnOv4jXMM23IT/F1wdYftGWGr47Is8CG+pmHK1Q= +github.com/google/go-containerregistry v0.19.0 h1:uIsMRBV7m/HDkDxE/nXMnv1q+lOOSPlQ/ywc5JbB8Ic= +github.com/google/go-containerregistry v0.19.0/go.mod h1:u0qB2l7mvtWVR5kNcbFIhFY1hLbf8eeGapA+vbFDCtQ= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= @@ -646,6 +668,7 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= +github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 h1:5iH8iuqE5apketRbSFBy+X1V0o+l+8NF1avt4HWl7cA= github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= @@ -707,8 +730,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 h1:gDLXvp5S9izjldquuoAhDzccbskOL6tDC5jMSyx3zxE= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2/go.mod h1:7pdNwVWBBHGiCxa9lAszqCJMbfTISJ7oMftp8+UGV08= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= @@ -747,6 +770,7 @@ github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 h1:i462o439Z github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= +github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= @@ -757,16 +781,16 @@ github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/invopop/jsonschema v0.6.0 h1:8e+xY8ZEn8gDHUYylSlLHy22P+SLeIRIHv3nM3hCbmY= github.com/invopop/jsonschema v0.6.0/go.mod h1:O9uiLokuu0+MGFlyiaqtWxwqJm41/+8Nj0lD7A36YH0= -github.com/jdxcode/netrc v0.0.0-20221124155335-4616370d1a84 h1:2uT3aivO7NVpUPGcQX7RbHijHMyWix/yCnIrCWc+5co= -github.com/jdxcode/netrc v0.0.0-20221124155335-4616370d1a84/go.mod h1:Zi/ZFkEqFHTm7qkjyNJjaWH4LQA9LQhGJyF0lTYGpxw= +github.com/jdx/go-netrc v1.0.0 h1:QbLMLyCZGj0NA8glAhxUpf1zDg6cxnWgMBbjq40W0gQ= +github.com/jdx/go-netrc v1.0.0/go.mod h1:Gh9eFQJnoTNIRHXl2j5bJXA1u84hQWJWgGh569zF3v8= github.com/jedib0t/go-pretty/v6 v6.4.6 h1:v6aG9h6Uby3IusSSEjHaZNXpHFhzqMmjXcPq1Rjl9Jw= github.com/jedib0t/go-pretty/v6 v6.4.6/go.mod h1:Ndk3ase2CkQbXLLNf5QDHoYb6J9WtVfmHZu9n8rk2xs= github.com/jgautheron/goconst v1.4.0/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jgautheron/goconst v1.7.1 h1:VpdAG7Ca7yvvJk5n8dMwQhfEZJh95kl/Hl9S1OI5Jkk= github.com/jgautheron/goconst v1.7.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jhump/protoreflect v1.10.3/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= -github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= +github.com/jhump/protoreflect v1.15.6 h1:WMYJbw2Wo+KOWwZFvgY0jMoVHM6i4XIvRs2RcBj5VmI= +github.com/jhump/protoreflect v1.15.6/go.mod h1:jCHoyYQIJnaabEYnbGwyo9hUqfyUMTbJw/tAut5t97E= github.com/jingyugao/rowserrcheck v0.0.0-20210130005344-c6a0c12dd98d/go.mod h1:/EZlaYCnEX24i7qdVhT9du5JrtFWYRQr67bVgR7JJC8= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= @@ -783,6 +807,7 @@ github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhB github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.3.0 h1:9BSCMi8C+0qdApAp4auwX0RkLGUjs956h0EkuQymUhg= github.com/jonboulle/clockwork v0.3.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -820,8 +845,8 @@ github.com/klauspost/compress v1.10.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e h1:+lIPJOWl+jSiJOc70QXJ07+2eg2Jy2EC7Mi11BWujeM= github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= @@ -859,6 +884,7 @@ github.com/ldez/gomoddirectives v0.2.4 h1:j3YjBIjEBbqZ0NKtBNzr8rtMHTOrLPeiwTkfUJ github.com/ldez/gomoddirectives v0.2.4/go.mod h1:oWu9i62VcQDYp9EQ0ONTfqLNh+mDLWWDO+SO0qSQw5g= github.com/ldez/tagliatelle v0.5.0 h1:epgfuYt9v0CG3fms0pEgIMNPuFf/LpPIfjk4kyqSioo= github.com/ldez/tagliatelle v0.5.0/go.mod h1:rj1HmWiL1MiKQuOONhd09iySTEkUuE/8+5jtPYz9xa4= +github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1yfhB7XSJJKlFZKl/J+dCPAknuiaGOshXAs= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= @@ -898,6 +924,7 @@ github.com/magefile/mage v1.10.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXq github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/maratori/testableexamples v1.0.0 h1:dU5alXRrD8WKSjOUnmJZuzdxWOEQ57+7s93SLMxb2vI= github.com/maratori/testableexamples v1.0.0/go.mod h1:4rhjL1n20TUTT4vdh3RDqSizKLyXp7K2u6HgraZCGzE= github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= @@ -1050,8 +1077,8 @@ github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1 github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc3 h1:fzg1mXZFj8YdPeNkRXMg+zb88BFV0Ys52cJydRwBkb8= -github.com/opencontainers/image-spec v1.1.0-rc3/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -1060,6 +1087,7 @@ github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxS github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= @@ -1130,8 +1158,8 @@ github.com/pion/turn/v2 v2.1.6 h1:Xr2niVsiPTB0FPtt+yAWKFUkU1eotQbGgpTIld4x1Gc= github.com/pion/turn/v2 v2.1.6/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY= github.com/pion/webrtc/v3 v3.2.36 h1:RM/miAv0M4TrhhS7h2mcZXt44K68WmpVDkUOgz2l2l8= github.com/pion/webrtc/v3 v3.2.36/go.mod h1:wWQz1PuKNSNK4VrJJNpPN3vZmKEi4zA6i2ynaQOlxIU= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -1219,8 +1247,8 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= @@ -1263,7 +1291,6 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.0/go.mod h1:4GuYW9TZmE769R5STWrRakJc4UqQ3+QQ95fyz7ENv1A= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE= @@ -1312,6 +1339,8 @@ github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YE github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm07ysF0U6JQXczc= github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= +github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= +github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -1351,8 +1380,6 @@ github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1: github.com/tetafro/godot v1.4.4/go.mod h1:FVDd4JuKliW3UgjswZfJfHq4vAx0bD/Jd5brJjGeaz4= github.com/tetafro/godot v1.4.17 h1:pGzu+Ye7ZUEFx7LHU0dAKmCOXWsPjl7qA6iMGndsjPs= github.com/tetafro/godot v1.4.17/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio= -github.com/tetratelabs/wazero v1.2.0 h1:I/8LMf4YkCZ3r2XaL9whhA0VMyAvF6QE+O7rco0DCeQ= -github.com/tetratelabs/wazero v1.2.0/go.mod h1:wYx2gNRg8/WihJfSDxA1TIL8H+GkfLYm+bIfbblu9VQ= github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 h1:quvGphlmUVU+nhpFa4gg4yJyTRJ13reZMDHrKwYw53M= github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ= @@ -1385,7 +1412,6 @@ github.com/ultraware/whitespace v0.1.1 h1:bTPOGejYFulW3PkcrqkeQwOd6NKOOXvmGD9bo/ github.com/ultraware/whitespace v0.1.1/go.mod h1:XcP1RLD81eV4BW8UhQlpaR+SDc2givTvyI8a586WjW8= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8= github.com/urfave/cli/v2 v2.10.3 h1:oi571Fxz5aHugfBAJd5nkwSk3fzATXtMlpxdLylSCMo= github.com/urfave/cli/v2 v2.10.3/go.mod h1:f8iq5LtQ/bLxafbdBSLPPNsgaW0l/2fYYEHhAyPlwvo= github.com/uudashr/gocognit v1.0.1/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM= @@ -1395,8 +1421,8 @@ github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyC github.com/valyala/fasthttp v1.16.0/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA= github.com/valyala/quicktemplate v1.6.3/go.mod h1:fwPzK2fHuYEODzJ9pkw0ipCPNHZ2tD5KW4lOuSdPKzY= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/vbatts/tar-split v0.11.3 h1:hLFqsOLQ1SsppQNTMpkpPXClLDfC2A3Zgy9OUU+RVck= -github.com/vbatts/tar-split v0.11.3/go.mod h1:9QlHN18E+fEH7RdG+QAJJcuya3rqT7eXSTY7wGrAokY= +github.com/vbatts/tar-split v0.11.5 h1:3bHCTIheBm1qFTcgh9oPu+nNBtX+XJIupG/vacinCts= +github.com/vbatts/tar-split v0.11.5/go.mod h1:yZbwRsSeGjusneWgA781EKej9HF8vme8okylkAeNKLk= github.com/viamrobotics/evdev v0.1.3 h1:mR4HFafvbc5Wx4Vp1AUJp6/aITfVx9AKyXWx+rWjpfc= github.com/viamrobotics/evdev v0.1.3/go.mod h1:N6nuZmPz7HEIpM7esNWwLxbYzqWqLSZkfI/1Sccckqk= github.com/viamrobotics/webrtc/v3 v3.99.10 h1:ykE14wm+HkqMD5Ozq4rvhzzfvnXAu14ak/HzA1OCzfY= @@ -1467,15 +1493,23 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.5 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0/go.mod h1:B9yO6b04uB80CzjedvewuqDhxJxi11s7/GtiGa8bAjI= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= -go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= -go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= -go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= -go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= -go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= -go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= -go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= -go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= +go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= +go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 h1:K0XaT3DwHAcV4nKLzcQvwAgSyisUghWoY20I7huthMk= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0/go.mod h1:B5Ki776z/MBnVha1Nzwp5arlzBbE3+1jk+pGmaP5HME= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= +go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= +go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= +go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= +go.opentelemetry.io/otel/sdk/metric v1.19.0 h1:EJoTO5qysMsYCa+w4UghwFV/ptQgqSL/8Ni+hx+8i1k= +go.opentelemetry.io/otel/sdk/metric v1.19.0/go.mod h1:XjG0jQyFJrv2PbMvwND7LwCEhsJzCzV5210euduKcKY= +go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= +go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1501,8 +1535,8 @@ go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= -go.viam.com/api v0.1.357 h1:L9LBYbaH0imv/B+mVxqtSgClIl4flzjLV6LclfnD9Nc= -go.viam.com/api v0.1.357/go.mod h1:5lpVRxMsKFCaahqsnJfPGwJ9baoQ6PIKQu3lxvy6Wtw= +go.viam.com/api v0.1.363 h1:kOn77FVHeZFjCXQUBpXlIOZ5HHRdampn0ca7jNBFy3k= +go.viam.com/api v0.1.363/go.mod h1:g5eipXHNm0rQmW7DWya6avKcmzoypLmxnMlAaIsE5Ls= go.viam.com/test v1.2.3 h1:tT2QqthC2BL2tiloUC2T1AIwuLILyMRx8mmxunN+cT4= go.viam.com/test v1.2.3/go.mod h1:5pXMnEyvTygilOCaFtonnKNMqsCCBbe2ZXU8ZsJ2zjY= go.viam.com/utils v0.1.112 h1:yuVkNITUijdP/CMI3BaDozUMZwP4Ari57BvRQfORFK0= @@ -1740,7 +1774,6 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1751,12 +1784,12 @@ golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220906165534-d0df966e6959/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2032,14 +2065,14 @@ google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX7 google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= diff --git a/protoutils/messages.go b/protoutils/messages.go index e7544a69ac9..98adbefe3bb 100644 --- a/protoutils/messages.go +++ b/protoutils/messages.go @@ -167,3 +167,4 @@ func DoFromResourceServer( } return &commonpb.DoCommandResponse{Result: pbRes}, nil } + diff --git a/resource/graph_node.go b/resource/graph_node.go index 125191fa2c6..455f4b96d4c 100644 --- a/resource/graph_node.go +++ b/resource/graph_node.go @@ -555,14 +555,14 @@ func (w *GraphNode) transitionTo(state NodeState) { } // ResourceStatus returns the current [Status]. -func (w *GraphNode) ResourceStatus() Status { +func (w *GraphNode) ResourceStatus() NodeStatus { w.mu.RLock() defer w.mu.RUnlock() return w.resourceStatus() } -func (w *GraphNode) resourceStatus() Status { +func (w *GraphNode) resourceStatus() NodeStatus { var resName Name if w.current == nil { resName = w.config.ResourceName() @@ -583,7 +583,7 @@ func (w *GraphNode) resourceStatus() Status { err = nil } - return Status{ + return NodeStatus{ Name: resName, State: w.state, LastUpdated: w.transitionedAt, @@ -623,7 +623,7 @@ func (w *GraphNode) Stats() any { } // Status encapsulates a resource name along with state transition metadata. -type Status struct { +type NodeStatus struct { Name Name State NodeState LastUpdated time.Time diff --git a/resource/resource.go b/resource/resource.go index 5b762219b8e..88f6dce2fda 100644 --- a/resource/resource.go +++ b/resource/resource.go @@ -25,6 +25,7 @@ import ( "github.com/jhump/protoreflect/desc" "github.com/pkg/errors" + "go.viam.com/rdk/cloud" "go.viam.com/rdk/spatialmath" "go.viam.com/rdk/utils" ) @@ -304,3 +305,8 @@ func NewCloseOnlyResource(name Name, closeFunc func(ctx context.Context) error) func (r *closeOnlyResource) Close(ctx context.Context) error { return r.closeFunc(ctx) } + +type Status struct { + NodeStatus + CloudMetadata cloud.Metadata +} diff --git a/resource/resource_graph.go b/resource/resource_graph.go index 9816a9b4a8b..5a95dfd2366 100644 --- a/resource/resource_graph.go +++ b/resource/resource_graph.go @@ -695,11 +695,11 @@ func (g *Graph) MarkReachability(node Name, reachable bool) error { } // Status returns a slice of all graph node statuses. -func (g *Graph) Status() []Status { +func (g *Graph) Status() []NodeStatus { g.mu.Lock() defer g.mu.Unlock() - var result []Status + var result []NodeStatus for _, node := range g.nodes { result = append(result, node.ResourceStatus()) } diff --git a/robot/client/client.go b/robot/client/client.go index 6d314c4126b..a0d6d03fd31 100644 --- a/robot/client/client.go +++ b/robot/client/client.go @@ -1097,9 +1097,12 @@ func (rc *RobotClient) MachineStatus(ctx context.Context) (robot.MachineStatus, mStatus.Resources = make([]resource.Status, 0, len(resp.Resources)) for _, pbResStatus := range resp.Resources { resStatus := resource.Status{ + NodeStatus: resource.NodeStatus{ Name: rprotoutils.ResourceNameFromProto(pbResStatus.Name), LastUpdated: pbResStatus.LastUpdated.AsTime(), Revision: pbResStatus.Revision, + }, + CloudMetadata: cloud.CloudMetadataFromProto(pbResStatus.CloudMetadata), } switch pbResStatus.State { diff --git a/robot/impl/local_robot.go b/robot/impl/local_robot.go index a157f5afddf..0ae439b34c4 100644 --- a/robot/impl/local_robot.go +++ b/robot/impl/local_robot.go @@ -1482,7 +1482,10 @@ func (r *localRobot) Shutdown(ctx context.Context) error { func (r *localRobot) MachineStatus(ctx context.Context) (robot.MachineStatus, error) { var result robot.MachineStatus - result.Resources = append(result.Resources, r.manager.resources.Status()...) + remoteMachineStatus:=r.manager.getRemoteMachineStatus(ctx) + + result.Resources = append(result.Resources,remoteMachineStatus...) + result.Resources = append(result.Resources, r.createLocalStatus(ctx)...) r.configRevisionMu.RLock() result.Config = r.configRevision @@ -1491,6 +1494,17 @@ func (r *localRobot) MachineStatus(ctx context.Context) (robot.MachineStatus, er return result, nil } +func (r *localRobot) createLocalStatus(ctx context.Context)[]resource.Status { + var returnStatuses []resource.Status + localMetaData, _ :=r.CloudMetadata(ctx) + for _,resourceStatus:= range r.manager.resources.Status(){ + if resourceStatus.Name.Remote==""{ + returnStatuses = append(returnStatuses, resource.Status{NodeStatus:resourceStatus, CloudMetadata:localMetaData}) + } + } + return returnStatuses +} + // Version returns version information about the robot. func (r *localRobot) Version(ctx context.Context) (robot.VersionResponse, error) { return robot.Version() diff --git a/robot/impl/local_robot_test.go b/robot/impl/local_robot_test.go index f215383e424..0ff96723f94 100644 --- a/robot/impl/local_robot_test.go +++ b/robot/impl/local_robot_test.go @@ -20,6 +20,7 @@ import ( "github.com/golang/geo/r3" "go.mongodb.org/mongo-driver/bson/primitive" "go.uber.org/zap" + // registers all components. commonpb "go.viam.com/api/common/v1" armpb "go.viam.com/api/component/arm/v1" @@ -3373,8 +3374,8 @@ func (m *mockResource) Reconfigure( // getExpectedDefaultStatuses returns a slice of default [resource.Status] with a given // revision set for motion and sensor services. -func getExpectedDefaultStatuses(revision string) []resource.Status { - return []resource.Status{ +func getExpectedDefaultStatuses(revision string) []resource.NodeStatus { + return []resource.NodeStatus{ { Name: resource.Name{ API: resource.APINamespaceRDKInternal.WithServiceType("framesystem"), @@ -3451,7 +3452,7 @@ func TestMachineStatus(t *testing.T) { test.That(t, mStatus.Config.Revision, test.ShouldEqual, rev2) expectedStatuses := rtestutils.ConcatResourceStatuses( getExpectedDefaultStatuses(rev2), - []resource.Status{ + []resource.NodeStatus{ { Name: mockNamed("m"), State: resource.NodeStateReady, diff --git a/robot/impl/resource_manager.go b/robot/impl/resource_manager.go index f0af1e00718..aefd9363468 100644 --- a/robot/impl/resource_manager.go +++ b/robot/impl/resource_manager.go @@ -1445,3 +1445,33 @@ func remoteDialOptions(config config.Remote, opts resourceManagerOptions) []rpc. } return dialOpts } + +func (manager *resourceManager) getRemoteMachineStatus(ctx context.Context) []resource.Status { + var machineStatusArray []resource.Status + for _, resName := range manager.resources.FindNodesByAPI(client.RemoteAPI) { + gNode, _ := manager.resources.Node(resName) + switch resName.API { + case client.RemoteAPI: + res, err:= gNode.Resource() + if err !=nil{ + manager.logger.Error("error getting underlying remote:%s resource", resName.Name) + continue + } + remote:= res.(internalRemoteRobot) + machineStatus, err:=remote.MachineStatus(ctx) + if err!=nil { + manager.logger.Errorf("error getting remote:%s machineStatus",resName.Name) + continue + } + // Resources come back with the wrong remote name since they are grabbed from the remote themselves + // We need to add that information back + for _,resource:= range machineStatus.Resources{ + resource.Name.Remote = resource.Name.Remote+":"+res.Name().Name + } + machineStatusArray=append(machineStatusArray, machineStatus.Resources...) + default: + manager.logger.Error("config is not a remote config") + } + } + return machineStatusArray +} diff --git a/robot/server/server.go b/robot/server/server.go index 9961a714034..77a10346901 100644 --- a/robot/server/server.go +++ b/robot/server/server.go @@ -24,6 +24,7 @@ import ( "google.golang.org/protobuf/types/known/structpb" "google.golang.org/protobuf/types/known/timestamppb" + "go.viam.com/rdk/cloud" "go.viam.com/rdk/logging" "go.viam.com/rdk/operation" "go.viam.com/rdk/pointcloud" @@ -508,12 +509,11 @@ func (s *Server) Shutdown(ctx context.Context, _ *pb.ShutdownRequest) (*pb.Shutd // GetMachineStatus returns the current status of the robot. func (s *Server) GetMachineStatus(ctx context.Context, _ *pb.GetMachineStatusRequest) (*pb.GetMachineStatusResponse, error) { var result pb.GetMachineStatusResponse - + mStatus, err := s.robot.MachineStatus(ctx) if err != nil { return nil, err } - result.Config = &pb.ConfigStatus{ Revision: mStatus.Config.Revision, LastUpdated: timestamppb.New(mStatus.Config.LastUpdated), @@ -524,6 +524,7 @@ func (s *Server) GetMachineStatus(ctx context.Context, _ *pb.GetMachineStatusReq Name: protoutils.ResourceNameToProto(resStatus.Name), LastUpdated: timestamppb.New(resStatus.LastUpdated), Revision: resStatus.Revision, + CloudMetadata: cloud.CloudMetadataToProto(resStatus.CloudMetadata), } switch resStatus.State { @@ -564,3 +565,28 @@ func (s *Server) GetVersion(ctx context.Context, _ *pb.GetVersionRequest) (*pb.G ApiVersion: result.APIVersion, }, nil } + +func (s *Server) convertToGetCloudMetadataResponse(ctx context.Context, remoteMetaData *map[string]cloud.Metadata) map[string]*pb.GetCloudMetadataResponse{ + returnMetaData:= make(map[string]*pb.GetCloudMetadataResponse) + localMetaData, _:=s.robot.CloudMetadata(ctx) + returnMetaData[""] = &pb.GetCloudMetadataResponse{ + MachinePartId: localMetaData.MachinePartID, + MachineId: localMetaData.MachineID, + PrimaryOrgId: localMetaData.PrimaryOrgID, + LocationId: localMetaData.LocationID, + } + + for remoteName,remoteVal:= range *remoteMetaData { + s.robot.Logger().Error(remoteName) + s.robot.Logger().Error(remoteVal) + returnMetaData[remoteName] = &pb.GetCloudMetadataResponse{ + MachinePartId: remoteVal.MachinePartID, + MachineId: remoteVal.MachineID, + PrimaryOrgId: remoteVal.PrimaryOrgID, + LocationId: remoteVal.LocationID, + } + } + + return returnMetaData +} + diff --git a/testutils/resource_utils.go b/testutils/resource_utils.go index c0453e80a4b..b53ab211ad7 100644 --- a/testutils/resource_utils.go +++ b/testutils/resource_utils.go @@ -199,8 +199,8 @@ func ConcatResourceNames(values ...[]resource.Name) []resource.Name { // ConcatResourceStatuses takes a slice of slices of resource.Status objects and returns // a concatenated slice of resource.Status for the purposes of comparison in automated // tests. -func ConcatResourceStatuses(values ...[]resource.Status) []resource.Status { - var rs []resource.Status +func ConcatResourceStatuses(values ...[]resource.NodeStatus) []resource.NodeStatus { + var rs []resource.NodeStatus for _, v := range values { rs = append(rs, v...) } From ffa052c400fb7de4aeaf6cce8b4a52179b1dc966 Mon Sep 17 00:00:00 2001 From: Kschappacher <56745262+Kschappacher@users.noreply.github.com> Date: Wed, 20 Nov 2024 11:20:48 -0500 Subject: [PATCH 2/3] fix remote name bug --- robot/impl/resource_manager.go | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/robot/impl/resource_manager.go b/robot/impl/resource_manager.go index aefd9363468..fd0c881a5a2 100644 --- a/robot/impl/resource_manager.go +++ b/robot/impl/resource_manager.go @@ -1463,12 +1463,24 @@ func (manager *resourceManager) getRemoteMachineStatus(ctx context.Context) []re manager.logger.Errorf("error getting remote:%s machineStatus",resName.Name) continue } - // Resources come back with the wrong remote name since they are grabbed from the remote themselves - // We need to add that information back - for _,resource:= range machineStatus.Resources{ - resource.Name.Remote = resource.Name.Remote+":"+res.Name().Name + // Resources come back with the wrong remote name since they are grabbed + // from the remote themselves We need to add that information back + // A copy of []resource.Status is made so we do not modify the slice in a for loop + var returnStatusArray []resource.Status + for _,remoteResource:= range machineStatus.Resources{ + returnStatusArray = append(returnStatusArray, resource.Status{ + NodeStatus: resource.NodeStatus{ + Name: remoteResource.Name.PrependRemote(resName.Name), + State: remoteResource.State, + LastUpdated: remoteResource.LastUpdated, + Revision: remoteResource.Revision, + Error: remoteResource.Error, + }, + CloudMetadata: remoteResource.CloudMetadata, + }) } - machineStatusArray=append(machineStatusArray, machineStatus.Resources...) + machineStatusArray=append(machineStatusArray, returnStatusArray...) + default: manager.logger.Error("config is not a remote config") } From 379e48a296b2c6f81ab1b39826ba7ea744fe1943 Mon Sep 17 00:00:00 2001 From: Kschappacher <56745262+Kschappacher@users.noreply.github.com> Date: Wed, 20 Nov 2024 12:08:53 -0500 Subject: [PATCH 3/3] lint and fix tests --- cloud/cloud.go | 20 +++---- protoutils/messages.go | 1 - resource/graph_node.go | 2 +- resource/resource.go | 1 + robot/client/client.go | 8 +-- robot/client/client_test.go | 44 ++++++++------ robot/impl/local_robot.go | 26 +++++---- robot/impl/local_robot_test.go | 101 ++++++++++++++++++++------------- robot/impl/resource_manager.go | 28 ++++----- robot/server/server.go | 35 ++---------- robot/server/server_test.go | 44 ++++++++------ testutils/resource_utils.go | 4 +- 12 files changed, 169 insertions(+), 145 deletions(-) diff --git a/cloud/cloud.go b/cloud/cloud.go index a3dd828e444..3b5a4ceee89 100644 --- a/cloud/cloud.go +++ b/cloud/cloud.go @@ -11,22 +11,22 @@ type Metadata struct { MachinePartID string } -// ResourceNameToProto converts a resource.Name to its proto counterpart. -func CloudMetadataToProto(metadata Metadata) *pb.GetCloudMetadataResponse { +// MetadataToProto converts a Metadata its proto counterpart. +func MetadataToProto(metadata Metadata) *pb.GetCloudMetadataResponse { return &pb.GetCloudMetadataResponse{ MachinePartId: metadata.MachinePartID, - MachineId: metadata.MachineID, - PrimaryOrgId: metadata.PrimaryOrgID, - LocationId: metadata.LocationID, + MachineId: metadata.MachineID, + PrimaryOrgId: metadata.PrimaryOrgID, + LocationId: metadata.LocationID, } } -// ResourceNameFromProto converts a proto ResourceName to its rdk counterpart. -func CloudMetadataFromProto(pbMetadata *pb.GetCloudMetadataResponse) Metadata { +// MetadataFromProto converts a proto GetCloudMetadataResponse to Metadata. +func MetadataFromProto(pbMetadata *pb.GetCloudMetadataResponse) Metadata { return Metadata{ MachinePartID: pbMetadata.MachinePartId, - MachineID: pbMetadata.MachineId, - PrimaryOrgID: pbMetadata.PrimaryOrgId, - LocationID: pbMetadata.LocationId, + MachineID: pbMetadata.MachineId, + PrimaryOrgID: pbMetadata.PrimaryOrgId, + LocationID: pbMetadata.LocationId, } } diff --git a/protoutils/messages.go b/protoutils/messages.go index e1ceb476f0a..70c43f7539d 100644 --- a/protoutils/messages.go +++ b/protoutils/messages.go @@ -186,4 +186,3 @@ func DoFromResourceServer( } return &commonpb.DoCommandResponse{Result: pbRes}, nil } - diff --git a/resource/graph_node.go b/resource/graph_node.go index 455f4b96d4c..03f9430f4be 100644 --- a/resource/graph_node.go +++ b/resource/graph_node.go @@ -622,7 +622,7 @@ func (w *GraphNode) Stats() any { return ret } -// Status encapsulates a resource name along with state transition metadata. +// NodeStatus encapsulates a resource name along with state transition metadata. type NodeStatus struct { Name Name State NodeState diff --git a/resource/resource.go b/resource/resource.go index 88f6dce2fda..c8811d6e4c7 100644 --- a/resource/resource.go +++ b/resource/resource.go @@ -306,6 +306,7 @@ func (r *closeOnlyResource) Close(ctx context.Context) error { return r.closeFunc(ctx) } +// Status is a combination of a resources node status and the cloudMetadata associated with that resource. type Status struct { NodeStatus CloudMetadata cloud.Metadata diff --git a/robot/client/client.go b/robot/client/client.go index a0d6d03fd31..c6e97cc36fd 100644 --- a/robot/client/client.go +++ b/robot/client/client.go @@ -1098,11 +1098,11 @@ func (rc *RobotClient) MachineStatus(ctx context.Context) (robot.MachineStatus, for _, pbResStatus := range resp.Resources { resStatus := resource.Status{ NodeStatus: resource.NodeStatus{ - Name: rprotoutils.ResourceNameFromProto(pbResStatus.Name), - LastUpdated: pbResStatus.LastUpdated.AsTime(), - Revision: pbResStatus.Revision, + Name: rprotoutils.ResourceNameFromProto(pbResStatus.Name), + LastUpdated: pbResStatus.LastUpdated.AsTime(), + Revision: pbResStatus.Revision, }, - CloudMetadata: cloud.CloudMetadataFromProto(pbResStatus.CloudMetadata), + CloudMetadata: cloud.MetadataFromProto(pbResStatus.CloudMetadata), } switch pbResStatus.State { diff --git a/robot/client/client_test.go b/robot/client/client_test.go index b452af0049f..18a247972c0 100644 --- a/robot/client/client_test.go +++ b/robot/client/client_test.go @@ -2119,8 +2119,10 @@ func TestMachineStatus(t *testing.T) { Config: config.Revision{Revision: "rev1"}, Resources: []resource.Status{ { - Name: arm.Named("badArm"), - Revision: "rev0", + NodeStatus: resource.NodeStatus{ + Name: arm.Named("badArm"), + Revision: "rev0", + }, }, }, }, @@ -2132,9 +2134,11 @@ func TestMachineStatus(t *testing.T) { Config: config.Revision{Revision: "rev1"}, Resources: []resource.Status{ { - Name: arm.Named("goodArm"), - State: resource.NodeStateConfiguring, - Revision: "rev1", + NodeStatus: resource.NodeStatus{ + Name: arm.Named("goodArm"), + State: resource.NodeStateConfiguring, + Revision: "rev1", + }, }, }, }, @@ -2146,17 +2150,23 @@ func TestMachineStatus(t *testing.T) { Config: config.Revision{Revision: "rev1"}, Resources: []resource.Status{ { - Name: arm.Named("goodArm"), - State: resource.NodeStateConfiguring, - Revision: "rev1", + NodeStatus: resource.NodeStatus{ + Name: arm.Named("goodArm"), + State: resource.NodeStateConfiguring, + Revision: "rev1", + }, }, { - Name: arm.Named("badArm"), - Revision: "rev0", + NodeStatus: resource.NodeStatus{ + Name: arm.Named("badArm"), + Revision: "rev0", + }, }, { - Name: arm.Named("anotherBadArm"), - Revision: "rev-1", + NodeStatus: resource.NodeStatus{ + Name: arm.Named("anotherBadArm"), + Revision: "rev-1", + }, }, }, }, @@ -2168,10 +2178,12 @@ func TestMachineStatus(t *testing.T) { Config: config.Revision{Revision: "rev1"}, Resources: []resource.Status{ { - Name: arm.Named("brokenArm"), - State: resource.NodeStateUnhealthy, - Error: errors.New("bad configuration"), - Revision: "rev1", + NodeStatus: resource.NodeStatus{ + Name: arm.Named("brokenArm"), + State: resource.NodeStateUnhealthy, + Error: errors.New("bad configuration"), + Revision: "rev1", + }, }, }, }, diff --git a/robot/impl/local_robot.go b/robot/impl/local_robot.go index 0ae439b34c4..ddeee006b49 100644 --- a/robot/impl/local_robot.go +++ b/robot/impl/local_robot.go @@ -1482,10 +1482,13 @@ func (r *localRobot) Shutdown(ctx context.Context) error { func (r *localRobot) MachineStatus(ctx context.Context) (robot.MachineStatus, error) { var result robot.MachineStatus - remoteMachineStatus:=r.manager.getRemoteMachineStatus(ctx) - - result.Resources = append(result.Resources,remoteMachineStatus...) - result.Resources = append(result.Resources, r.createLocalStatus(ctx)...) + remoteMachineStatus := r.manager.getRemoteMachineStatus(ctx) + localMachineStatus, err := r.createLocalStatus(ctx) + if err != nil { + return result, err + } + result.Resources = append(result.Resources, remoteMachineStatus...) + result.Resources = append(result.Resources, localMachineStatus...) r.configRevisionMu.RLock() result.Config = r.configRevision @@ -1494,15 +1497,18 @@ func (r *localRobot) MachineStatus(ctx context.Context) (robot.MachineStatus, er return result, nil } -func (r *localRobot) createLocalStatus(ctx context.Context)[]resource.Status { +func (r *localRobot) createLocalStatus(ctx context.Context) ([]resource.Status, error) { var returnStatuses []resource.Status - localMetaData, _ :=r.CloudMetadata(ctx) - for _,resourceStatus:= range r.manager.resources.Status(){ - if resourceStatus.Name.Remote==""{ - returnStatuses = append(returnStatuses, resource.Status{NodeStatus:resourceStatus, CloudMetadata:localMetaData}) + localMetaData, err := r.CloudMetadata(ctx) + if err != nil { + return nil, errors.New("error getting cloudMetadata from this machine") } + for _, resourceStatus := range r.manager.resources.Status() { + if resourceStatus.Name.Remote == "" { + returnStatuses = append(returnStatuses, resource.Status{NodeStatus: resourceStatus, CloudMetadata: localMetaData}) + } } - return returnStatuses + return returnStatuses, nil } // Version returns version information about the robot. diff --git a/robot/impl/local_robot_test.go b/robot/impl/local_robot_test.go index 0ff96723f94..4b29d1b49d2 100644 --- a/robot/impl/local_robot_test.go +++ b/robot/impl/local_robot_test.go @@ -20,7 +20,6 @@ import ( "github.com/golang/geo/r3" "go.mongodb.org/mongo-driver/bson/primitive" "go.uber.org/zap" - // registers all components. commonpb "go.viam.com/api/common/v1" armpb "go.viam.com/api/component/arm/v1" @@ -3374,43 +3373,53 @@ func (m *mockResource) Reconfigure( // getExpectedDefaultStatuses returns a slice of default [resource.Status] with a given // revision set for motion and sensor services. -func getExpectedDefaultStatuses(revision string) []resource.NodeStatus { - return []resource.NodeStatus{ +func getExpectedDefaultStatuses(revision string) []resource.Status { + return []resource.Status{ { - Name: resource.Name{ - API: resource.APINamespaceRDKInternal.WithServiceType("framesystem"), - Name: "builtin", + NodeStatus: resource.NodeStatus{ + Name: resource.Name{ + API: resource.APINamespaceRDKInternal.WithServiceType("framesystem"), + Name: "builtin", + }, + State: resource.NodeStateReady, }, - State: resource.NodeStateReady, }, { - Name: resource.Name{ - API: resource.APINamespaceRDKInternal.WithServiceType("cloud_connection"), - Name: "builtin", + NodeStatus: resource.NodeStatus{ + Name: resource.Name{ + API: resource.APINamespaceRDKInternal.WithServiceType("cloud_connection"), + Name: "builtin", + }, + State: resource.NodeStateReady, }, - State: resource.NodeStateReady, }, { - Name: resource.Name{ - API: resource.APINamespaceRDKInternal.WithServiceType("packagemanager"), - Name: "builtin", + NodeStatus: resource.NodeStatus{ + Name: resource.Name{ + API: resource.APINamespaceRDKInternal.WithServiceType("packagemanager"), + Name: "builtin", + }, + State: resource.NodeStateReady, }, - State: resource.NodeStateReady, }, { - Name: resource.Name{ - API: resource.APINamespaceRDKInternal.WithServiceType("web"), - Name: "builtin", + NodeStatus: resource.NodeStatus{ + Name: resource.Name{ + API: resource.APINamespaceRDKInternal.WithServiceType("web"), + Name: "builtin", + }, + State: resource.NodeStateReady, }, - State: resource.NodeStateReady, }, { - Name: resource.Name{ - API: resource.APINamespaceRDK.WithServiceType("motion"), - Name: "builtin", + NodeStatus: resource.NodeStatus{ + Name: resource.Name{ + API: resource.APINamespaceRDK.WithServiceType("motion"), + Name: "builtin", + }, + State: resource.NodeStateReady, + Revision: revision, }, - State: resource.NodeStateReady, - Revision: revision, }, } } @@ -3452,11 +3461,13 @@ func TestMachineStatus(t *testing.T) { test.That(t, mStatus.Config.Revision, test.ShouldEqual, rev2) expectedStatuses := rtestutils.ConcatResourceStatuses( getExpectedDefaultStatuses(rev2), - []resource.NodeStatus{ + []resource.Status{ { - Name: mockNamed("m"), - State: resource.NodeStateReady, - Revision: rev2, + NodeStatus: resource.NodeStatus{ + Name: mockNamed("m"), + State: resource.NodeStateReady, + Revision: rev2, + }, }, }, ) @@ -3477,10 +3488,12 @@ func TestMachineStatus(t *testing.T) { getExpectedDefaultStatuses(rev3), []resource.Status{ { - Name: mockNamed("m"), - State: resource.NodeStateUnhealthy, - Revision: rev2, - Error: expectedConfigError, + NodeStatus: resource.NodeStatus{ + Name: mockNamed("m"), + State: resource.NodeStateUnhealthy, + Revision: rev2, + Error: expectedConfigError, + }, }, }, ) @@ -3499,9 +3512,11 @@ func TestMachineStatus(t *testing.T) { getExpectedDefaultStatuses(rev4), []resource.Status{ { - Name: mockNamed("m"), - State: resource.NodeStateReady, - Revision: rev4, + NodeStatus: resource.NodeStatus{ + Name: mockNamed("m"), + State: resource.NodeStateReady, + Revision: rev4, + }, }, }, ) @@ -3541,9 +3556,11 @@ func TestMachineStatus(t *testing.T) { filterConfiguring := rtestutils.FilterByStatus(t, mStatus.Resources, resource.NodeStateConfiguring) expectedConfiguring := []resource.Status{ { - Name: mockNamed("m"), - State: resource.NodeStateConfiguring, - Revision: rev1, + NodeStatus: resource.NodeStatus{ + Name: mockNamed("m"), + State: resource.NodeStateConfiguring, + Revision: rev1, + }, }, } rtestutils.VerifySameResourceStatuses(t, filterConfiguring, expectedConfiguring) @@ -3567,9 +3584,11 @@ func TestMachineStatus(t *testing.T) { getExpectedDefaultStatuses(rev2), []resource.Status{ { - Name: mockNamed("m"), - State: resource.NodeStateReady, - Revision: rev2, + NodeStatus: resource.NodeStatus{ + Name: mockNamed("m"), + State: resource.NodeStateReady, + Revision: rev2, + }, }, }, ) diff --git a/robot/impl/resource_manager.go b/robot/impl/resource_manager.go index fd0c881a5a2..7af3030a297 100644 --- a/robot/impl/resource_manager.go +++ b/robot/impl/resource_manager.go @@ -1452,35 +1452,35 @@ func (manager *resourceManager) getRemoteMachineStatus(ctx context.Context) []re gNode, _ := manager.resources.Node(resName) switch resName.API { case client.RemoteAPI: - res, err:= gNode.Resource() - if err !=nil{ + res, err := gNode.Resource() + if err != nil { manager.logger.Error("error getting underlying remote:%s resource", resName.Name) continue } - remote:= res.(internalRemoteRobot) - machineStatus, err:=remote.MachineStatus(ctx) - if err!=nil { - manager.logger.Errorf("error getting remote:%s machineStatus",resName.Name) + remote := res.(internalRemoteRobot) + machineStatus, err := remote.MachineStatus(ctx) + if err != nil { + manager.logger.Errorf("error getting remote:%s machineStatus", resName.Name) continue } - // Resources come back with the wrong remote name since they are grabbed + // Resources come back with the wrong remote name since they are grabbed // from the remote themselves We need to add that information back // A copy of []resource.Status is made so we do not modify the slice in a for loop var returnStatusArray []resource.Status - for _,remoteResource:= range machineStatus.Resources{ + for _, remoteResource := range machineStatus.Resources { returnStatusArray = append(returnStatusArray, resource.Status{ NodeStatus: resource.NodeStatus{ - Name: remoteResource.Name.PrependRemote(resName.Name), - State: remoteResource.State, + Name: remoteResource.Name.PrependRemote(resName.Name), + State: remoteResource.State, LastUpdated: remoteResource.LastUpdated, - Revision: remoteResource.Revision, - Error: remoteResource.Error, + Revision: remoteResource.Revision, + Error: remoteResource.Error, }, CloudMetadata: remoteResource.CloudMetadata, }) } - machineStatusArray=append(machineStatusArray, returnStatusArray...) - + machineStatusArray = append(machineStatusArray, returnStatusArray...) + default: manager.logger.Error("config is not a remote config") } diff --git a/robot/server/server.go b/robot/server/server.go index 77a10346901..ed2b3b3ca4d 100644 --- a/robot/server/server.go +++ b/robot/server/server.go @@ -509,7 +509,7 @@ func (s *Server) Shutdown(ctx context.Context, _ *pb.ShutdownRequest) (*pb.Shutd // GetMachineStatus returns the current status of the robot. func (s *Server) GetMachineStatus(ctx context.Context, _ *pb.GetMachineStatusRequest) (*pb.GetMachineStatusResponse, error) { var result pb.GetMachineStatusResponse - + mStatus, err := s.robot.MachineStatus(ctx) if err != nil { return nil, err @@ -521,10 +521,10 @@ func (s *Server) GetMachineStatus(ctx context.Context, _ *pb.GetMachineStatusReq result.Resources = make([]*pb.ResourceStatus, 0, len(mStatus.Resources)) for _, resStatus := range mStatus.Resources { pbResStatus := &pb.ResourceStatus{ - Name: protoutils.ResourceNameToProto(resStatus.Name), - LastUpdated: timestamppb.New(resStatus.LastUpdated), - Revision: resStatus.Revision, - CloudMetadata: cloud.CloudMetadataToProto(resStatus.CloudMetadata), + Name: protoutils.ResourceNameToProto(resStatus.Name), + LastUpdated: timestamppb.New(resStatus.LastUpdated), + Revision: resStatus.Revision, + CloudMetadata: cloud.MetadataToProto(resStatus.CloudMetadata), } switch resStatus.State { @@ -565,28 +565,3 @@ func (s *Server) GetVersion(ctx context.Context, _ *pb.GetVersionRequest) (*pb.G ApiVersion: result.APIVersion, }, nil } - -func (s *Server) convertToGetCloudMetadataResponse(ctx context.Context, remoteMetaData *map[string]cloud.Metadata) map[string]*pb.GetCloudMetadataResponse{ - returnMetaData:= make(map[string]*pb.GetCloudMetadataResponse) - localMetaData, _:=s.robot.CloudMetadata(ctx) - returnMetaData[""] = &pb.GetCloudMetadataResponse{ - MachinePartId: localMetaData.MachinePartID, - MachineId: localMetaData.MachineID, - PrimaryOrgId: localMetaData.PrimaryOrgID, - LocationId: localMetaData.LocationID, - } - - for remoteName,remoteVal:= range *remoteMetaData { - s.robot.Logger().Error(remoteName) - s.robot.Logger().Error(remoteVal) - returnMetaData[remoteName] = &pb.GetCloudMetadataResponse{ - MachinePartId: remoteVal.MachinePartID, - MachineId: remoteVal.MachineID, - PrimaryOrgId: remoteVal.PrimaryOrgID, - LocationId: remoteVal.LocationID, - } - } - - return returnMetaData -} - diff --git a/robot/server/server_test.go b/robot/server/server_test.go index 130b1f03111..bf6d8d6283f 100644 --- a/robot/server/server_test.go +++ b/robot/server/server_test.go @@ -103,8 +103,10 @@ func TestServer(t *testing.T) { Config: config.Revision{Revision: "rev1"}, Resources: []resource.Status{ { - Name: arm.Named("badArm"), - Revision: "rev0", + NodeStatus: resource.NodeStatus{ + Name: arm.Named("badArm"), + Revision: "rev0", + }, }, }, }, @@ -124,9 +126,11 @@ func TestServer(t *testing.T) { Config: config.Revision{Revision: "rev1"}, Resources: []resource.Status{ { - Name: arm.Named("goodArm"), - State: resource.NodeStateConfiguring, - Revision: "rev1", + NodeStatus: resource.NodeStatus{ + Name: arm.Named("goodArm"), + State: resource.NodeStateConfiguring, + Revision: "rev1", + }, }, }, }, @@ -146,17 +150,23 @@ func TestServer(t *testing.T) { Config: config.Revision{Revision: "rev1"}, Resources: []resource.Status{ { - Name: arm.Named("goodArm"), - State: resource.NodeStateConfiguring, - Revision: "rev1", + NodeStatus: resource.NodeStatus{ + Name: arm.Named("goodArm"), + State: resource.NodeStateConfiguring, + Revision: "rev1", + }, }, { - Name: arm.Named("badArm"), - Revision: "rev0", + NodeStatus: resource.NodeStatus{ + Name: arm.Named("badArm"), + Revision: "rev0", + }, }, { - Name: arm.Named("anotherBadArm"), - Revision: "rev-1", + NodeStatus: resource.NodeStatus{ + Name: arm.Named("anotherBadArm"), + Revision: "rev-1", + }, }, }, }, @@ -186,10 +196,12 @@ func TestServer(t *testing.T) { Config: config.Revision{Revision: "rev1"}, Resources: []resource.Status{ { - Name: arm.Named("brokenArm"), - Revision: "rev1", - State: resource.NodeStateUnhealthy, - Error: errors.New("bad configuration"), + NodeStatus: resource.NodeStatus{ + Name: arm.Named("brokenArm"), + Revision: "rev1", + State: resource.NodeStateUnhealthy, + Error: errors.New("bad configuration"), + }, }, }, }, diff --git a/testutils/resource_utils.go b/testutils/resource_utils.go index b53ab211ad7..c0453e80a4b 100644 --- a/testutils/resource_utils.go +++ b/testutils/resource_utils.go @@ -199,8 +199,8 @@ func ConcatResourceNames(values ...[]resource.Name) []resource.Name { // ConcatResourceStatuses takes a slice of slices of resource.Status objects and returns // a concatenated slice of resource.Status for the purposes of comparison in automated // tests. -func ConcatResourceStatuses(values ...[]resource.NodeStatus) []resource.NodeStatus { - var rs []resource.NodeStatus +func ConcatResourceStatuses(values ...[]resource.Status) []resource.Status { + var rs []resource.Status for _, v := range values { rs = append(rs, v...) }