I'm the founder of Kilimanjaro , and this week's note is about a monitoring script that looked like it was working for as long as nothing went wrong.
We release by pushing a tag. A script watches the pipeline for that tag and tells us when it finishes, and which job failed if one did. For a while it did exactly that. Then a shard failed in a tag pipeline, and the script said the pipeline was still running, with no jobs, until we gave up and looked ourselves.
The symptom
The watcher was the obvious one. List the pipelines for the tag, take the newest, read its jobs:
pid = $( curl -s --header "PRIVATE-TOKEN: $TOKEN" \ "$API/projects/$PROJECT/pipelines?ref=$TAG" | jq '.[0].id' )
curl -s --header "PRIVATE-TOKEN: $TOKEN" \ "$API/projects/$PROJECT/pipelines/$pid/jobs" | jq '[.[] | select(.status=="failed")]'
Enter fullscreen mode
Exit fullscreen mode
The first call returned a pipeline with status running . The second returned [] . No failed jobs, no jobs at all.…