Skip to content

Conversation

@amol-
Copy link
Collaborator

@amol- amol- commented Dec 18, 2025

Intent

Previously rsconnect didn't check that the requirements.txt didn't exist, it did just emit a warning

    Warning: Capturing the environment using 'pip freeze'.
             Consider creating a requirements.txt file instead.

Now instead it errors if the requirements file doesn't exist

Invalid value for '--requirements-file' / '-r': File 'requirements.txt' does not exist.

The change in behavior accidentally slipped in as part of #748 as click.Path unexpectedly validates the default value too even if the option wasn't provided.

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change

Approach

Just disable exists=True from command line validation, this will restore the previous behavior of issuing the warning.

Automated Tests

Tests in Connect triggered this issue

@github-actions
Copy link

github-actions bot commented Dec 18, 2025

PR Preview Action v1.6.3
Preview removed because the pull request was closed.
2025-12-18 19:37 UTC

@github-actions
Copy link

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
5235 3970 76% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
rsconnect/main.py 68% 🟢
TOTAL 68% 🟢

updated for commit: e4ea28b by action🐍

@amol- amol- marked this pull request as ready for review December 18, 2025 18:34
Copy link

@dotNomad dotNomad left a comment

Choose a reason for hiding this comment

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

Very clean fix. Thanks for jumping on this! 🚀

@joshyam-k
Copy link
Contributor

joshyam-k commented Dec 18, 2025

You can manually run the rsconnect-python-tests-at-night workflow https://github.com/posit-dev/connect/actions/workflows/rsconnect-python.yml against this branch to check whether connect CI will pass

@joshyam-k
Copy link
Contributor

@joshyam-k joshyam-k merged commit c25a3f5 into main Dec 18, 2025
23 checks passed
@joshyam-k joshyam-k deleted the missing-requirements-txt branch December 18, 2025 19:36
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.

4 participants