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

chore: make deployment workflow manual and add a reminder in pr template #95

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

emileten
Copy link
Contributor

@emileten emileten commented Feb 22, 2024

In a previous PR, I added a workflow that was meant to run before any release and which purpose is to use the constructs in a simple real-world deployment that we immediately destroy, before actually doing a release, to do a basic sanity check.

The system doesn't work. As basic as it may sound, it's actually not easy to set that up.

I recap. We have a long and costly job (deployment) that we want to run only if a release is about to happen. I contemplated two options to implement this :

  1. Add two steps before the Maybe Release step (that does the release) : Check if release is going to happen, which would produce a boolean output variable called RELEASE_IS_GOING_TO_HAPPEN, and a subsequent step called Deploy if release is going to happen, that runs a deployment if RELEASE_IS_GOING_TO_HAPPEN is true. Unfortunately, there is no, afaik, any supported functionality in semantic-release to obtain this kind of information. People are grabbing the stdout of semantic-release and parsing it to know if a release is about to happen, and although it can work, I tried, and : it makes the code complicated, and what if someone bumps semantic-release in the future without knowing that it's going to change the stdout ?

  2. Use merge_queues, which is a github feature that allows one to have merges added to a queue when someone clicks on 'merge' in a PR and then selected checks can happen in the queue. This would work nicely but unfortunately prevents our automated release system from functioning entirely, since the release bot can't push to main anymore. Maybe a solution to that is a two-branch system (merge first to staging with merge queues and the release bot picks up what's in staging) but that adds complexity.

I shouldn't spend more time on this. So I am going with the sub-optimal third option which is to have a human in the loop : the deployment workflow is to be triggered manually on the console at each PR that contains code changes. I am adding a warning in a pull request template to remind people.

@emileten emileten changed the title make deployment workflow manual and add a reminder in pr template chore: make deployment workflow manual and add a reminder in pr template Feb 22, 2024
@emileten emileten force-pushed the chore/manual-integration-tests branch from 0debc38 to f58e0f3 Compare February 22, 2024 10:55
@emileten emileten merged commit 5e9f508 into main Feb 22, 2024
3 checks passed
@emileten emileten deleted the chore/manual-integration-tests branch February 22, 2024 11:02
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.

1 participant