Skip to content

Commit 00cb672

Browse files
committed
Merge pull request #552 from Cosmo-Tech/AFOS/change_default_run_step_status_to_false_PROD-12133
Replace current default value for null steps in run templates from true to false
2 parents 109ffdf + 835f48b commit 00cb672

File tree

3 files changed

+187
-9
lines changed

3 files changed

+187
-9
lines changed

scenariorun/src/main/kotlin/com/cosmotech/scenariorun/ContainerFactory.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ class ContainerFactory(
902902
}
903903

904904
private fun testStep(step: Boolean?): Boolean {
905-
return step ?: true
905+
return step ?: false
906906
}
907907

908908
@Suppress("LongParameterList")

scenariorun/src/test/kotlin/com/cosmotech/scenariorun/ContainerFactoryTests.kt

Lines changed: 93 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -797,8 +797,8 @@ class ContainerFactoryTests {
797797
"CSM_ORGANIZATION_ID" to "Organizationid",
798798
"CSM_WORKSPACE_ID" to "Workspaceid",
799799
"CSM_SCENARIO_ID" to "Scenarioid",
800-
"CSM_SEND_DATAWAREHOUSE_PARAMETERS" to "false",
801-
"CSM_SEND_DATAWAREHOUSE_DATASETS" to "false",
800+
"CSM_SEND_DATAWAREHOUSE_PARAMETERS" to "true",
801+
"CSM_SEND_DATAWAREHOUSE_DATASETS" to "true",
802802
"TWIN_CACHE_HOST" to "this_is_a_host",
803803
"TWIN_CACHE_PORT" to "6973",
804804
"TWIN_CACHE_PASSWORD" to "this_is_a_password",
@@ -3517,6 +3517,15 @@ class ContainerFactoryTests {
35173517
name = "Test Run",
35183518
csmSimulation = "TestSimulation",
35193519
computeSize = "highcpupool",
3520+
fetchDatasets = true,
3521+
fetchScenarioParameters = true,
3522+
applyParameters = true,
3523+
validateData = true,
3524+
run = true,
3525+
sendDatasetsToDataWarehouse = true,
3526+
sendInputParametersToDataWarehouse = true,
3527+
preRun = true,
3528+
postRun = true,
35203529
)
35213530
}
35223531

@@ -3527,6 +3536,15 @@ class ContainerFactoryTests {
35273536
csmSimulation = "TestSimulation",
35283537
computeSize = "highcpu",
35293538
stackSteps = true,
3539+
fetchDatasets = true,
3540+
fetchScenarioParameters = true,
3541+
applyParameters = true,
3542+
validateData = true,
3543+
run = true,
3544+
sendDatasetsToDataWarehouse = true,
3545+
sendInputParametersToDataWarehouse = true,
3546+
preRun = true,
3547+
postRun = true,
35303548
)
35313549
}
35323550

@@ -3539,6 +3557,13 @@ class ContainerFactoryTests {
35393557
stackSteps = true,
35403558
sendDatasetsToDataWarehouse = false,
35413559
sendInputParametersToDataWarehouse = false,
3560+
fetchDatasets = true,
3561+
fetchScenarioParameters = true,
3562+
applyParameters = true,
3563+
validateData = true,
3564+
run = true,
3565+
preRun = true,
3566+
postRun = true,
35423567
)
35433568
}
35443569

@@ -3549,6 +3574,15 @@ class ContainerFactoryTests {
35493574
csmSimulation = "TestSimulation",
35503575
computeSize = "highcpu",
35513576
parameterGroups = mutableListOf("group1"),
3577+
fetchDatasets = true,
3578+
fetchScenarioParameters = true,
3579+
applyParameters = true,
3580+
validateData = true,
3581+
run = true,
3582+
sendDatasetsToDataWarehouse = true,
3583+
sendInputParametersToDataWarehouse = true,
3584+
preRun = true,
3585+
postRun = true,
35523586
)
35533587
}
35543588

