-
Notifications
You must be signed in to change notification settings - Fork 27
implement publishing static outputs for cloud #418
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
|
…oud-static-outputs
…plication or content
|
Closed https://github.com/mslynch/rsconnect-python/pull/1 in favor of this PR because all the tests are able to pass here. |
tests/test_api.py
Outdated
| import sys | ||
| import io | ||
| from rsconnect.exception import RSConnectException | ||
| from rsconnect.metadata import CURRENT_APP_STORE_VERSION |
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 testing strategy might be better if we have a scaffold of tests for each version. That way we can just add new tests when version advances instead of needing to modify or delete existing test. We also want to have tests for older versions.
Intent
Adds support for
deploy htmlanddeploy manifestto deploy to Posit Cloud.Resolves #420.
This includes the changes from https://github.com/mslynch/rsconnect-python/pull/1, plus versioned app store files and more tests.
Type of Change
Approach
Allows for static content to be deployed to Posit Cloud.
This PR also introduces file versioning to the app store files with an initial version of 1. For cloud deployments,
app_idwill now store the content id (as inhttps://posit.cloud/content/{content_id}(as opposed to the previous approach of storing the application id).Also contains a refactor to Cloud's HTTP client to handle errors within the client and return the parsed response body from its calls.
Automated Tests
Added a test with
rsconnect deploy manifestusing a manifest for astatic-appmode application. Also added several unit tests forCloudService.prepare_deployto test deploy/redeploy/pre-versioned app store files.Directions for Reviewers
To test this manually, you can use:
rsconnect deploy html \ --account $YOUR_ACCOUNT \ --token $YOUR_TOKEN \ --secret $YOUR_SECRET \ --server 'https://api.staging.posit.cloud' \ 'some_file.html'To test compatibility with pre-versioned app store files,
rsconnect deploy shiny \ --account $YOUR_ACCOUNT \ --token $YOUR_TOKEN \ --secret $YOUR_SECRET \ --server 'https://api.staging.posit.cloud' \ 'my-shiny-app'Checklist