diff --git a/.github/workflows/Makefile b/.github/workflows/Makefile index 8d0c039dc..8673c0e9c 100644 --- a/.github/workflows/Makefile +++ b/.github/workflows/Makefile @@ -44,12 +44,6 @@ transform-tests: echo No kfp_ray directory for $$dir. Skipping generation of $$yml; \ continue; \ fi; \ - z=$$(echo $${KFP_BLACK_LIST} | grep $$dir); \ - if [ ! -z "$$z" ]; then \ - echo $$dir is black listed. Skipping generation of $$yml; \ - continue; \ - fi; \ - echo Generating $$yml; \ cat test-kfp-transform.template | sed -e "s?@TARGET_TRANSFORM_DIR@?transforms/$${TRANSFORM_SUBDIR}/$$dir?g" > $$yml; \ fi; \ done diff --git a/.github/workflows/test-code-code2parquet-kfp.yml b/.github/workflows/test-code-code2parquet-kfp.yml index 9b0a92042..4cb943469 100644 --- a/.github/workflows/test-code-code2parquet-kfp.yml +++ b/.github/workflows/test-code-code2parquet-kfp.yml @@ -56,33 +56,26 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV - name: Test V1 KFP workflow for transforms/code/code2parquet timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/code/code2parquet/Makefile" -a -e "transforms/code/code2parquet/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/code/code2parquet workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/code/code2parquet workflow-test - echo "Run transforms/code/code2parquet completed" - else - echo "Skipping transforms/code/code2parquet kfp test for lack of Makefile and/or kfp_ray/Makefile" + transform=$(basename "transforms/code/code2parquet") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/code/code2parquet + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/code/code2parquet + fi + else + echo "Skipping transforms/code/code2parquet kfp test for lack of Makefile and/or kfp_ray/Makefile" fi test-kfp-v2: @@ -99,32 +92,25 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + echo "KFPv2=1" >> $GITHUB_ENV - name: Test V2 KFP workflow for transforms/code/code2parquet timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/code/code2parquet/Makefile" -a -e "transforms/code/code2parquet/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - export KFPv2=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/code/code2parquet workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/code/code2parquet workflow-test - echo "Run transforms/code/code2parquet completed" + transform=$(basename "transforms/code/code2parquet") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/code/code2parquet + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/code/code2parquet + fi else - echo "Skipping transforms/code/code2parquet kfp test for lack of Makefile and/or kfp_ray/Makefile" - fi + echo "Skipping transforms/code/code2parquet kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi \ No newline at end of file diff --git a/.github/workflows/test-code-code_quality-kfp.yml b/.github/workflows/test-code-code_quality-kfp.yml index 504923b6b..f177d8a37 100644 --- a/.github/workflows/test-code-code_quality-kfp.yml +++ b/.github/workflows/test-code-code_quality-kfp.yml @@ -56,33 +56,26 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV - name: Test V1 KFP workflow for transforms/code/code_quality timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/code/code_quality/Makefile" -a -e "transforms/code/code_quality/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/code/code_quality workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/code/code_quality workflow-test - echo "Run transforms/code/code_quality completed" - else - echo "Skipping transforms/code/code_quality kfp test for lack of Makefile and/or kfp_ray/Makefile" + transform=$(basename "transforms/code/code_quality") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/code/code_quality + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/code/code_quality + fi + else + echo "Skipping transforms/code/code_quality kfp test for lack of Makefile and/or kfp_ray/Makefile" fi test-kfp-v2: @@ -99,32 +92,25 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + echo "KFPv2=1" >> $GITHUB_ENV - name: Test V2 KFP workflow for transforms/code/code_quality timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/code/code_quality/Makefile" -a -e "transforms/code/code_quality/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - export KFPv2=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/code/code_quality workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/code/code_quality workflow-test - echo "Run transforms/code/code_quality completed" + transform=$(basename "transforms/code/code_quality") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/code/code_quality + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/code/code_quality + fi else - echo "Skipping transforms/code/code_quality kfp test for lack of Makefile and/or kfp_ray/Makefile" - fi + echo "Skipping transforms/code/code_quality kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi \ No newline at end of file diff --git a/.github/workflows/test-code-header_cleanser-kfp.yml b/.github/workflows/test-code-header_cleanser-kfp.yml index b1f4f1b1b..2b5538806 100644 --- a/.github/workflows/test-code-header_cleanser-kfp.yml +++ b/.github/workflows/test-code-header_cleanser-kfp.yml @@ -56,33 +56,26 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV - name: Test V1 KFP workflow for transforms/code/header_cleanser timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/code/header_cleanser/Makefile" -a -e "transforms/code/header_cleanser/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/code/header_cleanser workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/code/header_cleanser workflow-test - echo "Run transforms/code/header_cleanser completed" - else - echo "Skipping transforms/code/header_cleanser kfp test for lack of Makefile and/or kfp_ray/Makefile" + transform=$(basename "transforms/code/header_cleanser") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/code/header_cleanser + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/code/header_cleanser + fi + else + echo "Skipping transforms/code/header_cleanser kfp test for lack of Makefile and/or kfp_ray/Makefile" fi test-kfp-v2: @@ -99,32 +92,25 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + echo "KFPv2=1" >> $GITHUB_ENV - name: Test V2 KFP workflow for transforms/code/header_cleanser timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/code/header_cleanser/Makefile" -a -e "transforms/code/header_cleanser/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - export KFPv2=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/code/header_cleanser workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/code/header_cleanser workflow-test - echo "Run transforms/code/header_cleanser completed" + transform=$(basename "transforms/code/header_cleanser") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/code/header_cleanser + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/code/header_cleanser + fi else - echo "Skipping transforms/code/header_cleanser kfp test for lack of Makefile and/or kfp_ray/Makefile" - fi + echo "Skipping transforms/code/header_cleanser kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi \ No newline at end of file diff --git a/.github/workflows/test-code-license_select-kfp.yml b/.github/workflows/test-code-license_select-kfp.yml index 0e953a09a..89e7deae6 100644 --- a/.github/workflows/test-code-license_select-kfp.yml +++ b/.github/workflows/test-code-license_select-kfp.yml @@ -56,33 +56,26 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV - name: Test V1 KFP workflow for transforms/code/license_select timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/code/license_select/Makefile" -a -e "transforms/code/license_select/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/code/license_select workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/code/license_select workflow-test - echo "Run transforms/code/license_select completed" - else - echo "Skipping transforms/code/license_select kfp test for lack of Makefile and/or kfp_ray/Makefile" + transform=$(basename "transforms/code/license_select") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/code/license_select + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/code/license_select + fi + else + echo "Skipping transforms/code/license_select kfp test for lack of Makefile and/or kfp_ray/Makefile" fi test-kfp-v2: @@ -99,32 +92,25 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + echo "KFPv2=1" >> $GITHUB_ENV - name: Test V2 KFP workflow for transforms/code/license_select timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/code/license_select/Makefile" -a -e "transforms/code/license_select/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - export KFPv2=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/code/license_select workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/code/license_select workflow-test - echo "Run transforms/code/license_select completed" + transform=$(basename "transforms/code/license_select") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/code/license_select + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/code/license_select + fi else - echo "Skipping transforms/code/license_select kfp test for lack of Makefile and/or kfp_ray/Makefile" - fi + echo "Skipping transforms/code/license_select kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi \ No newline at end of file diff --git a/.github/workflows/test-code-malware-kfp.yml b/.github/workflows/test-code-malware-kfp.yml index df580decb..389a04555 100644 --- a/.github/workflows/test-code-malware-kfp.yml +++ b/.github/workflows/test-code-malware-kfp.yml @@ -56,33 +56,26 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV - name: Test V1 KFP workflow for transforms/code/malware timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/code/malware/Makefile" -a -e "transforms/code/malware/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/code/malware workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/code/malware workflow-test - echo "Run transforms/code/malware completed" - else - echo "Skipping transforms/code/malware kfp test for lack of Makefile and/or kfp_ray/Makefile" + transform=$(basename "transforms/code/malware") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/code/malware + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/code/malware + fi + else + echo "Skipping transforms/code/malware kfp test for lack of Makefile and/or kfp_ray/Makefile" fi test-kfp-v2: @@ -99,32 +92,25 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + echo "KFPv2=1" >> $GITHUB_ENV - name: Test V2 KFP workflow for transforms/code/malware timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/code/malware/Makefile" -a -e "transforms/code/malware/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - export KFPv2=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/code/malware workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/code/malware workflow-test - echo "Run transforms/code/malware completed" + transform=$(basename "transforms/code/malware") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/code/malware + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/code/malware + fi else - echo "Skipping transforms/code/malware kfp test for lack of Makefile and/or kfp_ray/Makefile" - fi + echo "Skipping transforms/code/malware kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi \ No newline at end of file diff --git a/.github/workflows/test-code-proglang_select-kfp.yml b/.github/workflows/test-code-proglang_select-kfp.yml index b7ee58f2a..09fd67520 100644 --- a/.github/workflows/test-code-proglang_select-kfp.yml +++ b/.github/workflows/test-code-proglang_select-kfp.yml @@ -56,33 +56,26 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV - name: Test V1 KFP workflow for transforms/code/proglang_select timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/code/proglang_select/Makefile" -a -e "transforms/code/proglang_select/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/code/proglang_select workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/code/proglang_select workflow-test - echo "Run transforms/code/proglang_select completed" - else - echo "Skipping transforms/code/proglang_select kfp test for lack of Makefile and/or kfp_ray/Makefile" + transform=$(basename "transforms/code/proglang_select") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/code/proglang_select + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/code/proglang_select + fi + else + echo "Skipping transforms/code/proglang_select kfp test for lack of Makefile and/or kfp_ray/Makefile" fi test-kfp-v2: @@ -99,32 +92,25 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + echo "KFPv2=1" >> $GITHUB_ENV - name: Test V2 KFP workflow for transforms/code/proglang_select timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/code/proglang_select/Makefile" -a -e "transforms/code/proglang_select/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - export KFPv2=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/code/proglang_select workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/code/proglang_select workflow-test - echo "Run transforms/code/proglang_select completed" + transform=$(basename "transforms/code/proglang_select") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/code/proglang_select + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/code/proglang_select + fi else - echo "Skipping transforms/code/proglang_select kfp test for lack of Makefile and/or kfp_ray/Makefile" - fi + echo "Skipping transforms/code/proglang_select kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi \ No newline at end of file diff --git a/.github/workflows/test-code-repo_level_ordering-kfp.yml b/.github/workflows/test-code-repo_level_ordering-kfp.yml index 3f11db5bb..a3813bc62 100644 --- a/.github/workflows/test-code-repo_level_ordering-kfp.yml +++ b/.github/workflows/test-code-repo_level_ordering-kfp.yml @@ -56,33 +56,26 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV - name: Test V1 KFP workflow for transforms/code/repo_level_ordering timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/code/repo_level_ordering/Makefile" -a -e "transforms/code/repo_level_ordering/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/code/repo_level_ordering workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/code/repo_level_ordering workflow-test - echo "Run transforms/code/repo_level_ordering completed" - else - echo "Skipping transforms/code/repo_level_ordering kfp test for lack of Makefile and/or kfp_ray/Makefile" + transform=$(basename "transforms/code/repo_level_ordering") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/code/repo_level_ordering + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/code/repo_level_ordering + fi + else + echo "Skipping transforms/code/repo_level_ordering kfp test for lack of Makefile and/or kfp_ray/Makefile" fi test-kfp-v2: @@ -99,32 +92,25 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + echo "KFPv2=1" >> $GITHUB_ENV - name: Test V2 KFP workflow for transforms/code/repo_level_ordering timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/code/repo_level_ordering/Makefile" -a -e "transforms/code/repo_level_ordering/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - export KFPv2=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/code/repo_level_ordering workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/code/repo_level_ordering workflow-test - echo "Run transforms/code/repo_level_ordering completed" + transform=$(basename "transforms/code/repo_level_ordering") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/code/repo_level_ordering + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/code/repo_level_ordering + fi else - echo "Skipping transforms/code/repo_level_ordering kfp test for lack of Makefile and/or kfp_ray/Makefile" - fi + echo "Skipping transforms/code/repo_level_ordering kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi \ No newline at end of file diff --git a/.github/workflows/test-kfp-transform.template b/.github/workflows/test-kfp-transform.template index 29bba2634..f9ace4831 100644 --- a/.github/workflows/test-kfp-transform.template +++ b/.github/workflows/test-kfp-transform.template @@ -56,33 +56,26 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV - name: Test V1 KFP workflow for @TARGET_TRANSFORM_DIR@ timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "@TARGET_TRANSFORM_DIR@/Makefile" -a -e "@TARGET_TRANSFORM_DIR@/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C @TARGET_TRANSFORM_DIR@ workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C @TARGET_TRANSFORM_DIR@ workflow-test - echo "Run @TARGET_TRANSFORM_DIR@ completed" - else - echo "Skipping @TARGET_TRANSFORM_DIR@ kfp test for lack of Makefile and/or kfp_ray/Makefile" + transform=$(basename "@TARGET_TRANSFORM_DIR@") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow @TARGET_TRANSFORM_DIR@ + else + $PWD/scripts/workflow_helper.sh build-workflow @TARGET_TRANSFORM_DIR@ + fi + else + echo "Skipping @TARGET_TRANSFORM_DIR@ kfp test for lack of Makefile and/or kfp_ray/Makefile" fi test-kfp-v2: @@ -99,32 +92,25 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + echo "KFPv2=1" >> $GITHUB_ENV - name: Test V2 KFP workflow for @TARGET_TRANSFORM_DIR@ timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "@TARGET_TRANSFORM_DIR@/Makefile" -a -e "@TARGET_TRANSFORM_DIR@/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - export KFPv2=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C @TARGET_TRANSFORM_DIR@ workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C @TARGET_TRANSFORM_DIR@ workflow-test - echo "Run @TARGET_TRANSFORM_DIR@ completed" + transform=$(basename "@TARGET_TRANSFORM_DIR@") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow @TARGET_TRANSFORM_DIR@ + else + $PWD/scripts/workflow_helper.sh build-workflow @TARGET_TRANSFORM_DIR@ + fi else - echo "Skipping @TARGET_TRANSFORM_DIR@ kfp test for lack of Makefile and/or kfp_ray/Makefile" - fi + echo "Skipping @TARGET_TRANSFORM_DIR@ kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi \ No newline at end of file diff --git a/.github/workflows/test-language-doc_chunk-kfp.yml b/.github/workflows/test-language-doc_chunk-kfp.yml new file mode 100644 index 000000000..f689f1d1b --- /dev/null +++ b/.github/workflows/test-language-doc_chunk-kfp.yml @@ -0,0 +1,116 @@ +# +# DO NOT EDIT THIS FILE: it is generated from test-transform.template, Edit there and run make to change these files +# +name: Test KFP - transforms/language/doc_chunk + +on: + workflow_dispatch: + push: + branches: + - "dev" + - "releases/**" + tags: + - "*" + paths: + - ".make.*" + - "transforms/.make.workflows" + - "transforms/language/doc_chunk/**" + - "!kfp/**" # This is tested in separate workflow + - "!data-processing-lib/**" # This is tested in separate workflow + - "!**.md" + - "!**/doc/**" + - "!**/images/**" + - "!**.gitignore" + pull_request: + branches: + - "dev" + - "releases/**" + paths: + - ".make.*" + - "transforms/.make.workflows" + - "transforms/language/doc_chunk/**" + - "!data-processing-lib/**" # This is tested in separate workflow + - "!kfp/**" # This is tested in separate workflow + - "!**.md" + - "!**/doc/**" + - "!**/images/**" + - "!**.gitignore" + +# taken from https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + test-kfp-v1: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Free up space in github runner + # Free space as indicated here : https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 + run: | + df -h + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup + sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true + df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + - name: Test V1 KFP workflow for transforms/language/doc_chunk + timeout-minutes: 120 + run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) + if [ -e "transforms/language/doc_chunk/Makefile" -a -e "transforms/language/doc_chunk/kfp_ray/Makefile" ]; then + transform=$(basename "transforms/language/doc_chunk") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/language/doc_chunk + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/language/doc_chunk + fi + else + echo "Skipping transforms/language/doc_chunk kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi + + test-kfp-v2: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Free up space in github runner + # Free space as indicated here : https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 + run: | + df -h + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup + sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true + df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + echo "KFPv2=1" >> $GITHUB_ENV + - name: Test V2 KFP workflow for transforms/language/doc_chunk + timeout-minutes: 120 + run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) + if [ -e "transforms/language/doc_chunk/Makefile" -a -e "transforms/language/doc_chunk/kfp_ray/Makefile" ]; then + transform=$(basename "transforms/language/doc_chunk") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/language/doc_chunk + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/language/doc_chunk + fi + else + echo "Skipping transforms/language/doc_chunk kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi \ No newline at end of file diff --git a/.github/workflows/test-language-doc_quality-kfp.yml b/.github/workflows/test-language-doc_quality-kfp.yml index 35811aecb..3bb709515 100644 --- a/.github/workflows/test-language-doc_quality-kfp.yml +++ b/.github/workflows/test-language-doc_quality-kfp.yml @@ -56,33 +56,26 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV - name: Test V1 KFP workflow for transforms/language/doc_quality timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/language/doc_quality/Makefile" -a -e "transforms/language/doc_quality/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/language/doc_quality workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/language/doc_quality workflow-test - echo "Run transforms/language/doc_quality completed" - else - echo "Skipping transforms/language/doc_quality kfp test for lack of Makefile and/or kfp_ray/Makefile" + transform=$(basename "transforms/language/doc_quality") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/language/doc_quality + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/language/doc_quality + fi + else + echo "Skipping transforms/language/doc_quality kfp test for lack of Makefile and/or kfp_ray/Makefile" fi test-kfp-v2: @@ -99,32 +92,25 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + echo "KFPv2=1" >> $GITHUB_ENV - name: Test V2 KFP workflow for transforms/language/doc_quality timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/language/doc_quality/Makefile" -a -e "transforms/language/doc_quality/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - export KFPv2=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/language/doc_quality workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/language/doc_quality workflow-test - echo "Run transforms/language/doc_quality completed" + transform=$(basename "transforms/language/doc_quality") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/language/doc_quality + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/language/doc_quality + fi else - echo "Skipping transforms/language/doc_quality kfp test for lack of Makefile and/or kfp_ray/Makefile" - fi + echo "Skipping transforms/language/doc_quality kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi \ No newline at end of file diff --git a/.github/workflows/test-language-lang_id-kfp.yml b/.github/workflows/test-language-lang_id-kfp.yml index a6cd597b2..da2f3bee3 100644 --- a/.github/workflows/test-language-lang_id-kfp.yml +++ b/.github/workflows/test-language-lang_id-kfp.yml @@ -56,33 +56,26 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV - name: Test V1 KFP workflow for transforms/language/lang_id timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/language/lang_id/Makefile" -a -e "transforms/language/lang_id/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/language/lang_id workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/language/lang_id workflow-test - echo "Run transforms/language/lang_id completed" - else - echo "Skipping transforms/language/lang_id kfp test for lack of Makefile and/or kfp_ray/Makefile" + transform=$(basename "transforms/language/lang_id") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/language/lang_id + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/language/lang_id + fi + else + echo "Skipping transforms/language/lang_id kfp test for lack of Makefile and/or kfp_ray/Makefile" fi test-kfp-v2: @@ -99,32 +92,25 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + echo "KFPv2=1" >> $GITHUB_ENV - name: Test V2 KFP workflow for transforms/language/lang_id timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/language/lang_id/Makefile" -a -e "transforms/language/lang_id/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - export KFPv2=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/language/lang_id workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/language/lang_id workflow-test - echo "Run transforms/language/lang_id completed" + transform=$(basename "transforms/language/lang_id") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/language/lang_id + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/language/lang_id + fi else - echo "Skipping transforms/language/lang_id kfp test for lack of Makefile and/or kfp_ray/Makefile" - fi + echo "Skipping transforms/language/lang_id kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi \ No newline at end of file diff --git a/.github/workflows/test-language-pdf2parquet-kfp.yml b/.github/workflows/test-language-pdf2parquet-kfp.yml new file mode 100644 index 000000000..45b99cdc6 --- /dev/null +++ b/.github/workflows/test-language-pdf2parquet-kfp.yml @@ -0,0 +1,116 @@ +# +# DO NOT EDIT THIS FILE: it is generated from test-transform.template, Edit there and run make to change these files +# +name: Test KFP - transforms/language/pdf2parquet + +on: + workflow_dispatch: + push: + branches: + - "dev" + - "releases/**" + tags: + - "*" + paths: + - ".make.*" + - "transforms/.make.workflows" + - "transforms/language/pdf2parquet/**" + - "!kfp/**" # This is tested in separate workflow + - "!data-processing-lib/**" # This is tested in separate workflow + - "!**.md" + - "!**/doc/**" + - "!**/images/**" + - "!**.gitignore" + pull_request: + branches: + - "dev" + - "releases/**" + paths: + - ".make.*" + - "transforms/.make.workflows" + - "transforms/language/pdf2parquet/**" + - "!data-processing-lib/**" # This is tested in separate workflow + - "!kfp/**" # This is tested in separate workflow + - "!**.md" + - "!**/doc/**" + - "!**/images/**" + - "!**.gitignore" + +# taken from https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + test-kfp-v1: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Free up space in github runner + # Free space as indicated here : https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 + run: | + df -h + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup + sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true + df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + - name: Test V1 KFP workflow for transforms/language/pdf2parquet + timeout-minutes: 120 + run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) + if [ -e "transforms/language/pdf2parquet/Makefile" -a -e "transforms/language/pdf2parquet/kfp_ray/Makefile" ]; then + transform=$(basename "transforms/language/pdf2parquet") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/language/pdf2parquet + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/language/pdf2parquet + fi + else + echo "Skipping transforms/language/pdf2parquet kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi + + test-kfp-v2: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Free up space in github runner + # Free space as indicated here : https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 + run: | + df -h + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup + sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true + df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + echo "KFPv2=1" >> $GITHUB_ENV + - name: Test V2 KFP workflow for transforms/language/pdf2parquet + timeout-minutes: 120 + run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) + if [ -e "transforms/language/pdf2parquet/Makefile" -a -e "transforms/language/pdf2parquet/kfp_ray/Makefile" ]; then + transform=$(basename "transforms/language/pdf2parquet") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/language/pdf2parquet + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/language/pdf2parquet + fi + else + echo "Skipping transforms/language/pdf2parquet kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi \ No newline at end of file diff --git a/.github/workflows/test-language-pii_redactor-kfp.yml b/.github/workflows/test-language-pii_redactor-kfp.yml new file mode 100644 index 000000000..17c42ba2a --- /dev/null +++ b/.github/workflows/test-language-pii_redactor-kfp.yml @@ -0,0 +1,116 @@ +# +# DO NOT EDIT THIS FILE: it is generated from test-transform.template, Edit there and run make to change these files +# +name: Test KFP - transforms/language/pii_redactor + +on: + workflow_dispatch: + push: + branches: + - "dev" + - "releases/**" + tags: + - "*" + paths: + - ".make.*" + - "transforms/.make.workflows" + - "transforms/language/pii_redactor/**" + - "!kfp/**" # This is tested in separate workflow + - "!data-processing-lib/**" # This is tested in separate workflow + - "!**.md" + - "!**/doc/**" + - "!**/images/**" + - "!**.gitignore" + pull_request: + branches: + - "dev" + - "releases/**" + paths: + - ".make.*" + - "transforms/.make.workflows" + - "transforms/language/pii_redactor/**" + - "!data-processing-lib/**" # This is tested in separate workflow + - "!kfp/**" # This is tested in separate workflow + - "!**.md" + - "!**/doc/**" + - "!**/images/**" + - "!**.gitignore" + +# taken from https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + test-kfp-v1: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Free up space in github runner + # Free space as indicated here : https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 + run: | + df -h + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup + sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true + df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + - name: Test V1 KFP workflow for transforms/language/pii_redactor + timeout-minutes: 120 + run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) + if [ -e "transforms/language/pii_redactor/Makefile" -a -e "transforms/language/pii_redactor/kfp_ray/Makefile" ]; then + transform=$(basename "transforms/language/pii_redactor") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/language/pii_redactor + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/language/pii_redactor + fi + else + echo "Skipping transforms/language/pii_redactor kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi + + test-kfp-v2: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Free up space in github runner + # Free space as indicated here : https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 + run: | + df -h + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup + sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true + df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + echo "KFPv2=1" >> $GITHUB_ENV + - name: Test V2 KFP workflow for transforms/language/pii_redactor + timeout-minutes: 120 + run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) + if [ -e "transforms/language/pii_redactor/Makefile" -a -e "transforms/language/pii_redactor/kfp_ray/Makefile" ]; then + transform=$(basename "transforms/language/pii_redactor") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/language/pii_redactor + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/language/pii_redactor + fi + else + echo "Skipping transforms/language/pii_redactor kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi \ No newline at end of file diff --git a/.github/workflows/test-language-text_encoder-kfp.yml b/.github/workflows/test-language-text_encoder-kfp.yml index 3f74c5861..4129ae677 100644 --- a/.github/workflows/test-language-text_encoder-kfp.yml +++ b/.github/workflows/test-language-text_encoder-kfp.yml @@ -56,33 +56,26 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV - name: Test V1 KFP workflow for transforms/language/text_encoder timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/language/text_encoder/Makefile" -a -e "transforms/language/text_encoder/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/language/text_encoder workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/language/text_encoder workflow-test - echo "Run transforms/language/text_encoder completed" - else - echo "Skipping transforms/language/text_encoder kfp test for lack of Makefile and/or kfp_ray/Makefile" + transform=$(basename "transforms/language/text_encoder") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/language/text_encoder + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/language/text_encoder + fi + else + echo "Skipping transforms/language/text_encoder kfp test for lack of Makefile and/or kfp_ray/Makefile" fi test-kfp-v2: @@ -99,32 +92,25 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + echo "KFPv2=1" >> $GITHUB_ENV - name: Test V2 KFP workflow for transforms/language/text_encoder timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/language/text_encoder/Makefile" -a -e "transforms/language/text_encoder/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - export KFPv2=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/language/text_encoder workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/language/text_encoder workflow-test - echo "Run transforms/language/text_encoder completed" + transform=$(basename "transforms/language/text_encoder") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/language/text_encoder + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/language/text_encoder + fi else - echo "Skipping transforms/language/text_encoder kfp test for lack of Makefile and/or kfp_ray/Makefile" - fi + echo "Skipping transforms/language/text_encoder kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi \ No newline at end of file diff --git a/.github/workflows/test-universal-doc_id-kfp.yml b/.github/workflows/test-universal-doc_id-kfp.yml index f40848f62..b9d4fa04f 100644 --- a/.github/workflows/test-universal-doc_id-kfp.yml +++ b/.github/workflows/test-universal-doc_id-kfp.yml @@ -56,33 +56,26 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV - name: Test V1 KFP workflow for transforms/universal/doc_id timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/universal/doc_id/Makefile" -a -e "transforms/universal/doc_id/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/universal/doc_id workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/universal/doc_id workflow-test - echo "Run transforms/universal/doc_id completed" - else - echo "Skipping transforms/universal/doc_id kfp test for lack of Makefile and/or kfp_ray/Makefile" + transform=$(basename "transforms/universal/doc_id") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/universal/doc_id + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/universal/doc_id + fi + else + echo "Skipping transforms/universal/doc_id kfp test for lack of Makefile and/or kfp_ray/Makefile" fi test-kfp-v2: @@ -99,32 +92,25 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + echo "KFPv2=1" >> $GITHUB_ENV - name: Test V2 KFP workflow for transforms/universal/doc_id timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/universal/doc_id/Makefile" -a -e "transforms/universal/doc_id/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - export KFPv2=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/universal/doc_id workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/universal/doc_id workflow-test - echo "Run transforms/universal/doc_id completed" + transform=$(basename "transforms/universal/doc_id") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/universal/doc_id + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/universal/doc_id + fi else - echo "Skipping transforms/universal/doc_id kfp test for lack of Makefile and/or kfp_ray/Makefile" - fi + echo "Skipping transforms/universal/doc_id kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi \ No newline at end of file diff --git a/.github/workflows/test-universal-ededup-kfp.yml b/.github/workflows/test-universal-ededup-kfp.yml index b3edeec7d..ef9c4e6d3 100644 --- a/.github/workflows/test-universal-ededup-kfp.yml +++ b/.github/workflows/test-universal-ededup-kfp.yml @@ -56,33 +56,26 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV - name: Test V1 KFP workflow for transforms/universal/ededup timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/universal/ededup/Makefile" -a -e "transforms/universal/ededup/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/universal/ededup workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/universal/ededup workflow-test - echo "Run transforms/universal/ededup completed" - else - echo "Skipping transforms/universal/ededup kfp test for lack of Makefile and/or kfp_ray/Makefile" + transform=$(basename "transforms/universal/ededup") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/universal/ededup + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/universal/ededup + fi + else + echo "Skipping transforms/universal/ededup kfp test for lack of Makefile and/or kfp_ray/Makefile" fi test-kfp-v2: @@ -99,32 +92,25 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + echo "KFPv2=1" >> $GITHUB_ENV - name: Test V2 KFP workflow for transforms/universal/ededup timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/universal/ededup/Makefile" -a -e "transforms/universal/ededup/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - export KFPv2=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/universal/ededup workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/universal/ededup workflow-test - echo "Run transforms/universal/ededup completed" + transform=$(basename "transforms/universal/ededup") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/universal/ededup + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/universal/ededup + fi else - echo "Skipping transforms/universal/ededup kfp test for lack of Makefile and/or kfp_ray/Makefile" - fi + echo "Skipping transforms/universal/ededup kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi \ No newline at end of file diff --git a/.github/workflows/test-universal-fdedup-kfp.yml b/.github/workflows/test-universal-fdedup-kfp.yml index 8d18552c3..fd37421e7 100644 --- a/.github/workflows/test-universal-fdedup-kfp.yml +++ b/.github/workflows/test-universal-fdedup-kfp.yml @@ -56,33 +56,26 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV - name: Test V1 KFP workflow for transforms/universal/fdedup timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/universal/fdedup/Makefile" -a -e "transforms/universal/fdedup/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/universal/fdedup workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/universal/fdedup workflow-test - echo "Run transforms/universal/fdedup completed" - else - echo "Skipping transforms/universal/fdedup kfp test for lack of Makefile and/or kfp_ray/Makefile" + transform=$(basename "transforms/universal/fdedup") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/universal/fdedup + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/universal/fdedup + fi + else + echo "Skipping transforms/universal/fdedup kfp test for lack of Makefile and/or kfp_ray/Makefile" fi test-kfp-v2: @@ -99,32 +92,25 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + echo "KFPv2=1" >> $GITHUB_ENV - name: Test V2 KFP workflow for transforms/universal/fdedup timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/universal/fdedup/Makefile" -a -e "transforms/universal/fdedup/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - export KFPv2=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/universal/fdedup workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/universal/fdedup workflow-test - echo "Run transforms/universal/fdedup completed" + transform=$(basename "transforms/universal/fdedup") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/universal/fdedup + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/universal/fdedup + fi else - echo "Skipping transforms/universal/fdedup kfp test for lack of Makefile and/or kfp_ray/Makefile" - fi + echo "Skipping transforms/universal/fdedup kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi \ No newline at end of file diff --git a/.github/workflows/test-universal-filter-kfp.yml b/.github/workflows/test-universal-filter-kfp.yml index fde070bad..eab5179d6 100644 --- a/.github/workflows/test-universal-filter-kfp.yml +++ b/.github/workflows/test-universal-filter-kfp.yml @@ -56,33 +56,26 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV - name: Test V1 KFP workflow for transforms/universal/filter timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/universal/filter/Makefile" -a -e "transforms/universal/filter/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/universal/filter workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/universal/filter workflow-test - echo "Run transforms/universal/filter completed" - else - echo "Skipping transforms/universal/filter kfp test for lack of Makefile and/or kfp_ray/Makefile" + transform=$(basename "transforms/universal/filter") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/universal/filter + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/universal/filter + fi + else + echo "Skipping transforms/universal/filter kfp test for lack of Makefile and/or kfp_ray/Makefile" fi test-kfp-v2: @@ -99,32 +92,25 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + echo "KFPv2=1" >> $GITHUB_ENV - name: Test V2 KFP workflow for transforms/universal/filter timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/universal/filter/Makefile" -a -e "transforms/universal/filter/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - export KFPv2=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/universal/filter workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/universal/filter workflow-test - echo "Run transforms/universal/filter completed" + transform=$(basename "transforms/universal/filter") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/universal/filter + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/universal/filter + fi else - echo "Skipping transforms/universal/filter kfp test for lack of Makefile and/or kfp_ray/Makefile" - fi + echo "Skipping transforms/universal/filter kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi \ No newline at end of file diff --git a/.github/workflows/test-universal-noop-kfp.yml b/.github/workflows/test-universal-noop-kfp.yml index 0aa16a984..3def4f09c 100644 --- a/.github/workflows/test-universal-noop-kfp.yml +++ b/.github/workflows/test-universal-noop-kfp.yml @@ -56,33 +56,26 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV - name: Test V1 KFP workflow for transforms/universal/noop timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/universal/noop/Makefile" -a -e "transforms/universal/noop/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/universal/noop workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/universal/noop workflow-test - echo "Run transforms/universal/noop completed" - else - echo "Skipping transforms/universal/noop kfp test for lack of Makefile and/or kfp_ray/Makefile" + transform=$(basename "transforms/universal/noop") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/universal/noop + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/universal/noop + fi + else + echo "Skipping transforms/universal/noop kfp test for lack of Makefile and/or kfp_ray/Makefile" fi test-kfp-v2: @@ -99,32 +92,25 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + echo "KFPv2=1" >> $GITHUB_ENV - name: Test V2 KFP workflow for transforms/universal/noop timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/universal/noop/Makefile" -a -e "transforms/universal/noop/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - export KFPv2=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/universal/noop workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/universal/noop workflow-test - echo "Run transforms/universal/noop completed" + transform=$(basename "transforms/universal/noop") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/universal/noop + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/universal/noop + fi else - echo "Skipping transforms/universal/noop kfp test for lack of Makefile and/or kfp_ray/Makefile" - fi + echo "Skipping transforms/universal/noop kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi \ No newline at end of file diff --git a/.github/workflows/test-universal-profiler-kfp.yml b/.github/workflows/test-universal-profiler-kfp.yml index 7f8451f52..a079d43ec 100644 --- a/.github/workflows/test-universal-profiler-kfp.yml +++ b/.github/workflows/test-universal-profiler-kfp.yml @@ -56,33 +56,26 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV - name: Test V1 KFP workflow for transforms/universal/profiler timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/universal/profiler/Makefile" -a -e "transforms/universal/profiler/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/universal/profiler workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/universal/profiler workflow-test - echo "Run transforms/universal/profiler completed" - else - echo "Skipping transforms/universal/profiler kfp test for lack of Makefile and/or kfp_ray/Makefile" + transform=$(basename "transforms/universal/profiler") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/universal/profiler + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/universal/profiler + fi + else + echo "Skipping transforms/universal/profiler kfp test for lack of Makefile and/or kfp_ray/Makefile" fi test-kfp-v2: @@ -99,32 +92,25 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + echo "KFPv2=1" >> $GITHUB_ENV - name: Test V2 KFP workflow for transforms/universal/profiler timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/universal/profiler/Makefile" -a -e "transforms/universal/profiler/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - export KFPv2=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/universal/profiler workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/universal/profiler workflow-test - echo "Run transforms/universal/profiler completed" + transform=$(basename "transforms/universal/profiler") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/universal/profiler + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/universal/profiler + fi else - echo "Skipping transforms/universal/profiler kfp test for lack of Makefile and/or kfp_ray/Makefile" - fi + echo "Skipping transforms/universal/profiler kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi \ No newline at end of file diff --git a/.github/workflows/test-universal-resize-kfp.yml b/.github/workflows/test-universal-resize-kfp.yml index 7cee28ff5..aa554372d 100644 --- a/.github/workflows/test-universal-resize-kfp.yml +++ b/.github/workflows/test-universal-resize-kfp.yml @@ -56,33 +56,26 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV - name: Test V1 KFP workflow for transforms/universal/resize timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/universal/resize/Makefile" -a -e "transforms/universal/resize/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/universal/resize workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/universal/resize workflow-test - echo "Run transforms/universal/resize completed" - else - echo "Skipping transforms/universal/resize kfp test for lack of Makefile and/or kfp_ray/Makefile" + transform=$(basename "transforms/universal/resize") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/universal/resize + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/universal/resize + fi + else + echo "Skipping transforms/universal/resize kfp test for lack of Makefile and/or kfp_ray/Makefile" fi test-kfp-v2: @@ -99,32 +92,25 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + echo "KFPv2=1" >> $GITHUB_ENV - name: Test V2 KFP workflow for transforms/universal/resize timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/universal/resize/Makefile" -a -e "transforms/universal/resize/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - export KFPv2=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/universal/resize workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/universal/resize workflow-test - echo "Run transforms/universal/resize completed" + transform=$(basename "transforms/universal/resize") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/universal/resize + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/universal/resize + fi else - echo "Skipping transforms/universal/resize kfp test for lack of Makefile and/or kfp_ray/Makefile" - fi + echo "Skipping transforms/universal/resize kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi \ No newline at end of file diff --git a/.github/workflows/test-universal-tokenization-kfp.yml b/.github/workflows/test-universal-tokenization-kfp.yml index 8d98b3be3..952043caf 100644 --- a/.github/workflows/test-universal-tokenization-kfp.yml +++ b/.github/workflows/test-universal-tokenization-kfp.yml @@ -56,33 +56,26 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV - name: Test V1 KFP workflow for transforms/universal/tokenization timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/universal/tokenization/Makefile" -a -e "transforms/universal/tokenization/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/universal/tokenization workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/universal/tokenization workflow-test - echo "Run transforms/universal/tokenization completed" - else - echo "Skipping transforms/universal/tokenization kfp test for lack of Makefile and/or kfp_ray/Makefile" + transform=$(basename "transforms/universal/tokenization") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/universal/tokenization + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/universal/tokenization + fi + else + echo "Skipping transforms/universal/tokenization kfp test for lack of Makefile and/or kfp_ray/Makefile" fi test-kfp-v2: @@ -99,32 +92,25 @@ jobs: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true df -h + - name: Import environment variables + run: | + cat scripts/k8s-setup/requirements.env >> $GITHUB_ENV + echo "K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup" >> $GITHUB_ENV + echo "REPOROOT=$PWD" >> $GITHUB_ENV + echo "PATH=$PATH:/tmp" >> $GITHUB_ENV + echo "KFPv2=1" >> $GITHUB_ENV - name: Test V2 KFP workflow for transforms/universal/tokenization timeout-minutes: 120 run: | + KFP_BLACK_LIST=$(./scripts/check-workflows.sh -show-kfp-black-list) if [ -e "transforms/universal/tokenization/Makefile" -a -e "transforms/universal/tokenization/kfp_ray/Makefile" ]; then - export REPOROOT=$PWD - export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup - source $K8S_SETUP_SCRIPTS/requirements.env - export PATH=$PATH:/tmp/ - curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 - chmod 777 /tmp/kind - curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 - chmod 700 /tmp/get_helm.sh - HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo - chmod 777 /tmp/helm - curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl - chmod 777 /tmp/kubectl - curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc - chmod +x /tmp/mc - export DEPLOY_KUBEFLOW=1 - export KFPv2=1 - make -C $K8S_SETUP_SCRIPTS setup - #make -C kfp/kfp_support_lib test - make -C transforms/universal/tokenization workflow-build - source $K8S_SETUP_SCRIPTS/common.sh - make -C transforms/universal/tokenization workflow-test - echo "Run transforms/universal/tokenization completed" + transform=$(basename "transforms/universal/tokenization") + if echo ${KFP_BLACK_LIST} | grep -qv ${transform}; then + $PWD/scripts/workflow_helper.sh install-tools + $PWD/scripts/workflow_helper.sh test-workflow transforms/universal/tokenization + else + $PWD/scripts/workflow_helper.sh build-workflow transforms/universal/tokenization + fi else - echo "Skipping transforms/universal/tokenization kfp test for lack of Makefile and/or kfp_ray/Makefile" - fi + echo "Skipping transforms/universal/tokenization kfp test for lack of Makefile and/or kfp_ray/Makefile" + fi \ No newline at end of file diff --git a/scripts/check-workflows.sh b/scripts/check-workflows.sh index afc73a886..d1f934368 100755 --- a/scripts/check-workflows.sh +++ b/scripts/check-workflows.sh @@ -17,7 +17,7 @@ if [ ! -d transforms ]; then echo Please run this script from the top of the repository exit 1 fi -KFP_BLACK_LIST="doc_chunk pdf2parquet pii_redactor" +KFP_BLACK_LIST="doc_chunk pdf2parquet pii_redactor text_encoder license_select repo_level_ordering" while [ $# -ne 0 ]; do case $1 in -show-kfp-black-list) echo $KFP_BLACK_LIST; exit 0; diff --git a/scripts/k8s-setup/populate_minio.sh b/scripts/k8s-setup/populate_minio.sh index a43d7dd58..3b22b37e7 100755 --- a/scripts/k8s-setup/populate_minio.sh +++ b/scripts/k8s-setup/populate_minio.sh @@ -26,6 +26,7 @@ mc cp --recursive ${REPOROOT}/transforms/code/proglang_select/ray/test-data/inpu mc cp --recursive ${REPOROOT}/transforms/code/proglang_select/ray/test-data/languages/ kfp/test/proglang_select/languages mc cp --recursive ${REPOROOT}/transforms/code/malware/ray/test-data/input/ kfp/test/malware/input mc cp --recursive ${REPOROOT}/transforms/code/header_cleanser/ray/test-data/input/ kfp/test/header_cleanser/input +mc cp --recursive ${REPOROOT}/transforms/code/repo_level_ordering/ray/test-data/input/ kfp/test/repo_level_ordering/input # language mc cp --recursive ${REPOROOT}/transforms/language/lang_id/ray/test-data/input/ kfp/test/lang_id/input mc cp --recursive ${REPOROOT}/transforms/language/doc_quality/ray/test-data/input/ kfp/test/doc_quality/input diff --git a/scripts/workflow_helper.sh b/scripts/workflow_helper.sh new file mode 100755 index 000000000..5f89df770 --- /dev/null +++ b/scripts/workflow_helper.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +op=$1 + +install_tools(){ + if [ -z "$KIND_VERSION" ] || [ -z "$HELM_VERSION" ] || [ -z "$KUBECTL_VERSION" ]; then + echo "Missing tools versions" + exit 1 + fi + echo "Installing tools" + + curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64 + chmod 777 /tmp/kind + curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 + chmod 700 /tmp/get_helm.sh + HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo + chmod 777 /tmp/helm + curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl + chmod 777 /tmp/kubectl + curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc + chmod +x /tmp/mc +} + +test_workflow(){ + local workflow="$1" + + echo "Testing $workflow" + DEPLOY_KUBEFLOW=1 make -C $workflow setup + make -C $workflow workflow-test + echo "Run workflow completed" +} + +build_workflow(){ + local workflow="$1" + + echo "Build $workflow" + make -C $workflow workflow-build + echo "Build workflow completed" +} + + +usage(){ + echo "command not found" +} + +case "$op" in + install-tools) + echo "install tool required for testing workflow" + install_tools + ;; + test-workflow) + echo "test workflow" + test_workflow $2 + ;; + build-workflow) + echo "build workflow" + build_workflow $2 + ;; + *) + usage + ;; +esac diff --git a/transforms/.make.workflows b/transforms/.make.workflows index 9b7259b60..cd4c2532a 100644 --- a/transforms/.make.workflows +++ b/transforms/.make.workflows @@ -69,4 +69,3 @@ ${WORKFLOW_VENV_ACTIVATE}: ${REPOROOT}/.make.versions ${REPOROOT}/kfp/kfp_ray_co cd ${REPOROOT} && make setup; \ fi . ${WORKFLOW_VENV_ACTIVATE} && ${PYTHON} -m workflow_support.pipeline_utils.pipelines_tests_utils -c "upload" -p ${CURDIR}/${PIPELINE_FILE} -e ${KFP_ENDPOINT} - diff --git a/transforms/code/license_select/kfp_ray/Makefile.disable-cicd b/transforms/code/license_select/kfp_ray/Makefile similarity index 100% rename from transforms/code/license_select/kfp_ray/Makefile.disable-cicd rename to transforms/code/license_select/kfp_ray/Makefile diff --git a/transforms/code/repo_level_ordering/kfp_ray/Makefile.disable-cicd b/transforms/code/repo_level_ordering/kfp_ray/Makefile similarity index 96% rename from transforms/code/repo_level_ordering/kfp_ray/Makefile.disable-cicd rename to transforms/code/repo_level_ordering/kfp_ray/Makefile index 5b2425357..5504137ee 100644 --- a/transforms/code/repo_level_ordering/kfp_ray/Makefile.disable-cicd +++ b/transforms/code/repo_level_ordering/kfp_ray/Makefile @@ -45,7 +45,7 @@ workflow-build: workflow-venv .PHONY: workflow-test workflow-test: workflow-build - $(MAKE) .workflows.test-pipeline TRANSFORM_SRC=${SRC_DIR} PIPELINE_FILE=repo_level_order_transform.py + $(MAKE) .workflows.test-pipeline TRANSFORM_SRC=${SRC_DIR} PIPELINE_FILE=repo_level_order_wf.yaml .PHONY: workflow-upload workflow-upload: workflow-build diff --git a/transforms/code/repo_level_ordering/kfp_ray/repo_level_order_wf.py b/transforms/code/repo_level_ordering/kfp_ray/repo_level_order_wf.py index 7ec37bd9d..6c14abfd6 100644 --- a/transforms/code/repo_level_ordering/kfp_ray/repo_level_order_wf.py +++ b/transforms/code/repo_level_ordering/kfp_ray/repo_level_order_wf.py @@ -24,7 +24,7 @@ EXEC_SCRIPT_NAME: str = "repo_level_order_transform_ray.py" # components -base_kfp_image = "quay.io/dataprep1/data-prep-kit/kfp-data-processing_v2:latest" +base_kfp_image = "quay.io/dataprep1/data-prep-kit/kfp-data-processing:latest" # path to kfp component specifications files component_spec_path = "../../../../kfp/kfp_ray_components/" diff --git a/transforms/language/text_encoder/kfp_ray/Makefile.disable-cicd b/transforms/language/text_encoder/kfp_ray/Makefile similarity index 100% rename from transforms/language/text_encoder/kfp_ray/Makefile.disable-cicd rename to transforms/language/text_encoder/kfp_ray/Makefile