Skip to content

Instantly share code, notes, and snippets.

The problem we encountered earlier was that thrift-api used its own default limit of 50. This would happen if an options map was present, but no limit was entered.

This is now fixed.

Here's the request:

curl -X POST \
 https://api.pow.sera-dev.co/api/messages \
@sheac
sheac / something.md
Last active April 12, 2018 21:45
QA'ing PA-14359 and PA-14361
@sheac
sheac / pa-13238-results.md
Last active April 2, 2018 23:20
PA-13238 :: Result of Kafka Failed Message Investigation

Known Causes

  1. Duplicate steps/fields within a single job

    • haven't confirmed any problems resulting from field-sharing yet
    • results from adding the same template multiple times
    • same DB row, but different jobBaseStepIds
  2. Shared steps/fields between clone/duplicate jobs and their originals/sources

    • haven't confirmed any problems resulting from field-sharing yet
  • results from JobController#CreateFromOffline
@sheac
sheac / dont-trust-a-context.md
Created November 7, 2017 00:07
Problems with PA-12308

Hey @here

So I've taken on board some useful guidance by @rory and @eric concerning the "right" way to generate a context.Context instance for use by Mothership guts.

I'm given to believe that:

  • if we want to trace a DB query, it needs a Context
  • if we want the DB query to succeed, that Context has to have been generated in the right way:
handler.Transact(func(ctx context.Context) {...})
#!/usr/bin/env python
"""
This script monitors Github repos for an organization ("company") and squash-merges pull
requests if someone has commented with the ":shipit:" emoji.
Why would you want to squash pull requests? It makes it very easy to get a high-level overview
of your master/deploy/release branch without getting bogged down in miniature type commits. Also
, on the off chance you need to, rolling back whole features is dead simple. Finally, you can
still retain proper git history if you keep the feature branch that the PR came in on.
@sheac
sheac / ScaleDown
Last active December 25, 2015 17:59
def scale_down(iw, ih, dw, dh)
# 1. determining which dimension is the one that needs to be
# scaled the most
limiting_dim = (iw / ih) > (dw / dh) ? "width" : "height"
# 2. then figure out how much that scaling actually is
if limiting dim == "width"
scale_by = dw / iw
else