Skip to content

v0.7.0

Choose a tag to compare

@TaiSakuma TaiSakuma released this 16 Jan 18:00
· 50 commits to main since this release

What's Changed

Feature: Add start/end time range filtering to rdb.runs query

This release adds support for filtering by time range in the GraphQL query rdb.runs. You can now query historical runs based on when they started and ended.

For example, to fetch runs that started after 18:00 and ended before 19:00 on April 7, 2025:

{
  rdb {
    runs(
      filter: {startedAfter: "2025-04-07T18:00:00", endedBefore: "2025-04-07T19:00:00"}
    ) {
      edges {
        node {
          runNo
          startedAt
          endedAt
        }
      }
    }
  }
}

In addition to startedAfter and endedBefore, you can also use startedBefore and endedAfter. The filter conditions are combined, so results must satisfy all of them.

Timestamps should be in ISO 8601 format. They are parsed using Python’s datetime.fromisoformat().
You may include a timezone offset; if none is given, the timestamp is interpreted as UTC.

To reduce query size, you can limit the fields returned for each run. For example, the query above excludes large fields such as script, stdout, exception, traces, and traceCalls, which can be fetched separately later if needed.

Example response:

{
  "data": {
    "rdb": {
      "runs": {
        "edges": [
          {
            "node": {
              "runNo": 8248,
              "startedAt": "2025-04-07T18:46:14.887919",
              "endedAt": "2025-04-07T18:46:17.638340"
            }
          },
          {
            "node": {
              "runNo": 8247,
              "startedAt": "2025-04-07T18:41:20.362765",
              "endedAt": "2025-04-07T18:41:22.991191"
            }
          }
        ]
      }
    }
  }
}

The results are returned in descending order by run number (i.e., most recent first).

Once you’ve identified a run of interest by its runNo, you can retrieve its details:

{
  rdb {
    run(runNo: 8248) {
      runNo
      startedAt
      endedAt
      script
      exception
      stdouts {
        edges {
          node {
            text
            writtenAt
          }
        }
      }
    }
  }
}

Changes 🚀

Full Changelog: simonsobs/nextline-rdb@v0.6.11...v0.7.0