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

Quarto content: after a failed push-button deploy and a successful quarto publish, subsequent push-button publishes fail #1014

Closed
ajmcoqui opened this issue Oct 6, 2023 · 3 comments
Assignees

Comments

@ajmcoqui
Copy link

ajmcoqui commented Oct 6, 2023

I haven't had a chance to reproduce this carefully, but here are the steps by which I got into this situation.

Environment

I'm using a Connect server I've used successfully to publish Rmds and R Shiny apps from Workbench. However, this was the first time I'd created a Quarto document on this server.

Steps to reproduce

  1. Create a Quarto website in Posit Workbench. It doesn't matter what the content of the doc is - at the time, mine contained text but no code yet.
  2. Verify that it renders successfully on Workbench.
  3. I tried first to use push-button publish (with source), but it failed on the Workbench end because I was missing a particular package. At the time, I didn't know that was the case, so I filed a ticket with my IT org and looked for another way to publish Quarto to Connect. I decided to use Quarto directly as a workaround. Crucially, I do not remember if the rsconnect directory was created in my project during my failed attempt - I do not know if that gummed up the works for future attempts.
  4. Decide to use Quarto deploy instead. Verify that quarto is installed on the Workbench server host.
  5. Verify that quarto is set up correctly to publish to Connect. In my case, I had an env var defined for CONNECT_SERVER, and I think it knows my user from previous deployments (I did not have CONNECT_API_KEY defined at the time).
  6. Go to the Terminal in Workbench and run quarto publish connect. This worked, and I saw my content on the Connect server. A _publish.yml file was created in the project as expected.
  7. My content rendered fine on Connect.
  8. In the meantime, my IT org told me why the original push-button deploy failed - I installed the package and decided to try push-button deploy again. Change something in the Quarto doc in Workbench, and attempt to push-button deploy it (with source) to the same Connect server with the same user/server/content title.

This fails, and I cannot get back to a world where push-button deploy works unless I delete the content from the Connect server manually first (via the UI). Every time I try to use push-button deploy again, it fails. I tried deleting the rsconnect directory in the project, and I still have the same problem. The issue appears to be on the Connect side, not the project in Workbench.

I don't have the error copied somewhere (again, I'll try to repro this again), but it was essentially a request to disambiguate by setting user and/or server. However, user and server were set. My guess is that there are multiple copies of the content with the same user/server/content title, and Connect can't tell that they're supposed to be the same project, so it can't tell which to update.

In addition to getting you more info by repro'ing, I'll also try a test where I change the content title in the push-button publish flow to see if it works then.

@ajmcoqui ajmcoqui changed the title Quarto content: after using quarto publish, subsequent push-button publishes fail Quarto content: after a failed push-button deploy and a successful quarto publish, subsequent push-button publishes fail Oct 6, 2023
@aronatkins aronatkins self-assigned this Oct 13, 2023
@aronatkins
Copy link
Contributor

@ajmcoqui While trying to recreate your scenario, I discovered #1017. That might be related (we were incorrectly creating multiple deployment records for Quarto content).

As a consequence of that problem, the IDE would display multiple target deployments in the publishing drop-down and, in turn, prevents repeated publishing.

I've split #1017 into a different tracking issue because I could narrowly describe that problem and recreate it easily. It might be the entire root cause to your struggles, but I'm keeping this issue separate until we know for sure.

@aronatkins
Copy link
Contributor

@ajmcoqui Would you mind re-testing with the current development version of rsconnect? I've merged a fix #1017, which may resolve your publishing trouble, too.

remotes::install_github("rstudio/rsconnect")

One note, however: Your existing deployment record is not going to work. You will need to remove it before re-testing.

# restart the RStudio IDE to make sure it is no longer tracking state after taking this action.
rsconnect::forgetDeployment()

@aronatkins
Copy link
Contributor

Closing this as resolved by #1018, but please re-open if you still see problems deploying content.

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

No branches or pull requests

2 participants