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

Behavior when both appname and appid is specified? #1019

Closed
soetang opened this issue Oct 16, 2023 · 3 comments · Fixed by #1021
Closed

Behavior when both appname and appid is specified? #1019

soetang opened this issue Oct 16, 2023 · 3 comments · Fixed by #1021

Comments

@soetang
Copy link

soetang commented Oct 16, 2023

We have had problems understanding why our deployment pipelines sometimes created new apps even if the app already exists on Posit connect. Turns out that if you specify both appName and appId it seems like the appId is ignored if the user is not the current owner of the "old" application.

This seems to be the opposite of the documentation for appid (https://rstudio.github.io/rsconnect/reference/deployApp.html):
´Use this to deploy to an exact known application, ignoring all existing deployment records and appName.´

Dont know if this a bug or the documentation needs an update. Ideally i would also like a warning if both are specified so that, we are made aware of the behavior chosen.

Removing appname as an parameter for deployApp solved the problem for us, but others might be dealing with the same issues.

I suspect the issue comes from the call to appDeployments in R/deploymentTarget.R. Where providing the account for the accountFilter is the cause of the issue. (I am not familiar with the codebase so might be wrong here).

 appDeployments <- deployments(
    appPath = recordPath,
    nameFilter = appName,
    accountFilter = account,
    serverFilter = server
  )
@soetang
Copy link
Author

soetang commented Oct 16, 2023

I would be happy to make a pull request if needed? Just want to clarify if I am correct first?

@aronatkins
Copy link
Contributor

There are a number of issues tracking issues with re-deployment (especially by collaborators), including #1007.

I believe that appId should override appName as mentioned in the documentation, but will make sure that this is indeed the case as we resolve these related issues.

@aronatkins
Copy link
Contributor

The development version of rsconnect uses appId as the primary way to identify existing content; could you test that redeployment targets the correct application in your environment?

remotes::install_github("rstudio/rsconnect")

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