Bug 15193

Summary: AB-INT: yoctotestresultsquerytests.TestResultsQueryTests.test_get_sha1 failure
Product: [QA/Testing] Functional (self) Testing Reporter: Alexandre Belloni <alexandre.belloni>
Component: oe-selftestAssignee: Alexandre Belloni <alexandre.belloni>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: alexandre.belloni, randy.macleod
Version: unspecified   
Target Milestone: 5.0 M2   
Hardware: x86   
OS: Multiple   
Whiteboard: AB-INT
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Alexandre Belloni 2023-08-17 13:26:05 UTC
https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/5586/steps/14/logs/stdio

ERROR: Can not find SHA-1 for yocto-4.0 in /home/pokybuild/yocto-worker/oe-selftest-debian/build
2023-08-11 03:05:43,954 - oe-selftest - INFO - 3: 45/46 370/529 (0.07s) (0 failed) (yoctotestresultsquerytests.TestResultsQueryTests.test_get_sha1)
2023-08-11 03:05:43,954 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/oe-selftest-debian/build/meta/lib/oeqa/selftest/cases/yoctotestresultsquerytests.py", line 27, in test_get_sha1
    self.assertEqual(
  File "/usr/lib/python3.11/unittest/case.py", line 873, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib/python3.11/unittest/case.py", line 866, in _baseAssertEqual
    raise self.failureException(msg)
AssertionError: None != '00cfdde791a0176c134f31e5a09eff725e75b905'


I doubt this is caused by something in my branch. My best guess is that because get_sha1 is using git rev-list, the tag may not be found when we do a shallow clone. We could use git ls-remote but in this case, we would get the sha1 of the tag instead of the sha1 of the commit pointed to by the tag.
Comment 2 Alexandre Belloni 2024-01-24 09:33:21 UTC
Did not happen for a while, and code changed around.