@@ -3557,6 +3591,15 @@ class ContainerFactoryTests {
35573591
id = "testruntemplate",
35583592
name = "Test Run",
35593593
csmSimulation = "TestSimulation",
3594+
fetchDatasets = true,
3595+
fetchScenarioParameters = true,
3596+
applyParameters = true,
3597+
validateData = true,
3598+
run = true,
3599+
sendDatasetsToDataWarehouse = true,
3600+
sendInputParametersToDataWarehouse = true,
3601+
preRun = true,
3602+
postRun = true,
35603603
)
35613604
}
35623605

@@ -3566,6 +3609,15 @@ class ContainerFactoryTests {
35663609
name = "Test Run",
35673610
csmSimulation = "TestSimulation",
35683611
computeSize = "%NONE%",
3612+
fetchDatasets = true,
3613+
fetchScenarioParameters = true,
3614+
applyParameters = true,
3615+
validateData = true,
3616+
run = true,
3617+
sendDatasetsToDataWarehouse = true,
3618+
sendInputParametersToDataWarehouse = true,
3619+
preRun = true,
3620+
postRun = true,
35693621
)
35703622
}
35713623

@@ -3575,7 +3627,16 @@ class ContainerFactoryTests {
35753627
id = "testruntemplate",
35763628
name = "Test Run",
35773629
csmSimulation = "TestSimulation",
3578-
sendDatasetsToDataWarehouse = false)
3630+
sendDatasetsToDataWarehouse = false,
3631+
fetchDatasets = true,
3632+
fetchScenarioParameters = true,
3633+
applyParameters = true,
3634+
validateData = true,
3635+
run = true,
3636+
sendInputParametersToDataWarehouse = true,
3637+
preRun = true,
3638+
postRun = true,
3639+
)
35793640
}
35803641

35813642
private fun getRunTemplateNoParametersSend(): RunTemplate {
@@ -3584,7 +3645,16 @@ class ContainerFactoryTests {
35843645
id = "testruntemplate",
35853646
name = "Test Run",
35863647
csmSimulation = "TestSimulation",
3587-
sendInputParametersToDataWarehouse = false)
3648+
sendInputParametersToDataWarehouse = false,
3649+
fetchDatasets = true,
3650+
fetchScenarioParameters = true,
3651+
applyParameters = true,
3652+
validateData = true,
3653+
run = true,
3654+
sendDatasetsToDataWarehouse = true,
3655+
preRun = true,
3656+
postRun = true,
3657+
)
35883658
}
35893659

35903660
private fun getRunTemplateOnlyRun(): RunTemplate {
@@ -3597,6 +3667,7 @@ class ContainerFactoryTests {
35973667
fetchScenarioParameters = false,
35983668
applyParameters = false,
35993669
validateData = false,
3670+
run = true,
36003671
sendDatasetsToDataWarehouse = false,
36013672
sendInputParametersToDataWarehouse = false,
36023673
preRun = false,
@@ -3615,6 +3686,15 @@ class ContainerFactoryTests {
36153686
preRunSource = RunTemplateStepSource.cloud,
36163687
runSource = RunTemplateStepSource.cloud,
36173688
postRunSource = RunTemplateStepSource.cloud,
3689+
fetchDatasets = true,
3690+
fetchScenarioParameters = true,
3691+
applyParameters = true,
3692+
validateData = true,
3693+
run = true,
3694+
sendDatasetsToDataWarehouse = true,
3695+
sendInputParametersToDataWarehouse = true,
3696+
preRun = true,
3697+
postRun = true,
36183698
)
36193699
}
36203700

@@ -3629,6 +3709,15 @@ class ContainerFactoryTests {
36293709
preRunSource = RunTemplateStepSource.local,
36303710
runSource = RunTemplateStepSource.local,
36313711
postRunSource = RunTemplateStepSource.local,
3712+
fetchDatasets = true,
3713+
fetchScenarioParameters = true,
3714+
applyParameters = true,
3715+
validateData = true,
3716+
run = true,
3717+
sendDatasetsToDataWarehouse = true,
3718+
sendInputParametersToDataWarehouse = true,
3719+
preRun = true,
3720+
postRun = true,
36323721
)
36333722
}
36343723

