Skip to content

Commit aeaabad

Browse files
committed
Allow container_profiles property on workers
1 parent 0a8efba commit aeaabad

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

validator/schema/upsun.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,7 @@
642642
},
643643
"size": {"$ref": "#/definitions/deprecated/size"},
644644
"resources": {"$ref": "#/definitions/deprecated/resources"},
645+
"container_profile": {"$ref": "#/definitions/container_profile"},
645646
"commands": {
646647
"type": "object",
647648
"properties": {

validator/validator_test.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,30 @@ applications:
208208
type: "python:3.11"
209209
preflight:
210210
enabled: true
211+
`,
212+
),
213+
},
214+
},
215+
},
216+
wantErr: false,
217+
},
218+
{
219+
name: "worker container profile",
220+
args: args{
221+
path: fstest.MapFS{
222+
".upsun/config.yaml": &fstest.MapFile{
223+
Data: []byte(`
224+
applications:
225+
app1:
226+
type: "python:3.11"
227+
preflight:
228+
enabled: true
229+
workers:
230+
app1-worker:
231+
commands:
232+
start: |
233+
sleep 86400 && echo "done"
234+
container_profile: HIGH_CPU
211235
`,
212236
),
213237
},

0 commit comments

Comments
 (0)