Skip to content

Commit

Permalink
chore: remove unused runner language labels (#3341)
Browse files Browse the repository at this point in the history
This is no longer needed now that we provision runners for each module.
  • Loading branch information
matt2e authored Nov 6, 2024
1 parent 7e8abfa commit fdaa8bb
Show file tree
Hide file tree
Showing 7 changed files with 230 additions and 251 deletions.
2 changes: 1 addition & 1 deletion backend/controller/dal/dal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func TestDAL(t *testing.T) {
})

runnerID := model.NewRunnerKey("localhost", "8080")
labels := map[string]any{"languages": []any{"go"}}
labels := map[string]any{}

t.Run("RegisterRunner", func(t *testing.T) {
err = dal.UpsertRunner(ctx, dalmodel.Runner{
Expand Down
388 changes: 189 additions & 199 deletions backend/protos/xyz/block/ftl/v1/controller.pb.go

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions backend/protos/xyz/block/ftl/v1/controller.proto
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,9 @@ message StatusResponse {

message Runner {
string key = 1;
repeated string languages = 2;
string endpoint = 3;
optional string deployment = 5;
google.protobuf.Struct labels = 6;
string endpoint = 2;
optional string deployment = 3;
google.protobuf.Struct labels = 4;
}
repeated Runner runners = 2;

Expand Down
10 changes: 4 additions & 6 deletions backend/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ type Config struct {
TemplateDir string `help:"Template directory to copy into each deployment, if any." type:"existingdir"`
DeploymentDir string `help:"Directory to store deployments in." default:"${deploymentdir}"`
DeploymentKeepHistory int `help:"Number of deployments to keep history for." default:"3"`
Language []string `short:"l" help:"Languages the runner supports." env:"FTL_LANGUAGE" default:"go,kotlin,java"`
HeartbeatPeriod time.Duration `help:"Minimum period between heartbeats." default:"3s"`
HeartbeatJitter time.Duration `help:"Jitter to add to heartbeat period." default:"2s"`
Deployment string `help:"The deployment this runner is for." env:"FTL_DEPLOYMENT"`
Expand Down Expand Up @@ -90,11 +89,10 @@ func Start(ctx context.Context, config Config) error {
key = model.NewRunnerKey(config.Bind.Hostname(), config.Bind.Port())
}
labels, err := structpb.NewStruct(map[string]any{
"hostname": hostname,
"pid": pid,
"os": runtime.GOOS,
"arch": runtime.GOARCH,
"languages": slices.Map(config.Language, func(t string) any { return t }),
"hostname": hostname,
"pid": pid,
"os": runtime.GOOS,
"arch": runtime.GOARCH,
})
if err != nil {
observability.Runner.StartupFailed(ctx)
Expand Down
18 changes: 6 additions & 12 deletions frontend/console/src/protos/xyz/block/ftl/v1/controller_pb.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fdaa8bb

Please sign in to comment.