Skip to content

Commit a9328db

Browse files
knopers8justonedev1
authored andcommitted
[core] propagate original_run_number as FairMQ property to tasks
Closes OCTRL-1032
1 parent 2273185 commit a9328db

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

core/environment/transition_startactivity.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ func (t StartActivityTransition) do(env *Environment) (err error) {
9494
"lhc_period",
9595
"pdp_beam_type",
9696
"pdp_override_run_start_time",
97+
"original_run_number",
9798
} {
9899
if value, ok := cvs[key]; ok {
99100
// we push the above parameters with both camelCase and snake_case identifiers for convenience

core/integration/odc/plugin.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,6 +1365,7 @@ func (p *Plugin) CallStack(data interface{}) (stack map[string]interface{}) {
13651365
WithField("call", "Start").
13661366
Warn("cannot acquire run number for ODC")
13671367
}
1368+
originalRunNumber, _ := varStack["original_run_number"]
13681369
cleanupCountS, ok := varStack["__fmq_cleanup_count"]
13691370
if !ok {
13701371
log.WithField("partition", envId).
@@ -1407,6 +1408,9 @@ func (p *Plugin) CallStack(data interface{}) (stack map[string]interface{}) {
14071408
arguments["runNumber"] = rn
14081409
arguments["run_start_time_ms"] = runStartTimeMs
14091410
arguments["cleanup"] = strconv.Itoa(cleanupCount)
1411+
if len(originalRunNumber) > 0 {
1412+
arguments["original_run_number"] = originalRunNumber
1413+
}
14101414

14111415
ctx, cancel := context.WithTimeout(context.Background(), timeout)
14121416
defer cancel()

docs/handbook/configuration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ In addition to the above, which varies depending on the configuration of the env
443443
* `lhcPeriod`
444444
* `pdp_beam_type`
445445
* `pdp_override_run_start_time`
446+
* `original_run_number`
446447

447448
The following values are pushed by AliECS during `STOP_ACTIVITY`:
448449

0 commit comments

Comments
 (0)