Skip to content

Conversation

@nealrichardson
Copy link
Contributor

@nealrichardson nealrichardson commented Dec 1, 2025

Intent

Removes calls to 4 undocumented APIs and replaces them with their v1 counterparts:

  • POST applications/:id (both create and update)
  • POST applications/:id/upload
  • POST applications/:id/deploy (this was already replaced by a v1 version and was unused)

The v1 APIs have all been around for a long time, so there are no Connect server version checks.

Type of Change

Refactor

Approach

Ask Claude to help me with the upload one, and then we pulled on the thread a little more to remove some swapping of numeric ids for GUIDs.

Automated Tests

Mocks were updated for this. I'll trigger the Connect integration tests separately, IDK that we have actual integration coverage within the repo.

Directions for Reviewers

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 1, 2025

PR Preview Action v1.6.3
Preview removed because the pull request was closed.
2025-12-01 21:03 UTC

@github-actions
Copy link

github-actions bot commented Dec 1, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
5248 3993 76% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
rsconnect/api.py 77% 🟢
rsconnect/models.py 92% 🟢
TOTAL 84% 🟢

updated for commit: cd047fb by action🐍

Copy link
Collaborator

@tdstein tdstein left a comment

Choose a reason for hiding this comment

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

Seems good to me. I didn't test the backwards compatibility, but it looks fine.


def content_upload_bundle(self, content_guid: str, tarball: typing.IO[bytes]) -> BundleMetadata:
response = cast(
Union[BundleMetadata, HTTPResponse], self.post("v1/content/%s/bundles" % content_guid, body=tarball)
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit; f-strings are preferred

Copy link
Contributor Author

@nealrichardson nealrichardson Dec 1, 2025

Choose a reason for hiding this comment

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

The other methods in RSConnectClient are doing this style of string interpolation too, I'll make a followup issue to update everything at once [edit: #733]

@nealrichardson nealrichardson merged commit c39d02e into main Dec 1, 2025
13 checks passed
@nealrichardson nealrichardson deleted the migrate-some-v1-apis branch December 1, 2025 21:03
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.

3 participants