Skip to content

Commit b975f23

Browse files
committed
fix lint issues
Signed-off-by: Peter Jausovec <peter.jausovec@solo.io>
1 parent b21c66d commit b975f23

9 files changed

Lines changed: 55 additions & 57 deletions

File tree

go/adk/pkg/config/config_materialize.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import (
88
)
99

1010
const (
11-
envAgentConfigJSON = "KAGENT_CONFIG_JSON"
12-
envAgentCardJSON = "KAGENT_AGENT_CARD_JSON"
13-
envSRTSettingsJSON = "KAGENT_SRT_SETTINGS_JSON"
14-
envKagentToken = "KAGENT_TOKEN"
15-
kagentTokenDir = "/var/run/secrets/tokens"
16-
kagentTokenFile = "kagent-token"
17-
srtSettingsFile = "srt-settings.json"
11+
envAgentConfigJSON = "KAGENT_CONFIG_JSON"
12+
envAgentCardJSON = "KAGENT_AGENT_CARD_JSON"
13+
envSRTSettingsJSON = "KAGENT_SRT_SETTINGS_JSON"
14+
envKagentToken = "KAGENT_TOKEN"
15+
kagentTokenDir = "/var/run/secrets/tokens"
16+
kagentTokenFile = "kagent-token"
17+
srtSettingsFile = "srt-settings.json"
1818
)
1919

2020
// MaterializeFromEnv writes Agent Substrate secret-backed environment variables to

go/api/v1alpha2/agent_spec_validation.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package v1alpha2
33
import "fmt"
44

55
const (
6-
substrateSandboxSkillsUnsupportedMsg = "spec.skills is not supported when spec.sandbox.platform is substrate"
7-
substrateSandboxPythonRuntimeUnsupportedMsg = "spec.declarative.runtime must be \"go\" when spec.sandbox.platform is substrate"
6+
substrateSandboxSkillsUnsupportedMsg = "spec.skills is not supported when spec.sandbox.platform is substrate"
7+
substrateSandboxPythonRuntimeUnsupportedMsg = "spec.declarative.runtime must be \"go\" when spec.sandbox.platform is substrate"
88
)
99

1010
// AgentSpecHasSkills reports whether the spec configures any skill sources.

