Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert deployment hibernate changes #80

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 10 additions & 37 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
deployment: [deployment-hibernate.yaml, deployment.yaml]
deployment: [deployment.yaml]
outputs:
DEPLOYMENT_ID: ${{ steps.create-deployment.outputs.DEPLOYMENT_ID }}
HIBERNATE_DEPLOYMENT_ID: ${{ steps.create-deployment.outputs.HIBERNATE_DEPLOYMENT_ID }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -99,11 +98,7 @@ jobs:
sed -i "s| name:.*| name: deploy-action-e2e-${{ env.test_uid }}|g" e2e-setup/deployment-templates/${{ matrix.deployment }}

DEPLOYMENT_ID=$(astro deployment create --deployment-file e2e-setup/deployment-templates/${{ matrix.deployment }} | yq e '.deployment.metadata.deployment_id' -)
if [[ "${{ matrix.deployment }}" == "deployment.yaml" ]]; then
echo "DEPLOYMENT_ID=$DEPLOYMENT_ID" >> $GITHUB_OUTPUT
else
echo "HIBERNATE_DEPLOYMENT_ID=$DEPLOYMENT_ID" >> $GITHUB_OUTPUT
fi
echo "DEPLOYMENT_ID=$DEPLOYMENT_ID" >> $GITHUB_OUTPUT

# DAG Deploy test would test the DAG only deploy functionality in deploy action
dag-deploy-test:
Expand All @@ -113,10 +108,7 @@ jobs:
strategy:
matrix:
deployment_id:
[
"${{ needs.create-test-deployments.outputs.DEPLOYMENT_ID }}",
"${{ needs.create-test-deployments.outputs.HIBERNATE_DEPLOYMENT_ID }}",
]
["${{ needs.create-test-deployments.outputs.DEPLOYMENT_ID }}"]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -191,10 +183,7 @@ jobs:
strategy:
matrix:
deployment_id:
[
"${{ needs.create-test-deployments.outputs.DEPLOYMENT_ID }}",
"${{ needs.create-test-deployments.outputs.HIBERNATE_DEPLOYMENT_ID }}",
]
["${{ needs.create-test-deployments.outputs.DEPLOYMENT_ID }}"]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -274,10 +263,7 @@ jobs:
max-parallel: 1
matrix:
deployment_id:
[
"${{ needs.create-test-deployments.outputs.DEPLOYMENT_ID }}",
"${{ needs.create-test-deployments.outputs.HIBERNATE_DEPLOYMENT_ID }}",
]
["${{ needs.create-test-deployments.outputs.DEPLOYMENT_ID }}"]
deploy_type: [dags, image-and-dags]
steps:
- name: Checkout code
Expand Down Expand Up @@ -357,14 +343,11 @@ jobs:
no-deploy-test:
name: No Deploy Test
runs-on: ubuntu-latest
needs: [infer-image-deploy, create-test-deployments]
needs: [infer-deploy, create-test-deployments]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixing a leftover typo from my last PR while addressing review comments

strategy:
matrix:
deployment_id:
[
"${{ needs.create-test-deployments.outputs.DEPLOYMENT_ID }}",
"${{ needs.create-test-deployments.outputs.HIBERNATE_DEPLOYMENT_ID }}",
]
["${{ needs.create-test-deployments.outputs.DEPLOYMENT_ID }}"]
deploy_type: [infer, dbt, dags, image-and-dags]
steps:
- name: Checkout code
Expand Down Expand Up @@ -464,10 +447,7 @@ jobs:
strategy:
matrix:
deployment_id:
[
"${{ needs.create-test-deployments.outputs.DEPLOYMENT_ID }}",
"${{ needs.create-test-deployments.outputs.HIBERNATE_DEPLOYMENT_ID }}",
]
["${{ needs.create-test-deployments.outputs.DEPLOYMENT_ID }}"]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -543,10 +523,7 @@ jobs:
strategy:
matrix:
deployment_id:
[
"${{ needs.create-test-deployments.outputs.DEPLOYMENT_ID }}",
"${{ needs.create-test-deployments.outputs.HIBERNATE_DEPLOYMENT_ID }}",
]
["${{ needs.create-test-deployments.outputs.DEPLOYMENT_ID }}"]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -629,10 +606,7 @@ jobs:
strategy:
matrix:
deployment_id:
[
"${{ needs.create-test-deployments.outputs.DEPLOYMENT_ID }}",
"${{ needs.create-test-deployments.outputs.HIBERNATE_DEPLOYMENT_ID }}",
]
["${{ needs.create-test-deployments.outputs.DEPLOYMENT_ID }}"]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -893,4 +867,3 @@ jobs:
- name: Delete Deployment
run: |
astro deployment delete -f ${{ needs.create-test-deployments.outputs.DEPLOYMENT_ID }}
astro deployment delete -f ${{ needs.create-test-deployments.outputs.HIBERNATE_DEPLOYMENT_ID }}
41 changes: 0 additions & 41 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -433,39 +433,6 @@ runs:
echo ::endgroup::
shell: bash
id: deploy-options
- name: Determine if Development Mode is enabled
run: |

echo ::group::Determine if Development Mode is enabled
if [[ ${{ inputs.action }} != delete-deployment-preview ]]; then
DEPLOYMENT_TYPE=$(astro deployment inspect ${{steps.deployment-preview.outputs.FINAL_DEPLOYMENT_ID}} --clean-output --key configuration.deployment_type)
# only inspect development mode if deployment is not hybrid
if [[ $DEPLOYMENT_TYPE != "HYBRID" ]]; then
DEV_MODE=$(astro deployment inspect ${{steps.deployment-preview.outputs.FINAL_DEPLOYMENT_ID}} --clean-output --key configuration.is_development_mode)
echo "Deployment development mode: $DEV_MODE"
if [[ $DEV_MODE == "" ]]; then
echo "DEVELOPMENT_MODE=false" >> $GITHUB_OUTPUT
else
echo "DEVELOPMENT_MODE=$DEV_MODE" >> $GITHUB_OUTPUT
fi
else
echo "DEVELOPMENT_MODE=false" >> $GITHUB_OUTPUT
fi
else
echo "DEVELOPMENT_MODE=false" >> $GITHUB_OUTPUT
fi
echo ::endgroup::
shell: bash
id: development-mode
- name: Override to wake up the Deployment
if: ${{ inputs.action != 'delete-deployment-preview' && steps.development-mode.outputs.DEVELOPMENT_MODE == 'true' }}
run: |
echo ::group::Override to wake up the Deployment
astro deployment wake-up ${{steps.deployment-preview.outputs.FINAL_DEPLOYMENT_ID}} --force
# Give it some time to wake up
sleep 60
echo ::endgroup::
shell: bash
- name: DAG Deploy to Astro
if: ${{ (inputs.deploy-type == 'dags-only' || inputs.deploy-type == 'infer') && steps.deploy-type.outputs.DAGS_ONLY_DEPLOY == 'true' }}
run: |
Expand Down Expand Up @@ -511,11 +478,3 @@ runs:
fi
echo ::endgroup::
shell: bash
- name: Remove override on Deployment to resume schedule
if: ${{ steps.development-mode.outputs.DEVELOPMENT_MODE == 'true' }}
run: |

echo ::group::Remove override on Deployment to resume schedule
astro deployment wake-up ${{steps.deployment-preview.outputs.FINAL_DEPLOYMENT_ID}} --remove-override --force
echo ::endgroup::
shell: bash
Loading