[opensuse-buildservice] Issue with revision in git services
Hello, I try to extract a given review from gerrit with a service file and I get an error that I do not understand My _service points to a pending review. - If I run the service locally with "osc service localrun" it works. - if I run "git clone https://review.opendev.org/starlingx/fault refs/changes/95/684395/5" I get the code * if I run "osc service rr" I get an error "No such revision" Could some one explains me what is wrong ? My test project is at https://build.opensuse.org/package/show/home:dominig:starlingx-sandbox/fm-co... ------------------- _service ------------------------------ <services> <service name="obs_scm"> <param name="scm">git</param> <param name="url">https://review.opendev.org/starlingx/fault</param> <param name="revision">refs/changes/95/684395/5</param> <param name="version">1.0</param> <param name="subdir">fm-common</param> <param name="filename">fm-common</param> <param name="changesgenerate">disable</param> <param name="extract">opensuse/fm-common.spec</param> <param name="extract">opensuse/fm-common.changes</param> </service> <service mode="buildtime" name="tar" /> <service mode="buildtime" name="recompress"> <param name="compression">gz</param> <param name="file">*.tar</param> </service> <service name="set_version" mode="disabled"/> </services> ------------ OBS log --------------- service obs_scm failed: /srv/obs/service/12167 /srv/obs/service/12167/src /srv/obs/service/12167/src/_service /srv/obs/service/12167/src/.old /srv/obs/service/12167/out /srv/obs/service/12167/var /srv/obs/service/12167/var/cache /srv/obs/service/12167/var/cache/obs /srv/obs/service/12167/var/cache/obs/h9UaxI3JJ6e1 /srv/obs/service/12167/var/cache/obs/h9UaxI3JJ6e1/scripts /srv/obs/service/12167/var/cache/obs/h9UaxI3JJ6e1/scripts/inner.sh /srv/obs/service/12167/var/cache/obs/h9UaxI3JJ6e1/scripts/inner.sh.command /srv/obs/service/12167/home + echo Running /usr/lib/obs/service//obs_scm --scm git --url https://review.opendev.org/starlingx/fault --revision refs/changes/95/684395/5 --version 1.0 --subdir fm-common --filename fm-common --changesgenerate disable --extract opensuse/fm-common.spec --extract opensuse/fm-common.changes --outdir /var/cache/obs/h9UaxI3JJ6e1/out + export CACHEDIRECTORY=/var/cache/obs/h9UaxI3JJ6e1/scm-cache + CACHEDIRECTORY=/var/cache/obs/h9UaxI3JJ6e1/scm-cache + export HOME=/var/cache/obs/h9UaxI3JJ6e1/home + HOME=/var/cache/obs/h9UaxI3JJ6e1/home + /usr/lib/obs/service//obs_scm --scm git --url https://review.opendev.org/starlingx/fault --revision refs/changes/95/684395/5 --version 1.0 --subdir fm-common --filename fm-common --changesgenerate disable --extract opensuse/fm-common.spec --extract opensuse/fm-common.changes --outdir /var/cache/obs/h9UaxI3JJ6e1/out Running /usr/lib/obs/service//obs_scm --scm git --url https://review.opendev.org/starlingx/fault --revision refs/changes/95/684395/5 --version 1.0 --subdir fm-common --filename fm-common --changesgenerate disable --extract opensuse/fm-common.spec --extract opensuse/fm-common.changes --outdir /var/cache/obs/h9UaxI3JJ6e1/out refs/changes/95/684395/5: No such revision -- Dominig ar Foll Senior Software Architect Intel Open Source Technology Centre -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Am Mittwoch, den 25.09.2019, 18:02 +0200 schrieb Dominig ar Foll (Intel Open Source):
Hello,
I try to extract a given review from gerrit with a service file and I get an error that I do not understand My _service points to a pending review. - If I run the service locally with "osc service localrun" it works. - if I run "git clone https://review.opendev.org/starlingx/fault refs/changes/95/684395/5" I get the code
which code ? are the changes for the review really in there? There is a line break in your command, which makes it hard to guess what you really typed. I would guess that you run git fetch ... and not clone
* if I run "osc service rr" I get an error "No such revision"
Could some one explains me what is wrong ?
obs-service-tar_scm does a git clone <url> cd <repo> git checkout <revision> you might need something like git clone <url> cd <repo> git fetch <url> <refspec> git checkout FETCH_HEAD -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On 25/09/2019 18:42, Frank Schreiner wrote:
obs-service-tar_scm does a
git clone <url> cd <repo> git checkout <revision>
you might need something like
git clone <url> cd <repo> git fetch <url> <refspec> git checkout FETCH_HEAD You are correct. What is needed is your second process. How could I get the equivalent of the second process with a fetch working with the _service ? As Jira creates it's review in git, at the end, I have little control.
What s strange is that it does work with osc in local. Thoughts ? -- Dominig ar Foll Senior Software Architect Intel Open Source Technology Centre -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Mittwoch, 25. September 2019, 18:02:16 CEST Dominig ar Foll (Intel Open Source) wrote:
Hello,
I try to extract a given review from gerrit with a service file and I get an error that I do not understand My _service points to a pending review. - If I run the service locally with "osc service localrun" it works. - if I run "git clone https://review.opendev.org/starlingx/fault refs/changes/95/684395/5" I get the code * if I run "osc service rr" I get an error "No such revision"
Could some one explains me what is wrong ?
# git show refs/changes/95/684395/5 leads to an error here. Usually you specify a commit, tag or branch. I suppose you have a local tag with that name?
My test project is at
https://build.opensuse.org/package/show/home:dominig:starlingx-sandbox/fm-co mmon2
------------------- _service ------------------------------ <services> <service name="obs_scm"> <param name="scm">git</param> <param name="url">https://review.opendev.org/starlingx/fault</param> <param name="revision">refs/changes/95/684395/5</param> <param name="version">1.0</param> <param name="subdir">fm-common</param> <param name="filename">fm-common</param> <param name="changesgenerate">disable</param> <param name="extract">opensuse/fm-common.spec</param> <param name="extract">opensuse/fm-common.changes</param> </service> <service mode="buildtime" name="tar" /> <service mode="buildtime" name="recompress"> <param name="compression">gz</param> <param name="file">*.tar</param> </service> <service name="set_version" mode="disabled"/> </services>
------------ OBS log ---------------
service obs_scm failed: /srv/obs/service/12167 /srv/obs/service/12167/src /srv/obs/service/12167/src/_service /srv/obs/service/12167/src/.old /srv/obs/service/12167/out /srv/obs/service/12167/var /srv/obs/service/12167/var/cache /srv/obs/service/12167/var/cache/obs /srv/obs/service/12167/var/cache/obs/h9UaxI3JJ6e1 /srv/obs/service/12167/var/cache/obs/h9UaxI3JJ6e1/scripts /srv/obs/service/12167/var/cache/obs/h9UaxI3JJ6e1/scripts/inner.sh /srv/obs/service/12167/var/cache/obs/h9UaxI3JJ6e1/scripts/inner.sh.command /srv/obs/service/12167/home + echo Running /usr/lib/obs/service//obs_scm --scm git --url https://review.opendev.org/starlingx/fault --revision refs/changes/95/684395/5 --version 1.0 --subdir fm-common --filename fm-common --changesgenerate disable --extract opensuse/fm-common.spec --extract opensuse/fm-common.changes --outdir /var/cache/obs/h9UaxI3JJ6e1/out + export CACHEDIRECTORY=/var/cache/obs/h9UaxI3JJ6e1/scm-cache + CACHEDIRECTORY=/var/cache/obs/h9UaxI3JJ6e1/scm-cache + export HOME=/var/cache/obs/h9UaxI3JJ6e1/home + HOME=/var/cache/obs/h9UaxI3JJ6e1/home + /usr/lib/obs/service//obs_scm --scm git --url https://review.opendev.org/starlingx/fault --revision refs/changes/95/684395/5 --version 1.0 --subdir fm-common --filename fm-common --changesgenerate disable --extract opensuse/fm-common.spec --extract opensuse/fm-common.changes --outdir /var/cache/obs/h9UaxI3JJ6e1/out Running /usr/lib/obs/service//obs_scm --scm git --url https://review.opendev.org/starlingx/fault --revision refs/changes/95/684395/5 --version 1.0 --subdir fm-common --filename fm-common --changesgenerate disable --extract opensuse/fm-common.spec --extract opensuse/fm-common.changes --outdir /var/cache/obs/h9UaxI3JJ6e1/out refs/changes/95/684395/5: No such revision
-- Adrian Schroeter <adrian@suse.de> Build Infrastructure Project Manager SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany (HRB 247165, AG München), Geschäftsführer: Felix Imendörffer -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On 25/09/2019 19:04, Adrian Schröter wrote:
# git show refs/changes/95/684395/5
leads to an error here. Usually you specify a commit, tag or branch. I suppose you have a local tag with that name? Yes https://review.opendev.org/#/c/684395/
It's a valid review in Openstack The really strange thing, is that an osc local service works. Have no clue how to get around the issue and any hint is welcome -- Dominig ar Foll Senior Software Architect Intel Open Source Technology Centre -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Sep 25 2019, Adrian Schröter <adrian@suse.de> wrote:
# git show refs/changes/95/684395/5
leads to an error here. Usually you specify a commit, tag or branch. I suppose you have a local tag with that name?
You need to fetch _all_ refs (like --mirror). $ git ls-remote https://review.opendev.org/starlingx/fault | grep refs/changes/95/684395/5 6f0ec9c4fc2ba8f1c1652d98dfafbb20d03e965a refs/changes/95/684395/5 Note that obs_scm explicitly documents that alternate ref namespaces are supposed to work. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Hi, I had a deeper look into the code and could figure out the problem. I filed an issue https://github.com/openSUSE/obs-service-tar_scm/issues/330 Patch is on the way but needs some more testing cu Frank Am Mittwoch, den 25.09.2019, 18:02 +0200 schrieb Dominig ar Foll (Intel Open Source):
Hello,
I try to extract a given review from gerrit with a service file and I get an error that I do not understand My _service points to a pending review. - If I run the service locally with "osc service localrun" it works. - if I run "git clone https://review.opendev.org/starlingx/fault refs/changes/95/684395/5" I get the code * if I run "osc service rr" I get an error "No such revision"
Could some one explains me what is wrong ? My test project is at
https://build.opensuse.org/package/show/home:dominig:starlingx-sandbox/fm-co...
------------------- _service ------------------------------ <services> <service name="obs_scm"> <param name="scm">git</param> <param name="url"> https://review.opendev.org/starlingx/fault</param> <param name="revision">refs/changes/95/684395/5</param> <param name="version">1.0</param> <param name="subdir">fm-common</param> <param name="filename">fm-common</param> <param name="changesgenerate">disable</param> <param name="extract">opensuse/fm-common.spec</param> <param name="extract">opensuse/fm-common.changes</param> </service> <service mode="buildtime" name="tar" /> <service mode="buildtime" name="recompress"> <param name="compression">gz</param> <param name="file">*.tar</param> </service> <service name="set_version" mode="disabled"/> </services>
------------ OBS log ---------------
service obs_scm failed: /srv/obs/service/12167 /srv/obs/service/12167/src /srv/obs/service/12167/src/_service /srv/obs/service/12167/src/.old /srv/obs/service/12167/out /srv/obs/service/12167/var /srv/obs/service/12167/var/cache /srv/obs/service/12167/var/cache/obs /srv/obs/service/12167/var/cache/obs/h9UaxI3JJ6e1 /srv/obs/service/12167/var/cache/obs/h9UaxI3JJ6e1/scripts /srv/obs/service/12167/var/cache/obs/h9UaxI3JJ6e1/scripts/inner.sh /srv/obs/service/12167/var/cache/obs/h9UaxI3JJ6e1/scripts/inner.sh.co mmand /srv/obs/service/12167/home + echo Running /usr/lib/obs/service//obs_scm --scm git --url https://review.opendev.org/starlingx/fault --revision refs/changes/95/684395/5 --version 1.0 --subdir fm-common --filename fm-common --changesgenerate disable --extract opensuse/fm-common.spec --extract opensuse/fm-common.changes --outdir /var/cache/obs/h9UaxI3JJ6e1/out + export CACHEDIRECTORY=/var/cache/obs/h9UaxI3JJ6e1/scm-cache + CACHEDIRECTORY=/var/cache/obs/h9UaxI3JJ6e1/scm-cache + export HOME=/var/cache/obs/h9UaxI3JJ6e1/home + HOME=/var/cache/obs/h9UaxI3JJ6e1/home + /usr/lib/obs/service//obs_scm --scm git --url https://review.opendev.org/starlingx/fault --revision refs/changes/95/684395/5 --version 1.0 --subdir fm-common --filename fm-common --changesgenerate disable --extract opensuse/fm-common.spec --extract opensuse/fm-common.changes --outdir /var/cache/obs/h9UaxI3JJ6e1/out Running /usr/lib/obs/service//obs_scm --scm git --url https://review.opendev.org/starlingx/fault --revision refs/changes/95/684395/5 --version 1.0 --subdir fm-common --filename fm-common --changesgenerate disable --extract opensuse/fm-common.spec --extract opensuse/fm-common.changes --outdir /var/cache/obs/h9UaxI3JJ6e1/out refs/changes/95/684395/5: No such revision
-- Dominig ar Foll Senior Software Architect Intel Open Source Technology Centre
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (4)
-
Adrian Schröter
-
Andreas Schwab
-
Dominig ar Foll (Intel Open Source)
-
Frank Schreiner