Always set no_compute to true for apps

This commit is contained in:
Andrew Nester 2025-01-14 16:48:58 +00:00
parent 72e677d0ac
commit 833a3614a6
No known key found for this signature in database
GPG Key ID: 12BC628A44B7DA57
2 changed files with 7 additions and 0 deletions

View File

@ -38,6 +38,12 @@ func (appConverter) Convert(ctx context.Context, key string, vin dyn.Value, out
return err return err
} }
// We always set no_compute to true as it allows DABs not to wait for app compute to be started when app is created.
vout, err = dyn.Set(vout, "no_compute", dyn.V(true))
if err != nil {
return err
}
// Add the converted resource to the output. // Add the converted resource to the output.
out.App[key] = vout.AsAny() out.App[key] = vout.AsAny()

View File

@ -63,6 +63,7 @@ func TestConvertApp(t *testing.T) {
assert.Equal(t, map[string]any{ assert.Equal(t, map[string]any{
"description": "app description", "description": "app description",
"name": "app_id", "name": "app_id",
"no_compute": true,
"resources": []any{ "resources": []any{
map[string]any{ map[string]any{
"name": "job1", "name": "job1",