Import of instance template give project export error message
Filing this issue at request of @dstanley.
I ended up creating the simplest template I could think of. In the group custom-project-templates, I created a project called jeff-test-template with one file called hello-template.sh. An export of this project is attached. 2018-08-28_15-30-554_custom-project-templates_jeff-_export.tar.gz
The custom-project-templates group is a top level group with visibility of internal. If I import this project using the export file directly into another group, it succeeds without issue.
I then created a new top-level group called test-template-import that also has visibility set to internal. From that group, I ran New Project -> Create from template -> Custom -> jeff-test-template. Named the new project my-hello-template with visibility internal. The import runs, creates everything. Then I get an email with subject Project export error
as follows:
Project gocd-pipeline-template couldn't be exported.
The errors we encountered were:
• comparison of String with 10 failed
Running the stuck-import-jobs cron job stops the import from displaying the Importing message and the project appears with no issues.
For kicks, I ran a sudo gitlab-rake gitlab:check and it came back with no errors and a 0 exit code.
Some more experiments. I set the visibility of the custom-project-templates group to public and got same error message. I set the visibility of the test-template-import group to public and I got the same message but with String compared to 20. So that tells me the group visibility is getting set correctly but the project visibility on import doesn't seem to be. Project visibility after I run the stuck_import_jobs_worker is internal.