Using API to export a project to AWS S3 reports an error private method `open' called for...
Summary
Using on CLoud (Gilab.com) API to export a project to AWS S3 reports an error private method `open' called for...
Steps to reproduce
Export a project to an Amazon AWS S3 Bucket using API export curl request like explained here https://docs.gitlab.com/ee/api/project_import_export.html
(cannot give more information to reproduce as it needs confidentials informations like aws private/secret keys, etc.)
Example Project
(private project)
What is the current bug behavior?
The backup is not upload to S3 Bucket.
What is the expected correct behavior?
(What you should see instead)
Relevant logs and/or screenshots
API return a code status code: {"message":"202 Accepted"}
But we get the following email just after (i hidded some informations for privacy):
Project {hidden} couldn't be exported.
The errors we encountered were:
• private method `open' called for #<CarrierWave::Storage::Fog::File:{hidden}>
—
Output of checks
This bug happens on GitLab.com
Possible fixes
Using same parameters than those used for the GitLab API call to directly uploading a file to S3 works great.
curl \
-T "${FILE_TO_UPLOAD}" \
"$URL"
But using them via GitLab API, send the above email and don't uplad the file:
curl --request POST --header "PRIVATE-TOKEN: $GITLAB_TOKEN" https://gitlab.com/api/v4/projects/{hidden}/export --data "upload[http_method]=PUT" --data-urlencode "upload[url]=$URL"
As same $URL have been used and it works directly using curl (so $URL is well formated), i deduct it is probably a gitlab bug.
Fell free to ask any complementary information.
Thanks,
Best regards, Thomas.
PS: i opened a ticket report issue too: https://gitlab.com/gitlab-com/support-forum/issues/3865 , as I d'ont know which place it is best to post this problem. Administrator: fell free to close/link one of them if needed.