<#3692 Add default project if SeedProjects is not ...
# flyte-github
a
#3692 Add default project if SeedProjects is not set Pull request opened by Yicheng-Lu-llll Tracking issue Describe your changes After PR3631, If
SeedProjects
is not set, there will be no default project in the console. This change may impact backward compatibility and could potentially create hurdles for new users. Specifically, those following the startup guide to build a local cluster and run sample files from the Flytesnacks repository may encounter difficulties. For example, A new user might run:
Copy code
# build the local cluster and start the flyte
cd /home/ubuntu
# install jq
sudo apt-get -y install jq

# install flytekit
pip install flytekit
export PATH=$PATH:~/.local/bin

# install flytectl
git clone <https://github.com/flyteorg/flytectl.git>
cd flytectl
sudo bash ./install.sh -b /usr/local/bin v0.6.17
cd ..
export FLYTECTL_CONFIG=/root/.flyte/config-sandbox.yaml

# start k3scluster, create pod for postgres, minio and dashboard
flytectl demo start --dev --image pingsutw/sandbox-lite-test

# connect to k3scluster
export KUBECONFIG=$KUBECONFIG:/root/.flyte/k3s/k3s.yaml
kubectl get pod -n flyte # check


# build and run all other the flyte components
git clone <https://github.com/flyteorg/flyte.git>
cd flyte
# replace with your repo
# go mod edit -replace <http://github.com/flyteorg/flyteplugins=github.com/flyteorg/flyteplugins@v1.0.37|github.com/flyteorg/flyteplugins=github.com/flyteorg/flyteplugins@v1.0.37>
go mod tidy
sudo make compile
flyte start --config flyte_local.yaml
then, when the new user try to test the sample files under Flytesnacks repository after PR3631:
Copy code
cd /home/ubuntu

export PATH=$PATH:~/.local/bin
export FLYTECTL_CONFIG=/root/.flyte/config-sandbox.yaml
export KUBECONFIG=$KUBECONFIG:/root/.kube/config:/root/.flyte/k3s/k3s.yaml

# run an sample to test
git clone <https://github.com/flyteorg/flytesnacks>
cd flytesnacks/cookbook
pip install -r core/requirements.txt
# python3 core/flyte_basics/hello_world.py
# pyflyte run core/flyte_basics/hello_world.py my_wf
pyflyte run --remote core/flyte_basics/hello_world.py my_wf
Will get error becasue flytesnacks project does not exist:
Copy code
2023/05/17 04:24:07 /root/go/pkg/mod/gorm.io/gorm@v1.24.1-0.20221019064659-5dd2bb482755/callbacks.go:134 record not found
[0.817ms] [rows:0] SELECT * FROM "projects" WHERE "projects"."identifier" = 'flytesnacks' LIMIT 1
{"json":{"src":"task_manager.go:70"},"level":"debug","msg":"Task [resource_type:TASK project:\"flytesnacks\" domain:\"development\" name:\"core.flyte_basics.hello_world.say_hello\" version:\"0Dj6bF9kDPwqJuKCrijznA==\" ] failed validation with err:
So, this PR add back the
flytesnacks
if
SeedProjects
is not set. Check all the applicable boxes ☐ I updated the documentation accordingly. ☐ All new and existing tests passed. ☐ All commits are signed-off. Screenshots Checks: with out setting `SeedProjects`:

image

Checks: setting `SeedProjects`:

image

Note to reviewers flyteorg/flyte GitHub Actions: build-and-push-sandbox-bundled-image 9 other checks have passed 9/10 successful checks