Fly intercept no containers matched your search parameters!

When I run a very simple pipeline and try to:
fly -t main intercept -j justin-pipeline-trigger-set/job-hello-world

I keep getting:
no containers matched your search parameters! they may have expired if your build hasn’t recently finished.

Not quite sure what I’m doing wrong. Right after the job finishes I run the intercept but no luck.

Below is a copy of the yaml file. Any help would be appreciated, thanks!
jobs:

  • name: job-hello-world
    public: true
    plan:
    • task: hello-world
      config:
      platform: linux
      image_resource:
      type: docker-image
      source: {repository: busybox}
      run:
      path: echo
      args: [hello world]

This is expected behaviour - Concourse is pretty aggressive about cleaning up stopped containers. The only containers that stick around that you can intercept are ones from failed builds. Since your build succeeded, it gets cleaned up almost instantly.

I see, thanks! Will try to intercept a failed build. How about if theres a single failed job, I should be able to intercept that right?

Failed builds stick around a lot longer than successful ones. I’m not sure exactly how long though. Also, if you intercept a container while a task is running it won’t boot you out when it completes even if the job succeeds.

Oh, sweet. Will try intercepting while running next time, thank you

An additional strategy if your tasks executes really quickly is to put a sleep at the end of the script which gives you a window to intercept.