Skip to content

Commit

Permalink
Add option to wake dev deployments on deploy (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
feluelle authored Oct 28, 2024
1 parent 359775e commit 0c310b4
Show file tree
Hide file tree
Showing 5 changed files with 165 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/e2e/get_deployment_info/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ outputs:
desired_image_version:
description: The image version
value: ${{ steps.get-deployment-info.outputs.desired_image_version }}
hibernation_spec:
description: The hibernation spec
value: ${{ steps.get-deployment-info.outputs.hibernation_spec }}

runs:
using: "composite"
Expand All @@ -39,5 +42,7 @@ runs:
fi
desired_dag_tarball_version=$(cat response.json | jq -r '.desiredDagTarballVersion')
desired_image_version=$(cat response.json | jq -r '.desiredImageVersion')
hibernation_spec=$(cat response.json | jq -rc '.scalingSpec.hibernationSpec')
echo "desired_dag_tarball_version=$desired_dag_tarball_version" >> $GITHUB_OUTPUT
echo "desired_image_version=$desired_image_version" >> $GITHUB_OUTPUT
echo "hibernation_spec=$hibernation_spec" >> $GITHUB_OUTPUT
23 changes: 23 additions & 0 deletions .github/workflows/e2e/validate_deployment/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ inputs:
is_no_deploy:
description: If the deploy test was a no-op
default: false
is_wake_on_deploy:
description: If the deploy test was a wake-on-deploy
default: false
dag_tarball_version_before:
description: The desired DAG tarball version before the test
required: true
Expand All @@ -20,6 +23,12 @@ inputs:
image_version_after:
description: The image version after the test
required: true
hibernation_spec_before:
description: The hibernation spec before the test
required: true
hibernation_spec_after:
description: The hibernation spec after the test
required: true

runs:
using: "composite"
Expand Down Expand Up @@ -55,3 +64,17 @@ runs:
fi
echo "Deploy Action validation failed: neither desiredDagTarballVersion or imageVersion were updated after the test"
exit 1
- name: Validate Hibernation Spec
id: validate-hibernation-spec
shell: bash
run: |
if [[ "${{ inputs.is_wake_on_deploy }}" == "true" ]]; then
if [[ '${{ inputs.hibernation_spec_before }}' == '${{ inputs.hibernation_spec_after }}' ]]; then
echo "Hibernation Spec validation succeeded: hibernation spec was not updated after the test"
exit 0
fi
echo "Hibernation Spec validation failed: hibernation spec updated"
exit 1
fi
Loading

0 comments on commit 0c310b4

Please sign in to comment.