Skip to content

Commit accb539

Browse files
orchestrator: create override only after pre imbargo (#561)
1 parent 39aca8e commit accb539

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

internal/orchestrator/provision.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,13 @@ func generateMainComposeFile(
334334
return e
335335
}
336336

337+
if isPreEmbargo(cfg) && !isDevelopmentMode(cfg) {
338+
// In case we are pre-imbargo we remove the override to force the app start
339+
// to take the app-compose.yaml
340+
_ = overrideComposeFile.Remove()
341+
return nil
342+
}
343+
337344
// If there are services that require devices, we need to generate an override compose file
338345
// Write additional file to override devices section in included compose files
339346
if e := generateServicesOverrideFile(services, servicesThatRequireDevices, devices, getCurrentUser(), groups, overrideComposeFile); e != nil {

internal/orchestrator/provision_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ func TestProvisionAppWithOverrides(t *testing.T) {
2020
cfg := setTestOrchestratorConfig(t)
2121
tempDirectory := t.TempDir()
2222

23+
// TODO: hack to skip the preEmbargo check
24+
cfg.UsedPythonImageTag = "latest"
25+
2326
staticStore := store.NewStaticStore(cfg.AssetsDir().String())
2427

2528
// Define a mock app with bricks that require overrides

0 commit comments

Comments
 (0)