Skip to content

Persist unsupported, ignored, and 0-steps workspaces and return in GraphQL

Administrator requested to merge mrn/persist-all-workspaces into main

Created by: mrnugget

This is part of #25962 (closed).

Included here:

  • Add ignored and unsupported booleans to the batch_spec_workspaces table
  • Persist ignored and unsupported workspaces
  • Persist workspaces with 0 steps
  • Adjust GraphQL API so that Unsupported is not a separate property on the WorkspaceResolution but an attribute on the workspace itself, mirroring what we already do with Ignored
  • Add a first test for BatchSpecWorkspaceResolver that tests a lot of different fields
  • Change "execution jobs" creation to not create jobs for ignored/unsupported workspaces and workspaces with 0 steps

I'm marking this ready for review, because we should talk about a few things:

  1. Do we want to make the other fields (path, file_matches, branch, etc.) nullable and set them to null if a workspace is ignored/unsupported? Right now I set them to the empty values (empty string, empty array, etc.).
  2. Do we want to make these properties nullable in GraphQL?
  3. Or do we want to have 3 types of workspaces in GraphQL and define a minimal interface? Interface could be BatchSpecWorkspace and only have batchSpec, repository. Then 3 implementations: BatchSpecExecutableWorkspace, BatchSpecIgnoredWorkspace, BatchSpecUnsupportedWorkspace. Might make things easier on the client side vs. nullable fields?

Merge request reports

Loading