Skip to content

gitlab service: fix uploading artifacts from gitlab-runner #25726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2017

Conversation

michalpalka
Copy link

@michalpalka michalpalka commented May 12, 2017

Add the binaries from gitlab-workhorse to the path of the
gitlab-workhorse service, as gitlab-zip-metadata is needed
by the service

Motivation for this change

Currently, gitlab-runner jobs that involve uploading artifacts fail with the following being displayed in the job log:

Uploading artifacts...
doc.pdf: found 1 matching files
WARNING: Uploading artifacts to coordinator... failed  id=116 responseStatus=500 Internal Server Error status=500 Internal Server Error token=9tdcH8zU
WARNING: Retrying...
WARNING: Uploading artifacts to coordinator... failed  id=116 responseStatus=500 Internal Server Error status=500 Internal Server Error token=9tdcH8zU
WARNING: Retrying...
WARNING: Uploading artifacts to coordinator... failed  id=116 responseStatus=500 Internal Server Error status=500 Internal Server Error token=9tdcH8zU
FATAL: invalid argument
ERROR: Job failed: exit code 1

Looking through the systemd logs yields additional error messages:

# journalctl -u gitlab-workhorse.service -S -10min|grep exec
May 12 06:45:47 gitlab gitlab-workhorse[4808]: 2017/05/12 06:45:47 error: POST "/ci/api/v1/builds/116/artifacts?": handleFileUploads: extract files from multipart: exec: "gitlab-zip-metadata": executable file not found in $PATH
May 12 06:45:48 gitlab gitlab-workhorse[4808]: 2017/05/12 06:45:48 error: POST "/ci/api/v1/builds/116/artifacts?": handleFileUploads: extract files from multipart: exec: "gitlab-zip-metadata": executable file not found in $PATH
May 12 06:45:49 gitlab gitlab-workhorse[4808]: 2017/05/12 06:45:49 error: POST "/ci/api/v1/builds/116/artifacts?": handleFileUploads: extract files from multipart: exec: "gitlab-zip-metadata": executable file not found in $PATH

Adding the gitlab-workhorse package to the path of the gitlab-workhorse service fixes the problem.

The problem was found with the gitlab-runner_1_11 package and the docker executor, but I expect it to affect other configurations too.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature.
edolstra Eelco Dolstra
Add the binaries from gitlab-workhorse to the path of the
gitlab-workhorse service, as gitlab-zip-metadata is needed
by the service
@mention-bot
Copy link

@michalpalka, thanks for your PR! By analyzing the history of the files in this pull request, we identified @fpletz, @teh and @offlinehacker to be potential reviewers.

@Mic92 Mic92 merged commit 53a8634 into NixOS:master May 13, 2017
@Mic92
Copy link
Member

Mic92 commented May 13, 2017

also ported to 17.03

@fpletz
Copy link
Member

fpletz commented May 13, 2017

Thanks! 👍

@michalpalka michalpalka deleted the gitlab-runner-fix branch June 9, 2017 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants