open-sauced / pizza

This is an engine that sources git commits and turns them to insights
Apache License 2.0
31 stars 13 forks source link

Bug: Setting up local environment results in errors wit #56

Closed nickytonline closed 11 months ago

nickytonline commented 1 year ago

Describe the bug

Following the instructions for setting up the Pizza CLI for local development results in an error when running make setup-test-env.

Handling connection for 9999
psql: error: /Users/some-user/dev/work/pizza/hack/pizza.sql: No such file or directory
make: *** [setup-test-env] Error 1
E0919 12:49:45.592648   31550 portforward.go:409] an error occurred forwarding 9999 -> 5432: error forwarding port 5432 to pod a8071da163b126f8f3efd7580047ec63c41f8f31241fe4a54bb0625f1bd32d2d, uid : failed to execute portforward in network namespace "/var/run/netns/cni-da58f35f-967d-2c18-9476-cc53fa6450c8": read tcp4 127.0.0.1:55604->127.0.0.1:5432: read: connection reset by peer
error: lost connection to pod

Steps to reproduce

  1. If you follow the README instructions for setting up the project, everything goes well until you run make setup-test-env.
  2. Run make setup-test-env
  3. It will fail to complete with a log similar to this one.
❯ make setup-test-env                        
./hack/setup.sh
 ____  ____  ____  ____    __      _____  _  _  ____  _  _ 
(  _ \(_  _)(_   )(_   )  /__\    (  _  )( \/ )( ___)( \( )
 )___/ _)(_  / /_  / /_  /(__)\    )(_)(  \  /  )__)  )  ( 
(__)  (____)(____)(____)(__)(__)  (_____)  \/  (____)(_)\_)

           STARTING SETUP OF TEST KIND CLUSTER
                  AND POSTGRES DATABASE

###########################################################
Setting up kind kubernetes cluster
and postgres operators

Creating cluster "opensauced-pizza" ...
 ✓ Ensuring node image (kindest/node:v1.27.3) 🖼
 ✓ Preparing nodes 📦  
 ✓ Writing configuration 📜 
 ✓ Starting control-plane 🕹️ 
 ✓ Installing CNI 🔌 
 ✓ Installing StorageClass 💾 
Set kubectl context to "kind-opensauced-pizza"
You can now use your cluster with:

kubectl cluster-info --context kind-opensauced-pizza

Thanks for using kind! 😊
"postgres-operator-charts" already exists with the same configuration, skipping
NAME: postgres-operator
LAST DEPLOYED: Tue Sep 19 12:48:33 2023
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
To verify that postgres-operator has started, run:

  kubectl --namespace=default get pods -l "app.kubernetes.io/name=postgres-operator"
"postgres-operator-ui-charts" already exists with the same configuration, skipping
NAME: postgres-operator-ui
LAST DEPLOYED: Tue Sep 19 12:48:35 2023
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
To verify that postgres-operator has started, run:

  kubectl --namespace=default get pods -l "app.kubernetes.io/name=postgres-operator-ui"
Waiting for deployment spec update to be observed...
Waiting for deployment spec update to be observed...
Waiting for deployment "postgres-operator" rollout to finish: 0 out of 1 new replicas have been updated...
Waiting for deployment "postgres-operator" rollout to finish: 0 of 1 updated replicas are available...
deployment "postgres-operator" successfully rolled out
postgresql.acid.zalan.do/opensauced-pizza-postgres-cluster created
pod/opensauced-pizza-postgres-cluster-0 condition met

########################################################################
Opening port to postgres operator to apply database migrations

Forwarding from 127.0.0.1:9999 -> 5432
Forwarding from [::1]:9999 -> 5432
postgresql.acid.zalan.do/opensauced-pizza-postgres-cluster condition met

########################################################################
Applying database migrations

Handling connection for 9999
psql: error: /Users/some-user/dev/work/pizza/hack/pizza.sql: No such file or directory
make: *** [setup-test-env] Error 1
E0919 12:49:45.592648   31550 portforward.go:409] an error occurred forwarding 9999 -> 5432: error forwarding port 5432 to pod a8071da163b126f8f3efd7580047ec63c41f8f31241fe4a54bb0625f1bd32d2d, uid : failed to execute portforward in network namespace "/var/run/netns/cni-da58f35f-967d-2c18-9476-cc53fa6450c8": read tcp4 127.0.0.1:55604->127.0.0.1:5432: read: connection reset by peer
error: lost connection to pod

Browsers

No response

Additional context (Is this in dev or production?)

No response

Code of Conduct

Contributing Docs