fix(ci): bind the served UI digest independently of source maps
Device Core qualification / qualify (push) Successful in 6m13s

This commit is contained in:
DCCONSTRUCTIONS
2026-09-29 18:29:14 +03:00
parent 55ab76bfc5
commit 67b2ae5863
2 changed files with 30 additions and 0 deletions
+12
View File
@@ -54,6 +54,17 @@ def source_files(path, destination):
return result
def packaged_dist_digest(files):
digest = hashlib.sha256()
prefix = "services/device-manager/dist/"
for path, data in sorted(files.items()):
if path.startswith(prefix):
name = path[len(prefix):].encode()
digest.update(len(name).to_bytes(8, "big") + name)
digest.update(len(data).to_bytes(8, "big") + data)
return digest.hexdigest()
def bundle(root, report, run_id, run_number):
if type(run_id) is not int or type(run_number) is not int or not 0 < run_id < 2**53 or not 0 < run_number < 2**53:
raise ValueError("invalid_run_identity")
@@ -96,6 +107,7 @@ def bundle(root, report, run_id, run_number):
"runId": run_id,
"runNumber": run_number,
"qualification": report,
"packagedManagerDistSha256": packaged_dist_digest(files),
"filesSha256": {name: hashlib.sha256(value).hexdigest() for name, value in sorted(files.items())},
}
files[ENTRY] = encoded(descriptor)