scenariorun/src/test/kotlin/com/cosmotech/scenariorun/OktaContainerFactoryTests.kt

Lines changed: 93 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -784,8 +784,8 @@ class OktaContainerFactoryTests {
784784
"CSM_ORGANIZATION_ID" to "Organizationid",
785785
"CSM_WORKSPACE_ID" to "Workspaceid",
786786
"CSM_SCENARIO_ID" to "Scenarioid",
787-
"CSM_SEND_DATAWAREHOUSE_PARAMETERS" to "false",
788-
"CSM_SEND_DATAWAREHOUSE_DATASETS" to "false",
787+
"CSM_SEND_DATAWAREHOUSE_PARAMETERS" to "true",
788+
"CSM_SEND_DATAWAREHOUSE_DATASETS" to "true",
789789
"TWIN_CACHE_HOST" to "this_is_a_host",
790790
"TWIN_CACHE_PORT" to "6973",
791791
"TWIN_CACHE_PASSWORD" to "this_is_a_password",
@@ -3117,6 +3117,15 @@ class OktaContainerFactoryTests {
31173117
name = "Test Run",
31183118
csmSimulation = "TestSimulation",
31193119
computeSize = "highcpupool",
3120+
fetchDatasets = true,
3121+
fetchScenarioParameters = true,
3122+
applyParameters = true,
3123+
validateData = true,
3124+
run = true,
3125+
sendDatasetsToDataWarehouse = true,
3126+
sendInputParametersToDataWarehouse = true,
3127+
preRun = true,
3128+
postRun = true,
31203129
)
31213130
}
31223131

@@ -3127,6 +3136,15 @@ class OktaContainerFactoryTests {
31273136
csmSimulation = "TestSimulation",
31283137
computeSize = "highcpu",
31293138
stackSteps = true,
3139+
fetchDatasets = true,
3140+
fetchScenarioParameters = true,
3141+
applyParameters = true,
3142+
validateData = true,
3143+
run = true,
3144+
sendDatasetsToDataWarehouse = true,
3145+
sendInputParametersToDataWarehouse = true,
3146+
preRun = true,
3147+
postRun = true,
31303148
)
31313149
}
31323150

@@ -3139,6 +3157,13 @@ class OktaContainerFactoryTests {
31393157
stackSteps = true,
31403158
sendDatasetsToDataWarehouse = false,
31413159
sendInputParametersToDataWarehouse = false,
3160+
fetchDatasets = true,
3161+
fetchScenarioParameters = true,
3162+
applyParameters = true,
3163+
validateData = true,
3164+
run = true,
3165+
preRun = true,
3166+
postRun = true,
31423167
)
31433168
}
31443169

@@ -3149,6 +3174,15 @@ class OktaContainerFactoryTests {
31493174
csmSimulation = "TestSimulation",
31503175
computeSize = "highcpu",
31513176
parameterGroups = mutableListOf("group1"),
3177+
fetchDatasets = true,
3178+
fetchScenarioParameters = true,
3179+
applyParameters = true,
3180+
validateData = true,
3181+
run = true,
3182+
sendDatasetsToDataWarehouse = true,
3183+
sendInputParametersToDataWarehouse = true,
3184+
preRun = true,
3185+
postRun = true,
31523186
)
31533187
}
31543188

@@ -3157,6 +3191,15 @@ class OktaContainerFactoryTests {
31573191
id = "testruntemplate",
31583192
name = "Test Run",
31593193
csmSimulation = "TestSimulation",
3194+
fetchDatasets = true,
3195+
fetchScenarioParameters = true,
3196+
applyParameters = true,
3197+
validateData = true,
3198+
run = true,
3199+
sendDatasetsToDataWarehouse = true,
3200+
sendInputParametersToDataWarehouse = true,
3201+
preRun = true,
3202+
postRun = true,
31603203
)
31613204
}
31623205

