Recursion Is Fun Is Fun

So I’ve got an AWS Lambda function written in python designed to help auto-merge PRs that @dependabot has submitted. It queries all my github repositories, then auto-merges them based on particular configs. It’s done this way because then I don’t have to remember to configure each and every repository individually, and it does it in two stages:

  1. A scheduled execution.
    • This checks to see if it’s scheduled, then invokes the function with parameters specifying the repo to check.
  2. The subsequent “invoked” runs, which interact with the GitHub API to do the per-repo checks.

I’d recently made some changes and failed to test them properly - the “am I scheduled” was running, but ALSO the “run on a repository” check.

I’m pretty sure the only thing that was stopping the recursion was the GitHub API’s hittting the rate limit, thus stopping it from grabbing the list due to an undhandled exception which killed the script.

I’m totally leaving that “unhandled error” bug in there :D

It also caused some delicious explosions in logging…

Splunk Logs...



#AWS #Lambda #fail #python #recursion #Splunk