remind101 / slashdeploy

GitHub Deployments for Slack
https://slashdeploy.io
BSD 2-Clause "Simplified" License
153 stars 20 forks source link

Create Github Deployment without context if AutoDeploy in ready state #100

Closed russellballestrini closed 6 years ago

russellballestrini commented 6 years ago

Issue:

Sometimes an AutoDeployment never occurs and a user waits forever.

Root cause:

Sometimes (like once a day) if we send the list of context checks when requesting a Github Deployment, github will reject our attempt because of an apparent race condition related to "required context checks".

Resolution

If an an AutoDeployment transitions to the 'ready' state, we don't need to pass a list of required context checks when creating the GitHub Deployment.

Hints

An AutoDeployment basically just tracks the state of a commit, then does a /deploy once it transitions to the "ready" state.

Basically, that logic is encapsulated here:

https://github.com/remind101/slashdeploy/blob/master/lib/slashdeploy/service.rb#L60

So, it's at this point that we'd want to ignore context checks:

https://github.com/remind101/slashdeploy/blob/master/lib/slashdeploy/service.rb#L182-L185

Changed:

    modified:   lib/slashdeploy/service.rb
    modified:   spec/features/auto_deploy_spec.rb

Related:

https://app.asana.com/0/344289131135984/512056087737341