Skip to content
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

Updating an existing deployment using appName fails #860

Closed
toph-allen opened this issue Jun 20, 2023 · 2 comments · Fixed by #867
Closed

Updating an existing deployment using appName fails #860

toph-allen opened this issue Jun 20, 2023 · 2 comments · Fixed by #867
Assignees

Comments

@toph-allen
Copy link
Contributor

Updating an existing deployment without an rsconnect subdir present fails when selecting the content to update using appName. (Updating using appId seems to work.)

The logs (attached) make it seem like maybe rsconnect is calling Connect's API expecting to get a single result, but is getting multiple results, and is thus passing a vector of URLs to curl instead of a single URL.

The presence of multiple seemingly-identical results might be a Connect bug, or it might be incorrect API usage. (Perhaps the endpoint is returning all matching bundles, rather than all matching content items.)

> rsconnect::deployDoc("index.Rmd", appName = "test-rmds")
ℹ Discovering document dependencies...
✔ Document dependencies discovered
── Preparing for deployment ────────────────────────────────────────────────────────────────────────────────────────
Found multiple accounts.
Which one do you want to use?
1: server: localhost / username: toph
2: server: rsc.radixu.com / username: toph
Selection: 1
Discovered a previously deployed app named "test-rmds", "test-rmds", "test-rmds", "test-rmds", "test-rmds", and
"test-rmds"
(View it at <http://localhost:3939/content/6441c48e-771b-4db6-ab58-fda27a036386/>,
<http://localhost:3939/content/6441c48e-771b-4db6-ab58-fda27a036386/>,
<http://localhost:3939/content/6441c48e-771b-4db6-ab58-fda27a036386/>,
<http://localhost:3939/content/6441c48e-771b-4db6-ab58-fda27a036386/>,
<http://localhost:3939/content/6441c48e-771b-4db6-ab58-fda27a036386/>, and
<http://localhost:3939/content/6441c48e-771b-4db6-ab58-fda27a036386/>)
What do you want to do?
1: Update the existing app.
2: Create a new app with automatically generated name ("test-rmds-1").
3: Abort this deployment and supply a custom `appName`.
Selection: 1
✔ Re-deploying "test-rmds", "test-rmds", "test-rmds", "test-rmds", "test-rmds", and "test-rmds" to "server: localhost / username: toph"
ℹ Looking up application with id 522, 522, 522, 522, 522, and 522...
Error in curl::curl_fetch_memory(url, handle = handle) : 
  Argument 'url' must be string.
@aronatkins
Copy link
Contributor

This is happening because the result from rsconnect::applications() contains repeated entries. We do not appear to be paginating through the result set.

aronatkins added a commit that referenced this issue Jun 21, 2023
aronatkins added a commit that referenced this issue Jun 22, 2023
* paginate through connect application lists

fixes #860

* repeat favored over while(TRUE)
@aronatkins aronatkins self-assigned this Jun 26, 2023
@toph-allen
Copy link
Contributor Author

I verified this fix, marking this issue as done.

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 a pull request may close this issue.

2 participants