netlify / netlify/open-api

Improve error messaging around failed deployments (particularly of functions)

Open
#111 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement go never_stale
Dominant language
Go
Stars
323
Forks
133
Avg merge
2d 8h
Merged PRs (30d)
2

Description

Currently when customers do something "interesting" with functions (there's a large class of things that count as interesting; see related issue: https://github.com/netlify/bitballoon/issues/1628), we give a very non-useful error message while failing the deploy:

10:37:50 AM: Failing build: Failed to deploy site
10:37:50 AM: failed during stage 'deploying site': Failed to execute deploy: Upload cancelled: submission-created

This comes from https://github.com/netlify/buildbot/blob/d1d46200977e9388ad296974ec8dacb61a1c47bc/bot/stage_deploy.go#L50

@calavera asserts that it should be improved here:

https://github.com/netlify/open-api/blob/master/go/porcelain/deploy.go#L389

if sharedErr.err != nil {
  return fmt.Errorf("Upload cancelled: %s -- %v", f.Name, sharedErr.err)

And maybe once that messaging is improved, buildbot can be changed to surface the reason rather than just that there was an inscrutable error.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read go/porcelain/deploy.go around the sharedErr handling near line 389, then inspect buildbot/bot/stage_deploy.go around line 50. Reproduce or trace the failed deployment path described in the issue and determine how the underlying function-deployment reason is currently lost. Done means the deploy error exposes a useful failure reason instead of only "Upload cancelled," with buildbot surfacing it where applicable.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.