diff --git a/.github/workflows/end2end.yml b/.github/workflows/end2end.yml deleted file mode 100644 index d7cf8182c0..0000000000 --- a/.github/workflows/end2end.yml +++ /dev/null @@ -1,124 +0,0 @@ -name: End to End tests - -on: - workflow_call: - inputs: - priorities: - description: "Priorities of tests to register (comma-separated)" - required: true - type: string - cache_key: - description: "Cache key for docker image" - required: true - type: string -jobs: - endtoend: - name: End to End tests - runs-on: ubuntu-latest - env: - FLYTESNACKS_VERSION: "" - steps: - - name: Set latest Flytesnacks release - if: ${{ env.FLYTESNACKS_VERSION == '' }} - run: | - FLYTESNACKS_VERSION="$(curl --silent https://api.github.com/repos/flyteorg/flytesnacks/releases/latest | jq -r .tag_name)" - echo "FLYTESNACKS_VERSION=${FLYTESNACKS_VERSION}" >> ${GITHUB_ENV} - - name: Checkout - uses: actions/checkout@v4 - - uses: unionai/flytectl-setup-action@v0.0.3 - name: Setup flytectl - - uses: actions/setup-python@v3 - with: - python-version: 3.11 - - id: load-docker-cache-datacatalog - uses: actions/cache@v3 - with: - path: /tmp/tmp/docker-images-datacatalog - key: ${{ inputs.cache_key }}-datacatalog - - id: load-docker-cache-flyteadmin - uses: actions/cache@v3 - with: - path: /tmp/tmp/docker-images-flyteadmin - key: ${{ inputs.cache_key }}-flyteadmin - - id: load-docker-cache-flytecopilot - uses: actions/cache@v3 - with: - path: /tmp/tmp/docker-images-flytecopilot - key: ${{ inputs.cache_key }}-flytecopilot - - id: load-docker-cache-flytepropeller - uses: actions/cache@v3 - with: - path: /tmp/tmp/docker-images-flytepropeller - key: ${{ inputs.cache_key }}-flytepropeller - - name: Create Sandbox Cluster - run: | - cp /tmp/tmp/docker-images-datacatalog/snapshot-datacatalog.tar snapshot-datacatalog.tar - cp /tmp/tmp/docker-images-flyteadmin/snapshot-flyteadmin.tar snapshot-flyteadmin.tar - cp /tmp/tmp/docker-images-flytecopilot/snapshot-flytecopilot.tar snapshot-flytecopilot.tar - cp /tmp/tmp/docker-images-flytepropeller/snapshot-flytepropeller.tar snapshot-flytepropeller.tar - flytectl config init - flytectl sandbox start --source=$(pwd) - - name: Prime docker cache - run: | - flytectl sandbox exec -- docker load -i /root/snapshot-datacatalog.tar - flytectl sandbox exec -- docker load -i /root/snapshot-flyteadmin.tar - flytectl sandbox exec -- docker load -i /root/snapshot-flytecopilot.tar - flytectl sandbox exec -- docker load -i /root/snapshot-flytepropeller.tar - - name: Setup Flytekit - run: | - python -m pip install --upgrade pip - pip install flytekit flytekitplugins-deck-standard - pip freeze - - name: Checkout flytesnacks - if: ${{ inputs.priorities == 'P0' }} - uses: actions/checkout@v4 - with: - repository: flyteorg/flytesnacks - path: flytesnacks - ref: ${{ env.FLYTESNACKS_VERSION }} - - name: Register P0 tests - if: ${{ inputs.priorities == 'P0' }} - run: | - while read -r line; - do - pyflyte --config ./boilerplate/flyte/end2end/functional-test-config.yaml \ - register \ - --project flytesnacks \ - --domain development \ - --image cr.flyte.org/flyteorg/flytekit:py3.11-latest \ - --version ${{ env.FLYTESNACKS_VERSION }} \ - flytesnacks/$line; - done < flytesnacks/flyte_tests.txt - - name: Register all flytesnacks examples - if: ${{ inputs.priorities != 'P0' }} - uses: unionai/flyte-register-action@v0.0.2 - with: - flytesnacks: true - project: flytesnacks - version: ${{ env.FLYTESNACKS_VERSION }} - domain: development - # - name: Pre Upgrade Tests - # if: ${{ github.event.repository.name == 'flyteadmin' }} - # env: - # PRIORITIES: "${{ inputs.priorities }}" - # run: | - # make end2end_execute - - name: Upgrade Helm charts - run: | - flytectl sandbox exec -- helm repo add flyteorg https://flyteorg.github.io/flyte - flytectl sandbox exec -- helm repo update - flytectl sandbox exec -- helm upgrade flyte -n flyte-core --kubeconfig=/etc/rancher/k3s/k3s.yaml flyteorg/flyte-core -f /flyteorg/share/flyte/values-sandbox.yaml --wait --set datacatalog.image.repository=${{ github.repository_owner }}/datacalog,datacatalog.image.tag=latest - # TODO(monorepo): the following commands are not correct. - # we have to separate the calls to replace the images into different commands. - # flytectl sandbox exec -- helm upgrade flyte -n flyte-core --kubeconfig=/etc/rancher/k3s/k3s.yaml flyteorg/flyte-core -f /flyteorg/share/flyte/values-sandbox.yaml --wait \ - # --set datacatalog.image.repository=${{ github.repository_owner }}/datacalog,datacatalog.image.tag=latest - # --set flyteadmin.image.repository=${{ github.repository_owner }}/datacalog,flyteadmin.image.tag=latest - # --set flytecopilot.image.repository=${{ github.repository_owner }}/datacalog,flytecopilot.image.tag=latest - # --set flytepropeller.image.repository=${{ github.repository_owner }}/datacalog,flytepropeller.image.tag=latest - - flytectl sandbox exec -- k3s kubectl get pods -n flyte -oyaml - - name: Post Upgrade Tests - env: - PRIORITIES: "${{ inputs.priorities }}" - run: | - make end2end_execute