Skip to content

Commit

Permalink
fix: wait for provisioner
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas committed Oct 16, 2024
1 parent 6546b1e commit fe7e706
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions deployment/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ wait-for-kube:
#!/bin/bash
while [ -z "$(kubectl get pod ftl-postgresql-0)" ]; do sleep 1; done
kubectl wait --for=condition=ready pod/ftl-postgresql-0 --timeout=5m
kubectl rollout restart deployment ftl-controller || true # restart now the DB is up, otherwise it might be in crash loop backoff and take a while
kubectl wait --for=condition=available deployment/ftl-controller --timeout=5m
kubectl wait --for=condition=available deployment/ftl-provisioner --timeout=5m
sleep 1
ftl status

Expand Down
6 changes: 3 additions & 3 deletions internal/integration/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,13 +517,13 @@ func (i TestContext) dumpKubePods() {
path := filepath.Join(dumpPath, pod.Name, container.Name+".log")
req := client.CoreV1().Pods(i.kubeNamespace).GetLogs(pod.Name, &kubecore.PodLogOptions{Container: container.Name})
podLogs, err := req.Stream(context.Background())
defer func() {
_ = podLogs.Close()
}()
if err != nil {
Infof("Error getting logs for pod %s: %v", pod.Name, err)
continue
}
defer func() {
_ = podLogs.Close()
}()
buf := new(bytes.Buffer)
_, err = io.Copy(buf, podLogs)
if err != nil {
Expand Down

0 comments on commit fe7e706

Please sign in to comment.