Persist unsupported, ignored, and 0-steps workspaces and return in GraphQL
Created by: mrnugget
This is part of #25962 (closed).
Included here:
- Add
ignored
andunsupported
booleans to thebatch_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 theWorkspaceResolution
but an attribute on the workspace itself, mirroring what we already do withIgnored
- 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:
- 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.). - Do we want to make these properties nullable in GraphQL?
- Or do we want to have 3 types of workspaces in GraphQL and define a minimal interface? Interface could be
BatchSpecWorkspace
and only havebatchSpec
,repository
. Then 3 implementations:BatchSpecExecutableWorkspace
,BatchSpecIgnoredWorkspace
,BatchSpecUnsupportedWorkspace
. Might make things easier on the client side vs. nullable fields?