diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 51d6ec4322..a47ce210b6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,25 +4,24 @@ on: branches: - master pull_request: - branches: - - master jobs: end-to-end: runs-on: ubuntu-latest - strategy: - max-parallel: 4 - matrix: - go-version: [1.10] steps: - uses: actions/checkout@v1 - name: Kustomize and diff run: DELTA_CHECK=true make kustomize - - name: Set up Go@${{ matrix.go-version }} - uses: actions/setup-go@v1 - with: - go-version: ${{ matrix.go-version }} - - name: Run end-to-end tests - run: make end2end + - uses: engineerd/setup-kind@v0.4.0 + - name: End2End + env: + DOCKER_USERNAME: ${{ github.actor }} + DOCKER_PASSWORD: "${{ secrets.GITHUB_TOKEN }}" + run: | + kubectl cluster-info + kubectl get pods -n kube-system + echo "current-context:" $(kubectl config current-context) + echo "environment-kubeconfig:" ${KUBECONFIG} + make end2end_execute docs: runs-on: ubuntu-latest strategy: diff --git a/deployment/eks/flyte_generated.yaml b/deployment/eks/flyte_generated.yaml index ac24d844ab..ccf2b5f00b 100644 --- a/deployment/eks/flyte_generated.yaml +++ b/deployment/eks/flyte_generated.yaml @@ -594,7 +594,7 @@ spec: labels: app: flyteadmin app.kubernetes.io/name: flyteadmin - app.kubernetes.io/version: 0.2.8 + app.kubernetes.io/version: 0.2.9 spec: containers: - command: @@ -603,7 +603,7 @@ spec: - --config - /etc/flyte/config/flyteadmin_config.yaml - serve - image: docker.io/lyft/flyteadmin:v0.2.8 + image: docker.io/lyft/flyteadmin:v0.2.9 imagePullPolicy: IfNotPresent name: flyteadmin ports: @@ -754,7 +754,7 @@ spec: labels: app: flytepropeller app.kubernetes.io/name: flytepropeller - app.kubernetes.io/version: 0.2.45 + app.kubernetes.io/version: 0.2.63 spec: containers: - args: @@ -767,7 +767,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.name - image: docker.io/lyft/flytepropeller:v0.2.45 + image: docker.io/lyft/flytepropeller:v0.2.63 imagePullPolicy: IfNotPresent name: flytepropeller ports: diff --git a/deployment/sandbox/flyte_generated.yaml b/deployment/sandbox/flyte_generated.yaml index ef2091f9ba..e7464a853c 100644 --- a/deployment/sandbox/flyte_generated.yaml +++ b/deployment/sandbox/flyte_generated.yaml @@ -1024,7 +1024,7 @@ spec: labels: app: flyteadmin app.kubernetes.io/name: flyteadmin - app.kubernetes.io/version: 0.2.8 + app.kubernetes.io/version: 0.2.9 spec: containers: - command: @@ -1033,7 +1033,7 @@ spec: - --config - /etc/flyte/config/flyteadmin_config.yaml - serve - image: docker.io/lyft/flyteadmin:v0.2.8 + image: docker.io/lyft/flyteadmin:v0.2.9 imagePullPolicy: IfNotPresent name: flyteadmin ports: @@ -1191,7 +1191,7 @@ spec: labels: app: flytepropeller app.kubernetes.io/name: flytepropeller - app.kubernetes.io/version: 0.2.45 + app.kubernetes.io/version: 0.2.63 spec: containers: - args: @@ -1206,7 +1206,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.name - image: docker.io/lyft/flytepropeller:v0.2.45 + image: docker.io/lyft/flytepropeller:v0.2.63 imagePullPolicy: IfNotPresent name: flytepropeller ports: diff --git a/deployment/test/flyte_generated.yaml b/deployment/test/flyte_generated.yaml index 4523acd75c..eb5badd955 100644 --- a/deployment/test/flyte_generated.yaml +++ b/deployment/test/flyte_generated.yaml @@ -644,7 +644,7 @@ spec: labels: app: flyteadmin app.kubernetes.io/name: flyteadmin - app.kubernetes.io/version: 0.2.8 + app.kubernetes.io/version: 0.2.9 spec: containers: - command: @@ -653,7 +653,7 @@ spec: - --config - /etc/flyte/config/flyteadmin_config.yaml - serve - image: docker.io/lyft/flyteadmin:v0.2.8 + image: docker.io/lyft/flyteadmin:v0.2.9 imagePullPolicy: IfNotPresent name: flyteadmin ports: @@ -772,7 +772,7 @@ spec: labels: app: flytepropeller app.kubernetes.io/name: flytepropeller - app.kubernetes.io/version: 0.2.45 + app.kubernetes.io/version: 0.2.63 spec: containers: - args: @@ -785,7 +785,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.name - image: docker.io/lyft/flytepropeller:v0.2.45 + image: docker.io/lyft/flytepropeller:v0.2.63 imagePullPolicy: IfNotPresent name: flytepropeller ports: diff --git a/end2end/tests/endtoend.yaml b/end2end/tests/endtoend.yaml index 43a572b94b..ba7f7a8d8c 100644 --- a/end2end/tests/endtoend.yaml +++ b/end2end/tests/endtoend.yaml @@ -11,7 +11,7 @@ spec: command: - bash - -c - image: docker.io/lyft/flytetester:v0.1.6 + image: docker.io/lyft/flytetester:e29ac562f053741213efcead5950b4b8bc28cfcf imagePullPolicy: IfNotPresent name: flytetester resources: diff --git a/kustomize/base/admindeployment/deployment.yaml b/kustomize/base/admindeployment/deployment.yaml index 37b0795c96..2133b7e0aa 100644 --- a/kustomize/base/admindeployment/deployment.yaml +++ b/kustomize/base/admindeployment/deployment.yaml @@ -16,7 +16,7 @@ spec: labels: app: flyteadmin app.kubernetes.io/name: flyteadmin - app.kubernetes.io/version: 0.2.8 + app.kubernetes.io/version: 0.2.9 annotations: prometheus.io/scrape: "true" prometheus.io/port: "10254" @@ -31,7 +31,7 @@ spec: name: flyte-admin-config initContainers: - name: run-migrations - image: docker.io/lyft/flyteadmin:v0.2.8 + image: docker.io/lyft/flyteadmin:v0.2.9 imagePullPolicy: IfNotPresent command: ["flyteadmin", "--logtostderr", "--config", "/etc/flyte/config/flyteadmin_config.yaml", "migrate", "run"] volumeMounts: @@ -39,7 +39,7 @@ spec: mountPath: /etc/flyte/config containers: - name: flyteadmin - image: docker.io/lyft/flyteadmin:v0.2.8 + image: docker.io/lyft/flyteadmin:v0.2.9 imagePullPolicy: IfNotPresent command: ["flyteadmin", "--logtostderr", "--config", "/etc/flyte/config/flyteadmin_config.yaml", "serve"] ports: diff --git a/kustomize/base/propeller/deployment.yaml b/kustomize/base/propeller/deployment.yaml index 3245df9482..e3200f2ce7 100644 --- a/kustomize/base/propeller/deployment.yaml +++ b/kustomize/base/propeller/deployment.yaml @@ -15,7 +15,7 @@ spec: labels: app: flytepropeller app.kubernetes.io/name: flytepropeller - app.kubernetes.io/version: 0.2.45 + app.kubernetes.io/version: 0.2.63 annotations: prometheus.io/scrape: "true" prometheus.io/port: "10254" @@ -31,7 +31,7 @@ spec: name: flyte-plugin-config containers: - name: flytepropeller - image: docker.io/lyft/flytepropeller:v0.2.45 + image: docker.io/lyft/flytepropeller:v0.2.63 command: - flytepropeller args: diff --git a/rsts/user/features/index.rst b/rsts/user/features/index.rst index 2fe64833f5..27f3c52a9d 100644 --- a/rsts/user/features/index.rst +++ b/rsts/user/features/index.rst @@ -15,3 +15,4 @@ Flyte Features task_cache roles single_task_execution + on_failure_policy diff --git a/rsts/user/features/on_failure_policy.rst b/rsts/user/features/on_failure_policy.rst new file mode 100644 index 0000000000..0fa3ca5faa --- /dev/null +++ b/rsts/user/features/on_failure_policy.rst @@ -0,0 +1,45 @@ +.. _on-failuire-policy: + +What is it +========== + +The default behavior for when a node fails in a workflow is to immediately abort the entire workflow. The reasoning behind this thinking +is to avoid wasting resources since the workflow will end up failing anyway. There are certain cases however, when it's desired for the +workflow to carry on executing the branches it can execute. + +For example when the remaining tasks are marked as :ref:`cacheable `. +Once the failure has been fixed and the workflow is relaunched, cached tasks will be bypassed quickly. + +How to use it +------------- + +Use on_failure attribute on workflow_class. + +.. code:: python + + from flytekit.models.core.workflow import WorkflowMetadata + + @workflow_class(on_failure=WorkflowMetadata.OnFailurePolicy.FAIL_AFTER_EXECUTABLE_NODES_COMPLETE) + class RunToCompletionWF(object): + pass + +Available values in the policy: + +.. code:: python + + class OnFailurePolicy(object): + """ + Defines the execution behavior of the workflow when a failure is detected. + Attributes: + FAIL_IMMEDIATELY Instructs the system to fail as soon as a node fails in the + workflow. It'll automatically abort all currently running nodes and + clean up resources before finally marking the workflow executions as failed. + FAIL_AFTER_EXECUTABLE_NODES_COMPLETE Instructs the system to make as much progress as it can. The system + will not alter the dependencies of the execution graph so any node + that depend on the failed node will not be run. Other nodes that will + be executed to completion before cleaning up resources and marking + the workflow execution as failed. + """ + + FAIL_IMMEDIATELY = _core_workflow.WorkflowMetadata.FAIL_IMMEDIATELY + FAIL_AFTER_EXECUTABLE_NODES_COMPLETE = _core_workflow.WorkflowMetadata.FAIL_AFTER_EXECUTABLE_NODES_COMPLETE