pkg-release: support debian/watch (uscan/Artifactory) in provenance step - #219
Open
Keerthi Gowda (keerthi-go) wants to merge 3 commits into
Open
pkg-release: support debian/watch (uscan/Artifactory) in provenance step#219Keerthi Gowda (keerthi-go) wants to merge 3 commits into
Keerthi Gowda (keerthi-go) wants to merge 3 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
upstream.confto adebian/watchfile that resolves the upstream tarball from Artifactory viauscan(e.g.pkg-qcom-fastcv-binariesonqcom/ubuntu/resolute) have noupstream.confand noupstream/*git tags, so the "Create provenance file" step's fallback branch unconditionally rangit 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.build_package/action.ymlalready does (debian/watch+qartifactory), deriving the upstream version fromPKG_VERSIONand the source URL fromdebian/watchitself — no new artifact download or tool install needed in this job.upstream.conf(prebuilt_binary, still used bypkg-adreno) and git-forgeupstream/*tag (source) branches are unchanged, so both mechanisms are supported during the transition.Test plan
bash -n.pkg-qcom-fastcv-binaries's actualdebian/directory (noupstream.conf,debian/watchpointing atqartifactory-edge.qualcomm.com) withPKG_VERSION=1.8.9-0qcom1— produces valid JSON withupstream_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).upstream.confbranch againstpkg-adreno'sdebian/directory — confirms it still takes the originalprebuilt_binarybranch, unaffected.pkg-qcom-fastcv-binaries's workflow-call ref at this branch and re-run the release workflow end-to-end to confirm thepersistancejob succeeds.🤖 Generated with Claude Code