Knowledge Base Administration Guide

Job Attachments

Job attachment

This example shows a job with a single attachment.

Example uses of attachments

Common uses of attachments:

  • Mark a job as being re-run (ie with verbose logging and waves/FSDB)
  • Mark a job as having waves ready
  • Mark a job with a dynamic coverage report URL
  • Show all jobs in a signature that have been re-run

Note that a job can have more than one attachment.


Regression Re-run flow

The most common use case for attachments is for a re-run flow:

  1. Launch a nightly regression
  2. Query simscope to find a single instance of each signature which failed
  3. Rerun each signature from the regression, with waves and logging enabled
    • Mark back into simscope the path with waves

Now, when engineers are in the office, they will have waves available each morning, and not have to wait for simulations to be re-run.

Example

You can also see within a Signature which jobs have attachments, by clicking the Attachments link:

List Job attachments


Script interface

Simscope has a Python script called simscope-job-attach which can be used to publish, query, or remove job attachments.

Note: to run simscope-job-attach, you must have an API Token.

Examples

Add attachment to a job, with message only:

> bin/simscope-job-attach --jobid 1190/cph7g5a1msaw --title "Rerun"

Add attachment to a job, with URL:

> bin/simscope-job-attach --jobid 1190/cph7g5a1msaw --title "FSDB ready" --color 6699cc \
--url "http://example.com"

Add attachment with path:

> bin/simscope-job-attach --jobid 1190/cph7g5a1msaw --title "FSDB path" --color dd0000 \
--url "/this/is/db/path"

Use --replace during attach to automatically remove any other attachments on the job.

> bin/simscope-job-attach --jobid 1190/cph7g5a1msaw --title "Another FSDB path" --color dd0000 \
--url "/this/is/db/path" --replace

List attachments across a signature:

> bin/simscope-job-attach --jobid 1190 --list

success: [
    {
        "jobid": "1190/cph7g5a1msaw",
        "title": "Rerun",
        "url": "",
        "color": "6699cc"
    },
    {
        "jobid": "1190/cph7g5a1msaw",
        "title": "FSDB path",
        "url": "/this/is/db/path",
        "color": "bb0000"
    }
]

List attachments for a specific job:

> bin/simscope-job-attach --jobid 1190/abcdef --list

Remove attachment:

> bin/simscope-job-attach --jobid 1190/cph7g5a1msaw --title "Hello world" --detach

Remove all attachments from job:

> bin/simscope-job-attach --jobid 1190/cph7g5a1msaw --detach

Remove all attachments from a signature:

> bin/simscope-job-attach --jobid 1190 --detach

Automatic expiration

Note: by default, job attachments are automatically removed from Simscope after 30 days.