When no explicit ref is specified in modulemd, MBS should use "master" as ref. However in module build 1396 in prod, for component plexus-languages commit 10a651f39911a07d85fe87fcfe91999545e44ae0 was used, which is not HEAD of master branch.
did you create any commit since previous build?
No, master HEAD was updated on 12 September, module build was submitted 2 months later, on 17 November.
@mizdebs, I'm pretty sure if you will git commit -s -m rebuild --allow-empty && git push && mbs-build submit will use new HEAD.
git commit -s -m rebuild --allow-empty && git push && mbs-build submit
Pretty sure it won't help. I can demonstrate this behaviour with a test case:
diff --git a/tests/test_scm.py b/tests/test_scm.py index 67f3716..0690973 100644 --- a/tests/test_scm.py +++ b/tests/test_scm.py @@ -140,3 +140,8 @@ class TestSCMModule(unittest.TestCase): def test_get_latest_incorect_component_ref(self): scm = module_build_service.scm.SCM(repo_path) scm.get_latest('15481faa232d66589e660cc301179867fb00842c9') + + def test_get_latest_default_ref(self): + scm = module_build_service.scm.SCM('https://src.fedoraproject.org/rpms/plexus-languages.git') + commit = scm.get_latest(None) + self.assertEquals(commit, '58379ef7887cbc91b215bacd32430628c92bc869')
This fails with:
====================================================================== FAIL: test_get_latest_default_ref (tests.test_scm.TestSCMModule) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/kojan/git/fm-orchestrator/tests/test_scm.py", line 147, in test_get_latest_default_ref self.assertEquals(commit, '58379ef7887cbc91b215bacd32430628c92bc869') AssertionError: '10a651f39911a07d85fe87fcfe91999545e44ae0' != '58379ef7887cbc91b215bacd32430628c92bc869' -------------------- >> begin captured logging << -------------------- module_build_service: DEBUG: Getting/verifying commit hash for https://src.fedoraproject.org/rpms/plexus-languages.git module_build_service: DEBUG: Getting/verifying commit hash for https://src.fedoraproject.org/rpms/plexus-languages.git module_build_service: DEBUG: Getting the full commit hash for "https://src.fedoraproject.org/rpms/plexus-languages.git" --------------------- >> end captured logging << ---------------------
git ls-remote shows:
git ls-remote
$ git ls-remote https://src.fedoraproject.org/rpms/plexus-languages.git 58379ef7887cbc91b215bacd32430628c92bc869 HEAD 58379ef7887cbc91b215bacd32430628c92bc869 refs/heads/master 10a651f39911a07d85fe87fcfe91999545e44ae0 refs/remotes/origin/master
So, master head is at 58379ef, but MBS seems to use origin/master instead, which is at 10a651f
Metadata Update from @mprahl: - Issue assigned to mprahl
PR #800 should fix this
Metadata Update from @mprahl: - Issue status updated to: Closed (was: Open)
Log in to comment on this ticket.