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

bradleyfalzon / gopherci / 168
63%
master: 61%

Build:
Build:
LAST BUILD BRANCH: review-no-approve
DEFAULT BRANCH: master
Ran 22 Mar 2017 02:11AM UTC
Jobs 1
Files 13
Run time 1s
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

pending completion
168

push

travis-ci

bradleyfalzon
GCPPubSub refactor to support new streaming client API

Google have recently made some breaking changes to their Pub/Sub
client API to support new high performance streaming methods.

https://groups.google.com/forum/#!topic/google-api-go-announce/aaqRDIQ3rvU/discussion
https://groups.google.com/forum/#!topic/google-api-go-announce/8pt6oetAdKc/discussion

The main change is the new methods don't easily support blocking
operations, nor one message at a time use cases. This is being
discussed: https://github.com/GoogleCloudPlatform/google-cloud-go/issues/566

This change attempts to use the new API but in a blocking method
indirectly discussed: https://github.com/GoogleCloudPlatform/google-cloud-go/issues/569

Since finishing and testing this method, which was successful, it
appears Google is discussing this use case further internally, so
this may not be the final solution, but gets us through for the moment.

If we're required to stop using the Pub/Sub client, and instead use
the APIv1 client, the issue does contain a gist of how it could work,
but it hasn't been tested in various failure modes, as it's a lower
level API - but I'm confident it just requires more testing and likely
no more changes.

Further, these changes did necessitate some refectoring on the internal
APIs, this was mostly opportunistic but made the changes simpler.

This refactors were essentially use a channel to push messages onto
the queue, previously this was an interface called Queuer. Also,
previously new jobs to be executed were sent on a channel, instead
each type of queuer should take a callback, and execute that callback
with the job as the only parameter.

GCPPubSubQueue was tested to ensure only one message is removed from
the queue at any time, allowing other instances to consume the remaining
messages, and on shutdown the executing job is allowed to finish in
full before the process exits.

117 of 117 new or added lines in 5 files covered. (100.0%)

590 of 927 relevant lines covered (63.65%)

1.71 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
100.0
internal/github/handlers.go
2
100.0
internal/queue/gcp-pubsub.go
44
100.0
main.go
Jobs
ID Job ID Ran Files Coverage
1 168.1 (GOOGLE_APPLICATION_CREDENTIALS=/tmp/gcloud-GopherCI-dev.json) 22 Mar 2017 02:11AM UTC 0
63.65
Travis Job 168.1
Source Files on build 168
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #168
  • b464990e on github
  • Next Build on pubsub-breaking (#170)
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

© 2026 Coveralls, Inc