需要手动输入变量值的 when: manual 作业重试后执行异常
Summary
- 客户环境
- 版本:15.1.2-jh,
- 流水线的其中一个作业使用了
when: manual
- 任务是打印一个变量的值 V1
- V1 的值没有在流水线里定义、需要执行作业时手动输入
- 只有 V1 的值是 123 时,作业才会成功结束;
- 测试过程
- 流水线执行到该作业时,点击作业左侧的齿轮图标进入作业执行页面,为 V1 变量输入特定的值(非123)使作业以错误状态结束;
- 点击右上方 Retry 按钮;页面报错,如图1
- 页面显示:'An error occured while making the request. Status cannot transition via "succeed"'
- gitlab-rails 后台日志显示:Cannot obtain an exclusive lease for ci/pipeline_processing/atomic_processing_service::pipeline_id:720. There must be another instance already in execution.
- 刷新页面,等该作业左侧的感叹号变为齿轮图标后,点击齿轮图标进入作业执行页面,为 V1 变量输入123并执行,希望作业以正确状态结束;
- 但执行作业后,页面报错,如图2
- 页面显示:'An error occured while triggering the job.'
- 并且作业执行后仍然以错误状态推出,而且打印的值不是新输入的值,而是上一次失败时输入的值
- 升级测试
- 将系统升级到 15.2.0-jh,情况依旧
- 使用jihulab.com 测试,遇到相同的问题
- 根据 help 页面,看到 jihulab.com 版本是 15.3.0-pre
图1:
图2:
演示项目:
https://jihulab.com/phu/test-project
操作视频:
Steps to reproduce
Example Project
What is the current bug behavior?
What is the expected correct behavior?
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
由 Martin Tan 编辑于