Skip to content

pkg-release: support debian/watch (uscan/Artifactory) in provenance step - #219

Open
Keerthi Gowda (keerthi-go) wants to merge 3 commits into
mainfrom
fix/provenance-debian-watch-artifactory
Open

pkg-release: support debian/watch (uscan/Artifactory) in provenance step#219
Keerthi Gowda (keerthi-go) wants to merge 3 commits into
mainfrom
fix/provenance-debian-watch-artifactory

Conversation

@keerthi-go

Copy link
Copy Markdown
Contributor

Summary

  • Packages migrating from upstream.conf to a debian/watch file that resolves the upstream tarball from Artifactory via uscan (e.g. pkg-qcom-fastcv-binaries on qcom/ubuntu/resolute) have no upstream.conf and no upstream/* git tags, so the "Create provenance file" step's fallback branch unconditionally ran git describe --tags --match 'upstream/*' --abbrev=0, which fails with exit 128 ("fatal: No names found, cannot describe anything.") when no such tags exist. This is the root cause of the failure in run 31029093269 / job 92385730283.
  • Adds a third branch to the provenance step that detects this case the same way build_package/action.yml already does (debian/watch + qartifactory), deriving the upstream version from PKG_VERSION and the source URL from debian/watch itself — no new artifact download or tool install needed in this job.
  • The existing upstream.conf (prebuilt_binary, still used by pkg-adreno) and git-forge upstream/* tag (source) branches are unchanged, so both mechanisms are supported during the transition.

Test plan

  • Verified YAML parses and the extracted bash script passes bash -n.
  • Dry-ran the new branch's logic against pkg-qcom-fastcv-binaries's actual debian/ directory (no upstream.conf, debian/watch pointing at qartifactory-edge.qualcomm.com) with PKG_VERSION=1.8.9-0qcom1 — produces valid JSON with upstream_type: prebuilt_binary_watch, upstream_repo_tag: 1.8.9 (matching the orig tarball version uscan actually fetched in the failing run's build log).
  • Dry-ran the unchanged upstream.conf branch against pkg-adreno's debian/ directory — confirms it still takes the original prebuilt_binary branch, unaffected.
  • Point pkg-qcom-fastcv-binaries's workflow-call ref at this branch and re-run the release workflow end-to-end to confirm the persistance job succeeds.

🤖 Generated with Claude Code

Packages migrating from upstream.conf to a debian/watch file that
resolves the upstream tarball from Artifactory via uscan (e.g.
pkg-qcom-fastcv-binaries on qcom/ubuntu/resolute) have no upstream.conf
and no upstream/* git tags, so the "Create provenance file" step's
fallback branch unconditionally ran `git describe --tags --match
'upstream/*' --abbrev=0`, which fails with exit 128 when no such tags
exist.

Add a third branch that detects this case the same way
build_package/action.yml already does (debian/watch + qartifactory),
deriving the upstream version from PKG_VERSION and the source URL from
debian/watch itself, without needing any new artifact download or
tool install in this job. The existing upstream.conf (prebuilt_binary)
and git-forge upstream/* tag (source) branches are unchanged, so both
mechanisms are supported during the transition.

Signed-off-by: Keerthi Gowda <kbalehal@qti.qualcomm.com>
The "Create provenance file" step in pkg-release-reusable-workflow.yml
had grown into ~110 lines of inline bash covering three upstream
detection mechanisms (upstream.conf, debian/watch+Artifactory, and
git upstream/* tags). Move that logic into
scripts/generate_provenance.sh so the workflow step is a thin call
into a testable script, matching the pattern already used by
scripts/resolve_branch_family_suite.sh.

No behavior change: verified against fixture repos for all three
upstream mechanisms that the generated provenance.json is unchanged.

Signed-off-by: Keerthi Gowda <kbalehal@qti.qualcomm.com>
Signed-off-by: Keerthi Gowda <kbalehal@qti.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant