Skip to content

Commit

Permalink
fix: consider the schema active even with no runners
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas committed Sep 11, 2024
1 parent 6cb245a commit dce159a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions backend/controller/dal/internal/sql/queries.sql
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,9 @@ ORDER BY r.key;
SELECT sqlc.embed(d), m.name AS module_name, m.language, COUNT(r.id) AS replicas
FROM deployments d
JOIN modules m ON d.module_id = m.id
JOIN runners r ON d.id = r.deployment_id
LEFT JOIN runners r ON d.id = r.deployment_id
WHERE min_replicas > 0 AND r.state = 'assigned'
GROUP BY d.id, m.name, m.language
HAVING COUNT(r.id) > 0;
GROUP BY d.id, m.name, m.language;

-- name: GetDeploymentsWithMinReplicas :many
SELECT sqlc.embed(d), m.name AS module_name, m.language
Expand Down
3 changes: 1 addition & 2 deletions backend/controller/dal/internal/sql/queries.sql.go

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

2 changes: 1 addition & 1 deletion backend/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ func (s *Service) registrationLoop(ctx context.Context, send func(request *ftlv1
s.state.Store(state)
}

logger.Infof("Registering with Controller as %s for deployment %s", state, s.config.Deployment)
logger.Debugf("Registering with Controller as %s for deployment %s", state, s.config.Deployment)
err := send(&ftlv1.RegisterRunnerRequest{
Key: s.key.String(),
Endpoint: s.config.Advertise.String(),
Expand Down

0 comments on commit dce159a

Please sign in to comment.