Warning in log: The 'build_script' stage will be replaced with 'step_script
The following issues confused me today. I'll explain it in 3 different chapters
The warning In our CICD logs on our Fargate Gitlab Runner, running version 15.8.0 I noticed a warning: WARNING: Starting with version 14.0 the 'build_script' stage will be replaced with 'step_script': #26426 (closed)
This warning is created in the following part of the Gitlab-runner code https://gitlab.com/gitlab-org/gitlab-runner/-/blob/main/executors/custom/custom.go#L302
stage := cmd.Stage if stage == "step_script" { e.BuildLogger.Warningln("Starting with version 14.0 the 'build_script' stage " + "will be replaced with 'step_script': https://gitlab.com/gitlab-org/gitlab-runner/-/issues/26426") stage = "build_script" }
First lets take a look at the warning (and we ignore the version info for this moment): "In the near future the build_script stage will be replaced with the step_script stage." Who should get this warning? That should be the users using build_script that need to move to step_script. But this if statement does the opposite: It shows the warning to everybody already using step_script
Imho, the code should be
stage := cmd.Stage if stage == "build_script" { e.BuildLogger.Warningln("Starting with version 14.0 the 'build_script' stage " + "will be replaced with 'step_script': https://gitlab.com/gitlab-org/gitlab-runner/-/issues/26426") } if stage == "step_script" { stage = "build_script" }
This will be less confusing to our users.
The versions
This page with release-info: https://about.gitlab.com/releases/2021/05/22/gitlab-13-12-released/#remove-translation-from-stepscript-to-buildscript-in-custom-executor shows a message about why this line is there and when it will be removed. The following comment in this issue has a plan for removing the translation:
But it looks like we are still at step 0 or I've missed the documentation about the configuration structure.
The documentation
Lets say 'I still use build_script': I couldn't find a part in the documentation that tells me how to switch from build_script to step_script. Can someone provide me with info about how to switch between these two?