Project

General

Profile

action #12128

pushing needles from osd to gitlab fails but needle is present in repo

Added by okurz about 4 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
Concrete Bugs
Target version:
Start date:
2016-05-25
Due date:
% Done:

0%

Estimated time:
Difficulty:
Duration:

Description

observation

Sometimes commiting needles with the push to the needle gitlab repo can fail, e.g. see
see attached screenshot needle git commit fail

] 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.


Related issues

Related to openQA Infrastructure - action #42920: Gitlab user gets blocked: Try out gitlab deployment tokens for openQAResolved2018-10-25

History

#1 Updated by okurz almost 4 years ago

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

#2 Updated by coolo over 2 years ago

  • Category changed from 128 to Concrete Bugs
  • 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.

#3 Updated by mkittler over 1 year ago

  • Assignee set to mkittler
  • Target version changed from Ready to Current Sprint

#4 Updated by mkittler over 1 year ago

  • Status changed from New to In Progress

#5 Updated by okurz over 1 year ago

  • Related to action #42920: Gitlab user gets blocked: Try out gitlab deployment tokens for openQA added

#6 Updated by mkittler over 1 year ago

  • 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.

#7 Updated by okurz over 1 year ago

thanks, appreciated

Also available in: Atom PDF