Skip to content

ci: update requirements.txt for snyk #692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

nealrichardson
Copy link
Contributor

@nealrichardson nealrichardson commented Jul 21, 2025

Intent

The requirements.txt claims only exists to facilitate dependency scanning. We're getting spurious alerts from it. Fix that.

Approach

Add a reminder comment in pyproject.toml. Copy over to requirements.txt and delete the optional/dev dependencies listed there. Alphabetize.

Update the snyk.yml workflow to uv pip compile from pyproject.toml, so snyk stays in sync. Then delete the requirements.txt because it's only used for snyk, right? Wrong, other things are failing. So we'll need to clean up other references to that requirements file.

Automated Tests

CI should pass.

@nealrichardson nealrichardson requested a review from edavidaja July 21, 2025 20:57
Copy link

github-actions bot commented Jul 21, 2025

PR Preview Action v1.6.2

🚀 View preview at
https://posit-dev.github.io/rsconnect-python/pr-preview/pr-692/

Built to branch gh-pages at 2025-07-22 17:20 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link

github-actions bot commented Jul 21, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
5143 3993 78% 0% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: 82dad8f by action🐍

Copy link
Collaborator

@edavidaja edavidaja left a comment

Choose a reason for hiding this comment

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

I think we can uv pip compile to generate the requirements file.

@nealrichardson
Copy link
Contributor Author

I think we can uv pip compile to generate the requirements file.

Sure, we could, but that might entail bigger build tooling changes that I wasn't looking to take on myself right now. I was just hoping to clean up some nuisance snyk alerts.

It turns out though that the comment that "requirements.txt is just used by snyk" is (no longer) true, it's referenced in several places in the repo, and maybe it's connected to why the integration tests failed, I haven't looked into it. So I'm going to have to rethink this.

@nealrichardson
Copy link
Contributor Author

@edavidaja I edited the snyk workflow to uv pip compile, so we should be able to delete the requirements.txt. However, the comment in it seems to be a lie and we do use it elsewhere in CI, so that will need to be tracked down.

@nealrichardson
Copy link
Contributor Author

nealrichardson commented Jul 22, 2025

I think #536 is the thing that needs to be unwound. [edit: or not, can't tell that this is used in CI, though we should address this anyway, perhaps by deleting]

@nealrichardson nealrichardson self-assigned this Jul 22, 2025
@nealrichardson nealrichardson requested a review from edavidaja July 22, 2025 17:20
@nealrichardson
Copy link
Contributor Author

Tests are still failing but the only non-comment change in this PR is in snyk.yml so I don't see how they're related.

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