Skip to content

Use codecov-cli for uploads #85386

Merged
mattclay merged 1 commit into
ansible:develfrom
mattclay:codecov
Jun 25, 2025
Merged

Use codecov-cli for uploads #85386
mattclay merged 1 commit into
ansible:develfrom
mattclay:codecov

Conversation

@mattclay

@mattclay mattclay commented Jun 25, 2025

Copy link
Copy Markdown
Member
SUMMARY

Use codecov-cli for uploads.

Resolves #84818.

ISSUE TYPE

Test Pull Request

@ansibot ansibot added test This PR relates to tests. needs_triage Needs a first human triage before being processed. labels Jun 25, 2025
@mattclay mattclay removed the needs_triage Needs a first human triage before being processed. label Jun 25, 2025
@mattclay mattclay force-pushed the codecov branch 2 times, most recently from 1d9195d to b78aa67 Compare June 25, 2025 07:21
ci_coverage
ci_complete
@mattclay mattclay changed the title Test codecov uploader Use codecov-cli for uploads Jun 25, 2025

venv.create(venv_dir, with_pip=True)

run(python_bin, '-m', 'pip', 'install', f'{package}=={version}', '--disable-pip-version-check')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FTR, in #84818 I was hoping to replace the binary file hash checking with proper provenance verification. Do you think you could integrate that? This would require a separate pip download, followed by a pypi-attestations verify and only then pip install from the wheelhouse.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI pipeline already performs many normal pip installs. Why do something different for this one?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, looking at this closer, this doesn't look like something should be integrating at all right now:

https://github.com/trailofbits/pypi-attestations/blob/main/README.md#usage-as-a-command-line-tool

The pypi-attestations CLI is intended primarily for experimentation, and is not considered a stable interface for generating or verifying attestations.

If there's anything to do with attestations, we should discuss that separately from the codecov changes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's by the same people who added attestations to PyPI and wrote the PEP. I doubt the CLI will change in an incompatible way (there's also an importable API that might).

@mattclay the reason I wanted this is that Codecov's official GitHub action performs verification. At least for one of the installation variants. Though, they use their GPG keys and own web server serving binaries. They don't have an equivalent for pip install in there.

This originated back when they were hacked. And this was also why we opted to keep a copy of the binary we use on S3 back then, having checked it. Now that it's not under our control, this PR drops the provenance verification that was kinda there (though manual). So I wanted to keep some of that.

But I guess we could look into this aspect of supply chain separately.

@mattclay mattclay marked this pull request as ready for review June 25, 2025 16:44
@mattclay mattclay merged commit 4a03ccb into ansible:devel Jun 25, 2025
81 checks passed
@mattclay mattclay deleted the codecov branch June 25, 2025 17:04
mattclay added a commit that referenced this pull request Jun 30, 2025
ci_coverage
ci_complete

(cherry picked from commit 4a03ccb)
@ansible ansible locked and limited conversation to collaborators Jul 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

has_issue test This PR relates to tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] Upgrade Codecov uploader to use API v5

4 participants