diff --git a/.github/workflows/checks_new.yml b/.github/workflows/checks_new.yml index 9635248ee..5881cfcd2 100644 --- a/.github/workflows/checks_new.yml +++ b/.github/workflows/checks_new.yml @@ -26,20 +26,19 @@ jobs: run: | echo "PACKAGES=$(find examples -maxdepth 1 -type d -exec basename '{}' \; \ | grep -v -e 'testing' -e 'examples' \ - | grep -v -e 'airflow_plugin' -e 'forecasting_sales' -e 'onnx_plugin' -e 'feast_integration' -e 'modin_plugin' \ + | grep -v -e 'airflow_plugin' -e 'forecasting_sales' -e 'onnx_plugin' -e 'feast_integration' -e 'modin_plugin' -e 'sagemaker_inference_agent' \ | sort \ | jq --raw-input . \ | jq --slurp . \ | jq -c .)" >> "$GITHUB_OUTPUT" outputs: packages: "${{ steps.create-example-list.outputs.PACKAGES }}" - serialize_examples: + serialize: needs: [list_examples] runs-on: "ubuntu-latest" env: FLYTE_SDK_RICH_TRACEBACKS: "0" PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: python - name: Serialize strategy: fail-fast: false matrix: @@ -74,11 +73,46 @@ jobs: - name: Pyflyte package working-directory: examples/${{ matrix.example }} run: | - pip freeze source .venv/bin/activate pyflyte \ --pkgs ${{ matrix.example }} package \ --image mindmeld="ghcr.io/flyteorg/flytecookbook:core-latest" \ --image borebuster="ghcr.io/flyteorg/flytekit:py3.9-latest" \ - --output spark-package.tgz \ + --output /root/flyte-package.tgz \ --force + tar -xvf flyte-package.tgz + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: snacks-${{ matrix.example }} + path: examples/${{ matrix.example }}/**/*.pb + + # Download all artifacts generated from the previous job. Startup a sandbox cluster then register all of them. + register: + name: Register example to sandbox + runs-on: ubuntu-latest + needs: [ "serialize" ] + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: "0" + - uses: unionai/flytectl-setup-action@v0.0.1 + - name: setup download artifact dir + run: | + mkdir download-artifact + - name: Download artifacts + uses: actions/download-artifact@v2 + with: + path: ./download-artifact/ + - name: setup sandbox + run: | + flytectl demo start + flytectl config init + - name: Register examples + uses: unionai/flyte-register-action@v0.0.2 + with: + flytesnacks: false + proto: ./download-artifact/**/* + project: flytesnacks + version: "latest" + domain: development \ No newline at end of file diff --git a/scripts/serialize-example.sh b/scripts/serialize-example.sh index 57965cf64..5898a3ae6 100755 --- a/scripts/serialize-example.sh +++ b/scripts/serialize-example.sh @@ -17,7 +17,7 @@ serialize() { --image "$2" \ --image mindmeld="ghcr.io/flyteorg/flytecookbook:core-latest" \ --image borebuster="ghcr.io/flyteorg/flytekit:py3.9-latest" \ - --output /root/flyte-package.tgz \ + --output flyte-package.tgz \ --force }