action #12128
closed
pushing needles from osd to gitlab fails but needle is present in repo
Added by okurz over 8 years ago.
Updated almost 6 years ago.
Category:
Regressions/Crashes
Description
observation¶
Sometimes commiting needles with the push to the needle gitlab repo can fail, e.g. see
see attached screenshot
] Running cmd: git --git-dir /var/lib/openqa/share/tests/sle-12/products/sle/needles/.git --work-tree /var/lib/openqa/share/tests/sle-12/products/sle/needles push
[Wed May 25 16:14:05 2016] [17115:warn] GitLab: API is not accessible
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
[Wed May 25 16:14:05 2016] [17115:error] cmd returned non-zero value
[Wed May 25 16:14:05 2016] [17115:error] failed to git commit gnome_terminal-gnome-terminal-second-tab-20160525 at /usr/share/openqa/script/../lib/OpenQA/WebAPI/Controller/Step.pm line 392.
steps to reproduce¶
probably hard to reproduce unless you mock a non-available gitlab server
problem¶
Does not seem to happen often. Maybe a race condition or some issue with the gitlab server. I (okurz) don't know if this also has been seen on o3 pushing to github.
suggestion¶
- At least the user feedback could be improved.
- Retry with timeout and better user feedback
workaround¶
login manually to osd (or ask someone to do it) and try the push as user "geekotest", e.g. sudo -u geekotest git push
from the needles repo working dir. Don't recreate the needle. git commits will be created.
Files
similar error
[Fri Sep 23 13:01:15 2016] [29388:info] Running cmd: git --git-dir /var/lib/openqa/share/tests/sle/products/sle/needles/.git --work-tree /var/lib/openqa/share/tests/sle/products/sle/needles push
[Fri Sep 23 13:01:19 2016] [29367:info] Running cmd: git --git-dir /var/lib/openqa/share/tests/sle/products/sle/needles/.git --work-tree /var/lib/openqa/share/tests/sle/products/sle/needles add /var/lib/openqa/share/tests/sle/products/sle/needles...
[Fri Sep 23 13:01:19 2016] [29367:info] cmd returned 0
[Fri Sep 23 13:01:19 2016] [29367:info] Running cmd: git --git-dir /var/lib/openqa/share/tests/sle/products/sle/needles/.git --work-tree /var/lib/openqa/share/tests/sle/products/sle/needles commit -q -m ...
[Fri Sep 23 13:01:19 2016] [29367:warn] On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working directory clean
[Fri Sep 23 13:01:19 2016] [29367:error] cmd returned non-zero value
[Fri Sep 23 13:01:19 2016] [29367:error] failed to git commit ... at /usr/share/openqa/script/../lib/OpenQA/WebAPI/Controller/Step.pm line 384.
[Fri Sep 23 13:01:21 2016] [29388:info] cmd returned 0
- Category changed from 128 to Regressions/Crashes
- Target version set to Ready
This is most likely because someone created a MR on gitlab - and was worked around by the cron job put in place to pull regularly.
So a proper fix is doing git pull before the git push - possibly even before the commit.
- Assignee set to mkittler
- Target version changed from Ready to Current Sprint
- Status changed from New to In Progress
- Related to action #42920: Gitlab user gets blocked: Try out gitlab deployment tokens for openQA added
- Status changed from In Progress to Resolved
The PR has been merged. See the comments in the PR for the enhancements which will hopefully reduce this problem. The suggestion "At least the user feedback could be improved." is implemented and based on the feedback the user can decide whether it makes sense to re-try.
Also available in: Atom
PDF