• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

letsencrypt / boulder / 11016
66%

Build:
DEFAULT BRANCH: master
Ran 31 Jul 2019 08:00PM UTC
Jobs 1
Files 103
Run time 46s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

31 Jul 2019 07:41PM UTC coverage: 61.633% (+0.02%) from 61.61%
11016

push

travis-ci

rolandshoemaker
sa: wrap transactions in a function for commits/rollbacks (#4373)

In the current SA code, we need to remember to call Rollback on any error.
If we don't, we'll leave dangling transactions, which are hard to spot but eventually
clog up the database and cause availability problems.

This change attempts to deal with rollbacks more rigorously, by implementing a
withTransaction function that takes a closure as input. withTransaction opens
a transaction, applies a context.Context to it, and then runs the closure. If the
closure returns an error, withTransaction rolls back and return the error; otherwise
it commits and returns nil.

One of the quirks of this implementation is that it relies on the closure modifying
variables from its parent scope in order to return values. An alternate implementation
could define the return value of the closure as interface{}, nil, and have the calling
function do a type assertion. I'm seeking feedback on that; not sure yet which is cleaner.

This is a subset of the functions that need this treatment. I've got more coming, but
some of the changes break tests so I'm checking into why.

Updates #4337

11531 of 18709 relevant lines covered (61.63%)

0.69 hits per line

Jobs
ID Job ID Ran Files Coverage
7 11016.7 (RUN="coverage" CONTAINER="netaccess") 31 Jul 2019 08:00PM UTC 0
61.63
Travis Job 11016.7
Source Files on build 11016
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #11016
  • 16235b68 on github
  • Prev Build on master (#11014)
  • Next Build on master (#11021)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc