openSUSE / obs-scm-bridge

GNU General Public License v2.0
3 stars 7 forks source link

backend looses branch information for packages for whole projects managed via scmsync #6

Closed dcermak closed 1 year ago

dcermak commented 1 year ago

Issue Description

The backend "forgets" to pass the information to which branch a project belongs to the individual package's _meta configurations when a full project is managed via scmsync.

Expected Result

The package should "inherit" the branch information from the project.

How to Reproduce

  1. Create a new project and add the following element to the _meta: <scmsync>https://github.com/SUSE/BCI-dockerfile-generator#tumbleweed</scmsync>
  2. wait for the source services to run
  3. all packages are now broken

The issue is that the backend creates the following _meta:

<package name="$subdir" project="$prj_name">
  <scmsync>https://github.com/SUSE/bci-dockerfile-generator?subdir=$subdir</scmsync>
</package>

but the fragment with the branch name is missing here. Thus the backend will then clone the wrong branch (which may or may not contain this subdir).

Further Information

dcermak commented 1 year ago

cc @mlschroe

adrianschroeter commented 1 year ago

branch should not be used when working with git workflow. Instead you should fork in the the git instance. We may extend the scm bridge later to follow such forks automatically, but this does not belong to OBS backend code.

dcermak commented 1 year ago

branch should not be used when working with git workflow. Instead you should fork in the the git instance. We may extend the scm bridge later to follow such forks automatically, but this does not belong to OBS backend code.

I don't want to create forks, I have a template project that "deploys" these templates into branches in the same repository. Also, if this setup should really be unsupported, then it would be nice if https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.scm_bridge.html#sec.obs.obs_scm_bridge.setup.specials.revision could be updated to reflect that.

mlschroe commented 1 year ago

Adrian misunderstood this issue. It is a bug, but not a bug in OBS but in the scm bridge. Adrian will fix it ASAP.

adrianschroeter commented 1 year ago

yes, sorry (I was still on FTO it seems), the fixed code is deployed now, but I can not verify since home:defolos:BCI:CR:Tumbleweed has no scmsync tag atm.

adrianschroeter commented 1 year ago

but works local at least.