Skip to content

Print number of jobs being processed for each new job

Arran Walker requested to merge ajwalker/build-list-count into main

What does this MR do?

Prints the current job count (builds) and maximum number of concurrent jobs (max_builds) when a job is added and removed from the list of jobs being processed.

Example (emphasis mine):

Checking for jobs... received                       job=4342500366 repo_url=https://gitlab.com/ajwalker/windows-playground.git runner=xDCqi3MiK
Added job to processing list                        builds=1 job=4342500366 max_builds=4 repo_url=https://gitlab.com/ajwalker/windows-playground.git
Preparing instance...                               job=4342500366 project=26808055 runner=xDCqi3MiK
Dialing instance                                    external-address=34.244.211.206 instance-id=local internal-address= job=4342500366 project=26808055 runner=xDCqi3MiK use-external-address=true
Job succeeded                                       duration_s=2.9023826660000003 job=4342500366 project=26808055 runner=xDCqi3MiK
Appending trace to coordinator...ok                 code=202 job=4342500366 job-log=0-1615 job-status=running runner=xDCqi3MiK sent-log=0-1614 status=202 Accepted update-interval=1m0s
Updating job...                                     bytesize=1615 checksum=crc32:6d317bf9 job=4342500366 runner=xDCqi3MiK
Submitting job to coordinator...accepted, but not yet completed  bytesize=1615 checksum=crc32:6d317bf9 code=202 job=4342500366 job-status= runner=xDCqi3MiK update-interval=1s
Updating job...                                     bytesize=1615 checksum=crc32:6d317bf9 job=4342500366 runner=xDCqi3MiK
Submitting job to coordinator...ok                  bytesize=1615 checksum=crc32:6d317bf9 code=200 job=4342500366 job-status= runner=xDCqi3MiK update-interval=0s
Removed job from processing list                    builds=0 job=4342500366 max_builds=4 repo_url=https://gitlab.com/ajwalker/windows-playground.git

Why was this MR needed?

Recently diagnosing an issue and it's hard to see how many jobs runner is currently processing with just a dump of the logs because we very rarely print this information.

What's the best way to test this MR?

  • Run some jobs
  • See message above (from example) and the build count rise and fall

What are the relevant issue numbers?

Edited by Arran Walker

Merge request reports