go/api/v1alpha2/agent_spec_validation_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func TestValidateSubstrateSandboxAgentSpec(t *testing.T) {
3434

3535
t.Run("rejects python runtime on substrate platform", func(t *testing.T) {
3636
spec := &AgentSpec{
37-
Type: AgentType_Declarative,
37+
Type: AgentType_Declarative,
3838
Sandbox: &SandboxConfig{Platform: SandboxPlatformSubstrate},
3939
Declarative: &DeclarativeAgentSpec{
4040
Runtime: DeclarativeRuntime_Python,
@@ -47,7 +47,7 @@ func TestValidateSubstrateSandboxAgentSpec(t *testing.T) {
4747

4848
t.Run("allows go runtime on substrate platform", func(t *testing.T) {
4949
spec := &AgentSpec{
50-
Type: AgentType_Declarative,
50+
Type: AgentType_Declarative,
5151
Sandbox: &SandboxConfig{Platform: SandboxPlatformSubstrate},
5252
Declarative: &DeclarativeAgentSpec{
5353
Runtime: DeclarativeRuntime_Go,

go/api/v1alpha2/agent_types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ const (
244244

245245
// SandboxSubstrateSpec configures Agent Substrate for a SandboxAgent.
246246
// WorkerPool capacity is referenced from workerPoolRef or the controller default.
247-
// +optional
248247
type SandboxSubstrateSpec struct {
249248
// WorkerPoolRef references an existing ate.dev WorkerPool.
250249
// +optional

go/core/internal/a2a/a2a_registrar.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010

1111
"github.com/go-logr/logr"
1212
"github.com/kagent-dev/kagent/go/api/v1alpha2"
13-
agent_translator "github.com/kagent-dev/kagent/go/core/internal/controller/translator/agent"
1413
"github.com/kagent-dev/kagent/go/core/internal/controller/reconciler"
14+
agent_translator "github.com/kagent-dev/kagent/go/core/internal/controller/translator/agent"
1515
authimpl "github.com/kagent-dev/kagent/go/core/internal/httpserver/auth"
1616
common "github.com/kagent-dev/kagent/go/core/internal/utils"
1717
"github.com/kagent-dev/kagent/go/core/pkg/auth"
@@ -27,15 +27,15 @@ import (
2727
)
2828

2929
type A2ARegistrar struct {
30-
cache crcache.Cache
31-
handlerMux A2AHandlerMux
32-
clientRegistry *AgentClientRegistry
33-
a2aBaseURL string
34-
sandboxA2AURL string
35-
ateneRouterURL string
36-
authenticator auth.AuthProvider
37-
a2aBaseOptions []a2aclient.Option
38-
agentObserver AgentObserver
30+
cache crcache.Cache
31+
handlerMux A2AHandlerMux
32+
clientRegistry *AgentClientRegistry
33+
a2aBaseURL string
34+
sandboxA2AURL string
35+
ateneRouterURL string
36+
authenticator auth.AuthProvider
37+
a2aBaseOptions []a2aclient.Option
38+
agentObserver AgentObserver
3939
substrateSandboxActorBackend *substrate.SandboxAgentActorBackend
4040
}
4141

go/core/internal/httpserver/server.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,19 @@ var defaultModelConfig = types.NamespacedName{
6262

6363
// ServerConfig holds the configuration for the HTTP server
6464
type ServerConfig struct {
65-
Router *mux.Router
66-
BindAddr string
67-
KubeClient ctrl_client.Client
68-
A2AHandler a2a.A2AHandlerMux
69-
MCPHandler *mcp.MCPHandler
70-
WatchedNamespaces []string
71-
DbClient dbpkg.Client
72-
Authenticator auth.AuthProvider
73-
Authorizer auth.Authorizer
74-
ProxyURL string
75-
Reconciler reconciler.KagentReconciler
76-
SandboxBackend sandboxbackend.Backend
77-
AgentHarnessGateway *handlers.AgentHarnessGatewayConfig
65+
Router *mux.Router
66+
BindAddr string
67+
KubeClient ctrl_client.Client
68+
A2AHandler a2a.A2AHandlerMux
69+
MCPHandler *mcp.MCPHandler
70+
WatchedNamespaces []string
71+
DbClient dbpkg.Client
72+
Authenticator auth.AuthProvider
73+
Authorizer auth.Authorizer
74+
ProxyURL string
75+
Reconciler reconciler.KagentReconciler
76+
SandboxBackend sandboxbackend.Backend
77+
AgentHarnessGateway *handlers.AgentHarnessGatewayConfig
7878
SubstrateAteClient *substrate.Client
7979
MCPEgressPlaintext bool
8080
SubstrateSandboxActorBackend *substrate.SandboxAgentActorBackend

go/core/pkg/app/app.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ type Config struct {
171171
PauseImage string
172172
RunscAMD64URL string
173173
RunscAMD64SHA256 string
174-
RunscARM64URL string
175-
RunscARM64SHA256 string
174+
RunscARM64URL string
175+
RunscARM64SHA256 string
176176
}
177177
}
178178

@@ -786,19 +786,19 @@ func Start(getExtensionConfig GetExtensionConfig, migrationRunner MigrationRunne
786786
}
787787

788788
httpServer, err := httpserver.NewHTTPServer(httpserver.ServerConfig{
789-
Router: router,
790-
BindAddr: cfg.HttpServerAddr,
791-
KubeClient: mgr.GetClient(),
792-
A2AHandler: a2aHandler,
793-
MCPHandler: mcpHandler,
794-
WatchedNamespaces: watchNamespacesList,
795-
DbClient: dbClient,
796-
Authorizer: extensionCfg.Authorizer,
797-
Authenticator: extensionCfg.Authenticator,
798-
ProxyURL: cfg.Proxy.URL,
799-
Reconciler: rcnclr,
800-
SandboxBackend: extensionCfg.SandboxBackend,
801-
AgentHarnessGateway: agentHarnessGateway,
789+
Router: router,
790+
BindAddr: cfg.HttpServerAddr,
791+
KubeClient: mgr.GetClient(),
792+
A2AHandler: a2aHandler,
793+
MCPHandler: mcpHandler,
794+
WatchedNamespaces: watchNamespacesList,
795+
DbClient: dbClient,
796+
Authorizer: extensionCfg.Authorizer,
797+
Authenticator: extensionCfg.Authenticator,
798+
ProxyURL: cfg.Proxy.URL,
799+
Reconciler: rcnclr,
800+
SandboxBackend: extensionCfg.SandboxBackend,
801+
AgentHarnessGateway: agentHarnessGateway,
802802
SubstrateAteClient: substrateAteClient,
803803
MCPEgressPlaintext: cfg.MCPEgressPlaintext,
804804
SubstrateSandboxActorBackend: substrateSandboxActorBackend,

go/core/pkg/sandboxbackend/substrate/agent_actor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func (b *SandboxAgentActorBackend) EnsureSessionActor(ctx context.Context, sa *v
6464
switch actor.GetStatus() {
6565
case ateapipb.Actor_STATUS_RUNNING, ateapipb.Actor_STATUS_RESUMING:
6666
case ateapipb.Actor_STATUS_SUSPENDED, ateapipb.Actor_STATUS_UNSPECIFIED:
67-
actor, err = b.client.ResumeActor(ctx, actorID)
67+
_, err = b.client.ResumeActor(ctx, actorID)
6868
if err != nil {
6969
return sandboxbackend.EnsureResult{}, wrapResumeActorError(actorID, err)
7070
}

go/core/pkg/sandboxbackend/substrate/lifecycle_shared.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ const (
1919

2020
// LifecycleDefaults are cluster-wide defaults for generated ActorTemplate lifecycle.
2121
type LifecycleDefaults struct {
22-
PauseImage string
23-
RunscAMD64URL string
24-
RunscAMD64SHA256 string
25-
RunscARM64URL string
26-
RunscARM64SHA256 string
22+
PauseImage string
23+
RunscAMD64URL string
24+
RunscAMD64SHA256 string
25+
RunscARM64URL string
26+
RunscARM64SHA256 string
2727
DefaultWorkloadImage string
2828
DefaultWorkerPool types.NamespacedName
2929
}
@@ -211,4 +211,3 @@ func sanitizeActorTemplateEnvVar(e corev1.EnvVar, namespace, name string) *corev
211211
}
212212
return nil
213213
}
214-

0 commit comments

Comments
 (0)