Skip to content

Conversation

@nealrichardson
Copy link
Contributor

Intent

Allow adding metadata to bundle uploads, a (potentially) new API in Connect.

If you're in a git checkout, it will attempt to set the source, source_repo, source_branch, and source_commit fields that are already known to Connect. It is also possible to provide additional key-value pairs, or override the values of those fields, using the --metadata CLI flag. Or suppress metadata detection with --no-metadata.

If you're on an older version of Connect that does not support this API, or specify the --no-metadata flag, the old bundle upload API will be used, and nothing is changed.

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change

Approach

I've lost the exact prompt now, but I basically gave Claude the API docs for the new API, described the behavior I wanted (see "Intent"), and let it go. It seemed to get it in one shot, except that rsconnect-python was not using the v1 bundle APIs yet. So I stashed that, did #731, and then reapplied the changes.

Automated Tests

There are mocked tests for what looks like all of the new behavior, but we don't have general integration tests in this repo that would test this behavior. The extended nightly integration tests in the connect repo should exercise the new APIs, if not confirm that they're sending the correct information.

I manually against a local Connect server with the new API and confirmed both that I could add extra fields with --metadata and that git commit info is picked up from the environment.

Checklist

  • I have updated CHANGELOG.md to cover notable changes.
  • I have updated all related GitHub issues to reflect their current state.
  • I have run the rsconnect-python-tests-at-night workflow in Connect against this feature branch.

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

PR Preview Action v1.6.3

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

Built to branch gh-pages at 2025-12-08 16:09 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@nealrichardson nealrichardson changed the title Claude's first pass at adding bundle metadata support feat: add metadata to bundle uploads Dec 6, 2025
@github-actions
Copy link

github-actions bot commented Dec 8, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
5257 4014 76% 0% 🟢

New Files

File Coverage Status
rsconnect/git_metadata.py 96% 🟢
TOTAL 96% 🟢

Modified Files

File Coverage Status
rsconnect/api.py 76% 🟢
rsconnect/http_support.py 82% 🟢
rsconnect/main.py 69% 🟢
TOTAL 75% 🟢

updated for commit: 91f9ee8 by action🐍

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