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

Add option to wake dev deployments on deploy #87

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

feluelle
Copy link
Member

@feluelle feluelle commented Oct 25, 2024

Description

This adds a new wake-on-deploy input that creates a hibernation override to ensure the dev deployment is awake before deploying and resumes hibernation schedules afterward.

Note

This means it will override whatever existing hibernation override is on the deployment when wake-on-deploy is used.

Motivation

fixes: #81

Testing

@feluelle feluelle force-pushed the feature/deploy-to-dev-deployments branch 3 times, most recently from c38bbd6 to fcb7811 Compare October 25, 2024 10:38
This adds a new `wake-on-deploy` input that allows for creating a hibernation override that will ensure the dev deployment is awake for the time of deploying.
@feluelle feluelle force-pushed the feature/deploy-to-dev-deployments branch from fcb7811 to bca88ba Compare October 25, 2024 10:41
@feluelle feluelle marked this pull request as ready for review October 25, 2024 10:52
@feluelle feluelle requested a review from a team as a code owner October 25, 2024 10:52
@feluelle feluelle changed the title Add support to deploy to dev deployments Add option to wake dev deployments on deploy Oct 25, 2024
Copy link
Collaborator

@neel-astro neel-astro left a comment

Choose a reason for hiding this comment

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

Left some minor comments, but lgtm otherwise

@@ -744,6 +779,7 @@ jobs:
copy-connections: false
copy-airflow-variables: false
copy-pools: false
wake-on-deploy: true
Copy link
Collaborator

Choose a reason for hiding this comment

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

for test completeness, should we validate that the deployment is not hibernating at the end of deploy?

Copy link
Member Author

Choose a reason for hiding this comment

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

But it can be hibernating and that is okay. It should only be non-hibernating during deploy which is guaranteed because otherwise, the deploy would fail.

But what we could and should do is assert that the hibernation spec override definition is not set.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah that makes sense, to validate that the hibernation spec is intact after the deploy

@@ -94,6 +94,10 @@ inputs:
required: false
default: false
description: "Whether to checkout submodules when cloning the repository: `false` to disable (default), `true` to checkout submodules or `recursive` to recursively checkout submodules. Works only when `checkout` is set to `true`."
wake-on-deploy:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we update the README as well with the new parameter, and also leave an example for the same 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow deploy to hibernating preview deployments
2 participants