FF_SCRIPT_SECTIONS regression: timing badges not shown in 16.7
Summary
With our FF_SCRIPT_SECTIONS
FF, Runner v16.7.0 stops producing the step_script_N
section labels which power the white timing badges in job logs.
Reported by a Silver customer internally.
Steps to reproduce
- Any multi-step, simple
.gitlab-ci.yml
script. - An older runner (15.11 in this case) and the latest v16.7, both with
FF_SCRIPT_SECTIONS
enabled. - Run the same job script on both runners.
- Compare logs visually, or raw with scripts/download_ci_logs.rb & list-slowest-job-sections.
Actual behavior
The log generated by the 16.7 runner is missing the script line-specific step_script_N
section labels and thus the white timing badges.
Expected behavior
The 16.7 runner should contain that data.
Relevant logs and/or screenshots
See .com pipeline links in the internal ticket.
Environment description
config.toml contents
Add your configuration here
Used GitLab Runner version: 15.11.0 & 16.7.0
Possible fixes
I'm wondering whether the following changed codes might have introduced the regression:
# maybe: git diff -G'[Ss]tep' -G'[Ss]cript' v15.11.0..v16.7.0 -- **/*.go
# or: git diff v15.11.0..v16.7.0 -- **/*.go | rg 'script' | rg 'step'
if s.Name == StepNameAfterScript {
+ err = b.executeStage(scriptCtx, StepToBuildStage(s), executor)
- assert.Regexp(t, regexp.MustCompile("(?s)section_start:[0-9]+:section_script_step_[0-9]+.*Hello World.*section_end:[0-9]+:section_script_step_[0-9]"), buf.String())
+ assert.Regexp(t, regexp.MustCompile(`(?s)section_start:[0-9]+:section_script_step_[0-9]\[hide_duration=true,collapsed=true\]+.*Hello[\s\S]*?World.*section_end:[0-9]+:section_script_step_[0-9]`), buf.String())
+ Name: common.StepNameAfterScript,
- Name: common.StepNameScript,
- Script: common.StepScript(commands),
- Name: common.StepNameScript,
- Script: common.StepScript(commands),
getScript: func() common.StepScript {
+ Name: common.StepNameScript,
+ Name: common.StepNameAfterScript,
var afterScriptStep *common.Step
if step.Name == common.StepNameAfterScript {
buildStage: "step_script",
- Name: common.StepNameScript,
- Script: common.StepScript{"script 1", "script 2", "script 3"},
+ Name: common.StepNameScript,
+ Script: common.StepScript{`Multi line
+ Name: common.StepNameScript,
+ Script: common.StepScript{"script 1", "script 2", "script 3"},
// Script is the script which was executed as an entrypoint for the current execution step.
Also, !3486 (merged) would fall into the relevant release range.
Edited by Katrin Leinweber