@@ -3166,6 +3209,15 @@ class OktaContainerFactoryTests {
31663209
name = "Test Run",
31673210
csmSimulation = "TestSimulation",
31683211
computeSize = "%NONE%",
3212+
fetchDatasets = true,
3213+
fetchScenarioParameters = true,
3214+
applyParameters = true,
3215+
validateData = true,
3216+
run = true,
3217+
sendDatasetsToDataWarehouse = true,
3218+
sendInputParametersToDataWarehouse = true,
3219+
preRun = true,
3220+
postRun = true,
31693221
)
31703222
}
31713223

@@ -3175,7 +3227,16 @@ class OktaContainerFactoryTests {
31753227
id = "testruntemplate",
31763228
name = "Test Run",
31773229
csmSimulation = "TestSimulation",
3178-
sendDatasetsToDataWarehouse = false)
3230+
sendDatasetsToDataWarehouse = false,
3231+
fetchDatasets = true,
3232+
fetchScenarioParameters = true,
3233+
applyParameters = true,
3234+
validateData = true,
3235+
run = true,
3236+
sendInputParametersToDataWarehouse = true,
3237+
preRun = true,
3238+
postRun = true,
3239+
)
31793240
}
31803241

31813242
private fun getRunTemplateNoParametersSend(): RunTemplate {
@@ -3184,7 +3245,16 @@ class OktaContainerFactoryTests {
31843245
id = "testruntemplate",
31853246
name = "Test Run",
31863247
csmSimulation = "TestSimulation",
3187-
sendInputParametersToDataWarehouse = false)
3248+
sendInputParametersToDataWarehouse = false,
3249+
fetchDatasets = true,
3250+
fetchScenarioParameters = true,
3251+
applyParameters = true,
3252+
validateData = true,
3253+
run = true,
3254+
sendDatasetsToDataWarehouse = true,
3255+
preRun = true,
3256+
postRun = true,
3257+
)
31883258
}
31893259

31903260
private fun getRunTemplateOnlyRun(): RunTemplate {
@@ -3193,6 +3263,7 @@ class OktaContainerFactoryTests {
31933263
id = "testruntemplate",
31943264
name = "Test Run",
31953265
csmSimulation = "TestSimulation",
3266+
run = true,
31963267
fetchDatasets = false,
31973268
fetchScenarioParameters = false,
31983269
applyParameters = false,
@@ -3215,6 +3286,15 @@ class OktaContainerFactoryTests {
32153286
preRunSource = RunTemplateStepSource.cloud,
32163287
runSource = RunTemplateStepSource.cloud,
32173288
postRunSource = RunTemplateStepSource.cloud,
3289+
fetchDatasets = true,
3290+
fetchScenarioParameters = true,
3291+
applyParameters = true,
3292+
validateData = true,
3293+
run = true,
3294+
sendDatasetsToDataWarehouse = true,
3295+
sendInputParametersToDataWarehouse = true,
3296+
preRun = true,
3297+
postRun = true,
32183298
)
32193299
}
32203300

@@ -3229,6 +3309,15 @@ class OktaContainerFactoryTests {
32293309
preRunSource = RunTemplateStepSource.local,
32303310
runSource = RunTemplateStepSource.local,
32313311
postRunSource = RunTemplateStepSource.local,
3312+
fetchDatasets = true,
3313+
fetchScenarioParameters = true,
3314+
applyParameters = true,
3315+
validateData = true,
3316+
run = true,
3317+
sendDatasetsToDataWarehouse = true,
3318+
sendInputParametersToDataWarehouse = true,
3319+
preRun = true,
3320+
postRun = true,
32323321
)
32333322
}
32343323

0 commit comments

Comments
 (0)