Auto-deploy QA image failing to build due to an excessively long filename in gitlab-rails
Today's package build for 14.3.202109152120+48edefee00a.22b85ce887f
failed during Docker-QA
because one of the new files in the build had an excessively long filename:
qa-build
Cloning into '/tmp/gitlab'...
Warning: Permanently added the ECDSA host key for IP address '52.167.44.125' to the list of known hosts.
Checking out files: 100% (50352/50352), done.
Failed to get commit from version-manifest file
Building from gitlab-ee commit 48edefee00a9a9e38c47826a13841eb92e3677c6
rake aborted!
Gem::Package::TooLongFileName: File "ee/config/events/20210914201801_default_cicd_for_external_repo_create_from_template_import_project_activate_form_input.yml" has a too long name (should be 100 or less)
/builds/gitlab/omnibus-gitlab/gems/ruby/2.7.0/gems/docker-api-2.0.0/lib/docker/util.rb:169:in `add_file_to_tar'
/builds/gitlab/omnibus-gitlab/gems/ruby/2.7.0/gems/docker-api-2.0.0/lib/docker/util.rb:155:in `block (2 levels) in create_relative_dir_tar'
/builds/gitlab/omnibus-gitlab/gems/ruby/2.7.0/gems/docker-api-2.0.0/lib/docker/util.rb:150:in `each'
/builds/gitlab/omnibus-gitlab/gems/ruby/2.7.0/gems/docker-api-2.0.0/lib/docker/util.rb:150:in `block in create_relative_dir_tar'
/builds/gitlab/omnibus-gitlab/gems/ruby/2.7.0/gems/docker-api-2.0.0/lib/docker/util.rb:146:in `create_relative_dir_tar'
/builds/gitlab/omnibus-gitlab/gems/ruby/2.7.0/gems/docker-api-2.0.0/lib/docker/util.rb:140:in `create_dir_tar'
/builds/gitlab/omnibus-gitlab/gems/ruby/2.7.0/gems/docker-api-2.0.0/lib/docker/image.rb:292:in `build_from_dir'
/builds/gitlab/omnibus-gitlab/lib/gitlab/docker_operations.rb:16:in `build'
/builds/gitlab/omnibus-gitlab/lib/gitlab/tasks/qa.rake:17:in `block (3 levels) in <top (required)>'
/builds/gitlab/omnibus-gitlab/lib/gitlab/util.rb:24:in `section'
/builds/gitlab/omnibus-gitlab/lib/gitlab/tasks/qa.rake:16:in `block (2 levels) in <top (required)>'
/builds/gitlab/omnibus-gitlab/gems/ruby/2.7.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => qa:build
(See full trace by running task with --trace)
I'm unclear if it means the full path, which is 122 characters, or just the basename, which is 105.
This file was added in gitlab-org/gitlab!67981 (merged), which includes a lot of excessively-long filenames that may also break builds.
Either way, this is a limitation in the docker-api
gem and likely not something we can resolve ourselves.
We may want to add a Danger rule for gitlab-rails that prevents filenames of this length from being added.