Skip to content

upload: per-arch distributions in results JSON; optional logs/SBOM repos#89

Merged
jajreidy merged 1 commit intokonflux-ci:mainfrom
jajreidy:fix-signed-upload
Mar 25, 2026
Merged

upload: per-arch distributions in results JSON; optional logs/SBOM repos#89
jajreidy merged 1 commit intokonflux-ci:mainfrom
jajreidy:fix-signed-upload

Conversation

@jajreidy
Copy link
Copy Markdown
Contributor

@jajreidy jajreidy commented Mar 25, 2026

What

  • With --target-arch-repo, pulp_results.json now includes per-architecture RPM distribution base URLs in distributions (e.g. x86_64…/pulp-content/{namespace}/{arch}/), not only build-scoped logs, SBOM, and artifacts.
  • Logs and SBOM Pulp repositories are created only when the run may upload those kinds of files (CLI inference from RPM tree *.log / --results-json keys and from --sbom-path / SBOM-classified keys). upload-files skips logs/SBOM repos when no --log / --sbom files are given.
  • skip_logs_repo / skip_sbom_repo on UploadContext and PulpHelper.setup_repositories (default False) keep backward-compatible behavior for code that does not set them.
  • Guards raise clear errors if log or SBOM uploads are attempted without a corresponding repository PRN.

Why

  • Consumers could not see which per-arch RPM distributions were used when using --target-arch-repo.
  • Creating unused logs/SBOM repos and reporting their URLs was unnecessary noise when only RPMs (and results JSON to Pulp) were uploaded.

How to test

  • make lint
  • pre-commit run --all-files
  • make test
  • Manually: upload --target-arch-repo with RPM-only layout and no logs/SBOM; confirm distributions includes arch keys (e.g. x86_64) and omits logs/sbom when not used; confirm full run still works with --sbom-path and/or logs under arch dirs.

Notes for reviewers

  • The artifacts repository is still created when publishing pulp_results.json to Pulp (unchanged); only logs and SBOM repo creation is conditional.
  • Programmatic callers get the old “create all base repos” behavior unless they pass the new skip flags or use the CLI paths that set them.

@jajreidy jajreidy requested a review from a team as a code owner March 25, 2026 16:09
@snyk-io
Copy link
Copy Markdown

snyk-io bot commented Mar 25, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@jajreidy jajreidy force-pushed the fix-signed-upload branch from dcf41b4 to c296907 Compare March 25, 2026 16:40
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.00%. Comparing base (0e424ea) to head (c296907).
⚠️ Report is 104 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #89      +/-   ##
==========================================
+ Coverage   95.53%   97.00%   +1.46%     
==========================================
  Files          70       74       +4     
  Lines        3946     5344    +1398     
==========================================
+ Hits         3770     5184    +1414     
+ Misses        176      160      -16     
Flag Coverage Δ
unit-tests 97.00% <100.00%> (?)
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
pulp_tool/cli/upload.py 100.00% <100.00%> (ø)
pulp_tool/cli/upload_files.py 100.00% <100.00%> (ø)
pulp_tool/models/context.py 100.00% <100.00%> (ø)
pulp_tool/models/results.py 94.20% <ø> (ø)
pulp_tool/services/upload_service.py 89.83% <100.00%> (+10.97%) ⬆️
pulp_tool/utils/constants.py 100.00% <100.00%> (ø)
pulp_tool/utils/distribution_manager.py 100.00% <100.00%> (ø)
pulp_tool/utils/pulp_helper.py 100.00% <100.00%> (ø)
pulp_tool/utils/repository_manager.py 100.00% <100.00%> (ø)
pulp_tool/utils/uploads.py 99.16% <100.00%> (+0.31%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jajreidy jajreidy merged commit f43332e into konflux-ci:main Mar 25, 2026
5 checks passed
@jajreidy jajreidy deleted the fix-signed-upload branch March 25, 2026 16:47
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.

2 participants