Skip to content

Commit

Permalink
chore: add istio access logging to tests (#3311)
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas authored Nov 13, 2024
1 parent ce90215 commit b66fe24
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func TestKubeScaling(t *testing.T) {
go func() {
defer func() {
if r := recover(); r != nil {
failure.Store(fmt.Errorf("panic in verb: %v at %v", r, time.Now()))
failure.Store(fmt.Errorf("panic calling verb: %v at %v", r, time.Now()))
}
routineStopped.Done()
}()
Expand Down
4 changes: 4 additions & 0 deletions backend/provisioner/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,18 @@ func (s *Service) UploadArtefact(ctx context.Context, req *connect.Request[ftlv1
func (s *Service) GetSchema(ctx context.Context, req *connect.Request[ftlv1.GetSchemaRequest]) (*connect.Response[ftlv1.GetSchemaResponse], error) {
resp, err := s.controllerClient.GetSchema(ctx, req)
if err != nil {
logger := log.FromContext(ctx)
logger.Errorf(err, "get schema failed")
return nil, fmt.Errorf("call to ftl-controller failed: %w", err)
}
return connect.NewResponse(resp.Msg), nil
}

func (s *Service) PullSchema(ctx context.Context, req *connect.Request[ftlv1.PullSchemaRequest], to *connect.ServerStream[ftlv1.PullSchemaResponse]) error {
logger := log.FromContext(ctx)
stream, err := s.controllerClient.PullSchema(ctx, req)
if err != nil {
logger.Errorf(err, "pull schema failed")
return fmt.Errorf("call to ftl-controller failed: %w", err)
}
defer stream.Close()
Expand Down
1 change: 1 addition & 0 deletions deployment/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ setup-istio-cluster: setup-cluster
helm install istiod istio/istiod -n istio-system --wait
fi
kubectl label namespace default istio-injection=enabled --overwrite
kubectl apply -f istio-access-logs.yaml

setup: setup-registry setup-istio-cluster

Expand Down
9 changes: 9 additions & 0 deletions deployment/istio-access-logs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: telemetry.istio.io/v1
kind: Telemetry
metadata:
name: mesh-default
namespace: istio-system
spec:
accessLogging:
- providers:
- name: envoy

0 comments on commit b66fe24

Please sign in to comment.