diff options
Diffstat (limited to 'lib/gitlab/ci/yaml_processor.rb')
-rw-r--r-- | lib/gitlab/ci/yaml_processor.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gitlab/ci/yaml_processor.rb b/lib/gitlab/ci/yaml_processor.rb index c69d9218a66..3a0173d1548 100644 --- a/lib/gitlab/ci/yaml_processor.rb +++ b/lib/gitlab/ci/yaml_processor.rb @@ -129,6 +129,12 @@ module Gitlab error!("#{name} job: undefined #{dependency_type}: #{dependency}") end + # A parallel job's name is expanded in Config::Normalizer so we must revalidate the name length here + if dependency_type == 'need' && dependency.length > ::Ci::BuildNeed::MAX_JOB_NAME_LENGTH + error!("#{name} job: need `#{dependency}` name is too long " \ + "(maximum is #{::Ci::BuildNeed::MAX_JOB_NAME_LENGTH} characters)") + end + job_stage_index = stage_index(name) dependency_stage_index = stage_index(dependency) |