Skip to content

Refresh uv requirements exports when overwriting manifests - #991

Merged
tdstein merged 1 commit into
mainfrom
symphony/posit-dev_rsconnect-python_990-c3ea8ddaa168f811
Nov 19, 2026
Merged

tdstein merged 1 commit into
mainfrom
symphony/posit-dev_rsconnect-python_990-c3ea8ddaa168f811

Conversation

@tdstein

@tdstein tdstein commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

uv.lock → one export → manifest checksum and requirements.txt.lock

Refresh the generated requirements file during write-manifest --overwrite. Preserve directly supplied requirements, including files named requirements.txt.lock.

Closes #990.

Evidence

  • Before the fix, four CLI paths recorded checksums that differed from the file on disk.
  • After the fix, 73 focused tests passed. Coverage includes changed and unchanged locks, direct requirements, and the overwrite guard. Ruff passed.
  • The broader local run hit a sandbox restriction on the Jupyter kernel socket. PR CI will run the full suite.

Merge Danger

Revertible. The behavior change is limited to generated uv requirements in Python manifest commands.

Closes #990

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.2
Preview removed because the pull request was closed.
2026-11-19 16:50 UTC

@github-actions

Copy link
Copy Markdown

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
11289 10018 89% 0% 🟢

New Files

No new covered files...

Modified Files

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

updated for commit: a986f6c by action🐍

@tdstein tdstein left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Manual QA passed at a986f6cc against a local development instance of Posit Connect.

  • Ran write-manifest for api, pyproject, notebook, voila, and quarto. After changing the MarkupSafe pin in uv.lock from 3.0.2 to 3.0.3, -r uv.lock --overwrite replaced the existing requirements.txt.lock on all five paths. In each case, the checksum in manifest.json matched the file on disk.
  • Repeated the overwrite with the same uv.lock. The generated timestamp refreshed, the package list stayed the same, and the checksum still matched. Passing -r requirements.txt.lock directly preserved the publisher-supplied file byte for byte, including CRLF line endings, on all five paths.
  • On the API path, omitting --overwrite refused the operation and preserved the previous export. Deployed the refreshed manifest to Connect and confirmed that the API launched with MarkupSafe==3.0.3 in its Python 3.14.3 environment.

@tdstein
tdstein requested a review from joshyam-k November 19, 2026 16:43

@joshyam-k joshyam-k left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@tdstein
tdstein merged commit 8e3f378 into main Nov 19, 2026
27 checks passed
@tdstein
tdstein deleted the symphony/posit-dev_rsconnect-python_990-c3ea8ddaa168f811 branch November 19, 2026 16:49
@tdstein tdstein mentioned this pull request Nov 19, 2026
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.

write-manifest --overwrite leaves generated requirements.txt.lock stale

2 participants