-
Notifications
You must be signed in to change notification settings - Fork 26
refactor: upgrade some content and bundle APIs to v1 #731
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
Conversation
|
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
tdstein
left a comment
There was a problem hiding this 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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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]
599a928 to
cd047fb
Compare
Intent
Removes calls to 4 undocumented APIs and replaces them with their v1 counterparts:
POST applications/:id(both create and update)POST applications/:id/uploadPOST 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
rsconnect-python-tests-at-nightworkflow in Connect against this feature branch.