posit-dev / publisher

MIT License
5 stars 0 forks source link

Redeploying in VSCode in the Details Logs view results in a Fatal Error on deployment completion #878

Closed kgartland-rstudio closed 9 months ago

kgartland-rstudio commented 9 months ago

In VSCode if you go to Redeploy content and visit the View summarized deployment logs page, the deployment will succeed but the UI will throw a fatal error.

https://github.com/posit-dev/publisher/assets/41300090/5b3f01fe-f706-47f7-b8e3-ea4a64b08112

dotNomad commented 9 months ago

Looking into this the server consistently gives us a 404 when we try to fetch the Deployment after success (and maybe failure too?). I'm unsure why it is so consistent in VSCode and doesn't happen in the web.

sagerb commented 9 months ago

@kgartland-rstudio I was unable to reproduce this, using the latest code on main.

https://github.com/posit-dev/publisher/assets/17675905/bad482cf-9abd-4868-a588-23a5878ae55c

dotNomad commented 9 months ago

Confirmed that I was unable to reproduce off of main. I'm not sure what changed, but I wasn't able to get this to occur again. Going to close this up, put it in the QA column, and if we can reproduce we can re-open it.

kgartland-rstudio commented 9 months ago

Reopening. I can still reproduce. Maybe I'm doing something wrong. To ensure I have the right plugin I'm doing this: just to get a fresh publisher client just package to get a fresh vscode extension

to ensure i'm not hitting a stale extension, i completely uninstall the posit publisher plugin and reload Screenshot 2024-01-29 at 11 39 53 AM

then I manually install the plugin from packages Screenshot 2024-01-29 at 11 41 59 AM

Then I open the folder test/sample-content/fastapi-simple/ Click the publisher icon > New Deployment > Continue to Deploy > Deploy > View Summarized Deployment Logs

https://github.com/posit-dev/publisher/assets/41300090/c7592ecd-732e-4ed8-8b70-f88d70561f61

Terminal logs from VSCode:

-> /Users/kgartland/.vscode/extensions/posit.publisher-0.0.0/bin/publisher ui -v --listen=localhost:60639 /Users/kgartland/work/publishing-client/test/sample-content/fastapi-simple
time=2024-01-29T11:43:14.084-05:00 level=INFO msg="Client version" version=1.0.alpha1-289-g61eaa382
time=2024-01-29T11:43:14.084-05:00 level=INFO msg="Development mode" mode=dev
time=2024-01-29T11:43:14.084-05:00 level=INFO msg="Development build" DevelopmentBuild=true
time=2024-01-29T11:43:14.084-05:00 level=INFO msg="Starting PublishUICmd.Run"
time=2024-01-29T11:43:14.084-05:00 level=INFO msg="created event server"
time=2024-01-29T11:43:14.084-05:00 level=INFO msg="created event stream"
time=2024-01-29T11:43:14.084-05:00 level=INFO msg="created SSE logger"
time=2024-01-29T11:43:14.084-05:00 level=INFO msg="created UI service"
time=2024-01-29T11:43:14.086-05:00 level=INFO msg="UI server running" url=http://127.0.0.1:60639/
http://127.0.0.1:60639/
time=2024-01-29T11:43:21.913-05:00 level=INFO msg="Loading rsconnect accounts" path=/Users/kgartland/Library/Preferences/org.R-project.R/R/rsconnect
time=2024-01-29T11:43:21.915-05:00 level=INFO msg="Loading rsconnect-python accounts" path="/Users/kgartland/Library/Application Support/rsconnect-python/servers.json"
time=2024-01-29T11:44:00.024-05:00 level=INFO msg="Loading rsconnect accounts" path=/Users/kgartland/Library/Preferences/org.R-project.R/R/rsconnect
time=2024-01-29T11:44:00.025-05:00 level=INFO msg="Loading rsconnect-python accounts" path="/Users/kgartland/Library/Application Support/rsconnect-python/servers.json"
time=2024-01-29T11:44:01.565-05:00 level=INFO msg="Loading rsconnect accounts" path=/Users/kgartland/Library/Preferences/org.R-project.R/R/rsconnect
time=2024-01-29T11:44:01.566-05:00 level=INFO msg="Loading rsconnect-python accounts" path="/Users/kgartland/Library/Application Support/rsconnect-python/servers.json"
time=2024-01-29T11:44:01.599-05:00 level=INFO msg="Loading rsconnect accounts" path=/Users/kgartland/Library/Preferences/org.R-project.R/R/rsconnect
time=2024-01-29T11:44:01.599-05:00 level=INFO msg="Loading rsconnect-python accounts" path="/Users/kgartland/Library/Application Support/rsconnect-python/servers.json"
time=2024-01-29T11:44:03.034-05:00 level=INFO msg="Loading rsconnect accounts" path=/Users/kgartland/Library/Preferences/org.R-project.R/R/rsconnect
time=2024-01-29T11:44:03.034-05:00 level=INFO msg="Loading rsconnect-python accounts" path="/Users/kgartland/Library/Application Support/rsconnect-python/servers.json"
time=2024-01-29T11:44:03.037-05:00 level=INFO msg="Publishing from directory" local_id=mAod2xIaRL7Y_xim path=/Users/kgartland/work/publishing-client/test/sample-content/fastapi-simple
time=2024-01-29T11:44:03.037-05:00 level=INFO msg="Starting deployment to server" local_id=mAod2xIaRL7Y_xim event_phase=start event_op=publish server=https://rsc.radixu.com
time=2024-01-29T11:44:03.037-05:00 level=INFO msg="Checking configuration against server capabilities" local_id=mAod2xIaRL7Y_xim event_op=publish/checkCapabilities event_phase=start
time=2024-01-29T11:44:03.037-05:00 level=INFO msg="Testing authentication" local_id=mAod2xIaRL7Y_xim event_op=publish/checkCapabilities method="RStudio IDE/rsconnect token+key" url=https://rsc.radixu.com
time=2024-01-29T11:44:03.245-05:00 level=INFO msg="Publishing with credentials" local_id=mAod2xIaRL7Y_xim event_op=publish/checkCapabilities username=kevin.g email=kevin.gartland@posit.co
time=2024-01-29T11:44:03.433-05:00 level=INFO msg="Configuration OK" local_id=mAod2xIaRL7Y_xim event_op=publish/checkCapabilities event_phase=success
time=2024-01-29T11:44:03.434-05:00 level=INFO msg="Creating new deployment" local_id=mAod2xIaRL7Y_xim event_op=publish/createNewDeployment event_phase=start
time=2024-01-29T11:44:03.480-05:00 level=INFO msg="Created deployment" local_id=mAod2xIaRL7Y_xim event_op=publish/createNewDeployment event_phase=success content_id=c690640f-09f0-4368-b357-07da440769d1 save_name=""
time=2024-01-29T11:44:03.481-05:00 level=INFO msg="Preparing files" local_id=mAod2xIaRL7Y_xim event_op=publish/createBundle event_phase=start
time=2024-01-29T11:44:03.481-05:00 level=INFO msg="Creating bundle from directory" local_id=mAod2xIaRL7Y_xim event_op=publish/createBundle source_dir=/Users/kgartland/work/publishing-client/test/sample-content/fastapi-simple
time=2024-01-29T11:44:03.485-05:00 level=INFO msg="Bundle created" local_id=mAod2xIaRL7Y_xim event_op=publish/createBundle files=5 total_bytes=1503
time=2024-01-29T11:44:03.485-05:00 level=INFO msg="Done preparing files" local_id=mAod2xIaRL7Y_xim event_op=publish/createBundle event_phase=success filename=/var/folders/qn/0zx6630d3b15_6jcdyl_20dc0000gp/T/bundle-1058876597.tar.gz
time=2024-01-29T11:44:03.485-05:00 level=INFO msg="Uploading files" local_id=mAod2xIaRL7Y_xim event_op=publish/uploadBundle event_phase=start
time=2024-01-29T11:44:03.618-05:00 level=INFO msg="Done uploading files" local_id=mAod2xIaRL7Y_xim event_op=publish/uploadBundle event_phase=success bundle_id=75889
time=2024-01-29T11:44:03.619-05:00 level=INFO msg="Updating deployment settings" local_id=mAod2xIaRL7Y_xim event_op=publish/createDeployment event_phase=start content_id=c690640f-09f0-4368-b357-07da440769d1 save_name=""
time=2024-01-29T11:44:03.688-05:00 level=INFO msg="Done updating settings" local_id=mAod2xIaRL7Y_xim event_op=publish/createDeployment event_phase=success
time=2024-01-29T11:44:03.688-05:00 level=INFO msg="Activating Deployment" local_id=mAod2xIaRL7Y_xim event_op=publish/deployBundle event_phase=start
time=2024-01-29T11:44:03.722-05:00 level=INFO msg="Activation requested" local_id=mAod2xIaRL7Y_xim event_op=publish/deployBundle event_phase=success
time=2024-01-29T11:44:04.281-05:00 level=INFO msg="Building FastAPI application..." local_id=mAod2xIaRL7Y_xim source=server.log event_phase=start event_op=publish/restorePythonEnv
time=2024-01-29T11:44:04.281-05:00 level=INFO msg="Bundle created with Python version 3.11.6 is compatible with environment Local with Python version 3.11.3 from /opt/python/3.11.3/bin/python3.11 " local_id=mAod2xIaRL7Y_xim source=server.log event_op=publish/restorePythonEnv
time=2024-01-29T11:44:04.281-05:00 level=INFO msg="Bundle requested Python version 3.11.6; using /opt/python/3.11.3/bin/python3.11 which has version 3.11.3" local_id=mAod2xIaRL7Y_xim source=server.log event_op=publish/restorePythonEnv
time=2024-01-29T11:44:04.281-05:00 level=INFO msg="2024/01/29 16:44:03.849781695 [rsc-session] Content GUID: c690640f-09f0-4368-b357-07da440769d1" local_id=mAod2xIaRL7Y_xim source=server.log event_op=publish/restorePythonEnv
time=2024-01-29T11:44:04.281-05:00 level=INFO msg="2024/01/29 16:44:03.849847954 [rsc-session] Content ID: 37462" local_id=mAod2xIaRL7Y_xim source=server.log event_op=publish/restorePythonEnv
time=2024-01-29T11:44:04.281-05:00 level=INFO msg="2024/01/29 16:44:03.849855779 [rsc-session] Bundle ID: 75889" local_id=mAod2xIaRL7Y_xim source=server.log event_op=publish/restorePythonEnv
time=2024-01-29T11:44:04.281-05:00 level=INFO msg="2024/01/29 16:44:03.849860770 [rsc-session] Job Key: PRcF7VfhBCbgBvKj" local_id=mAod2xIaRL7Y_xim source=server.log event_op=publish/restorePythonEnv
time=2024-01-29T11:44:04.281-05:00 level=INFO msg="2024/01/29 16:44:04.039198020 Running on host: dogfood02" local_id=mAod2xIaRL7Y_xim source=server.log event_op=publish/restorePythonEnv
time=2024-01-29T11:44:04.281-05:00 level=INFO msg="2024/01/29 16:44:04.134373866 Linux distribution: Ubuntu 22.04.2 LTS (jammy)" local_id=mAod2xIaRL7Y_xim source=server.log event_op=publish/restorePythonEnv
time=2024-01-29T11:44:04.281-05:00 level=INFO msg="2024/01/29 16:44:04.136231704 Running as user: uid=1031(rstudio-connect) gid=999(rstudio-connect) groups=999(rstudio-connect)" local_id=mAod2xIaRL7Y_xim source=server.log event_op=publish/restorePythonEnv
time=2024-01-29T11:44:04.281-05:00 level=INFO msg="2024/01/29 16:44:04.136242275 Connect version: 2024.02.0-dev+8-g82ee0cc19f" local_id=mAod2xIaRL7Y_xim source=server.log event_op=publish/restorePythonEnv
time=2024-01-29T11:44:04.281-05:00 level=INFO msg="2024/01/29 16:44:04.136267956 LANG: C.UTF-8" local_id=mAod2xIaRL7Y_xim source=server.log event_op=publish/restorePythonEnv
time=2024-01-29T11:44:04.282-05:00 level=INFO msg="2024/01/29 16:44:04.136270940 Working directory: /opt/rstudio-connect/mnt/app" local_id=mAod2xIaRL7Y_xim source=server.log event_op=publish/restorePythonEnv
time=2024-01-29T11:44:04.282-05:00 level=INFO msg="2024/01/29 16:44:04.136278476 Building environment using Python 3.11.3 (main, Jun  4 2023, 22:34:28) [GCC 11.3.0] at /opt/python/3.11.3/bin/python3.11" local_id=mAod2xIaRL7Y_xim source=server.log event_op=publish/restorePythonEnv
time=2024-01-29T11:44:04.282-05:00 level=INFO msg="2024/01/29 16:44:04.150447541 Skipped packages: rsconnect-python==1.17.0" local_id=mAod2xIaRL7Y_xim source=server.log event_op=publish/restorePythonEnv
time=2024-01-29T11:44:04.282-05:00 level=INFO msg="2024/01/29 16:44:04.150463135 Using cached environment: iXTkkYeMsbMWbA0vzPLCmg" local_id=mAod2xIaRL7Y_xim source=server.log event_op=publish/restorePythonEnv
time=2024-01-29T11:44:05.347-05:00 level=INFO msg="2024/01/29 16:44:05.165537291 Packages in the environment: aiofiles==23.2.1, anyio==3.6.2, asgiref==3.6.0, blinker==1.6.2, click==8.1.3, dash==2.9.3, dash-bootstrap-components==1.4.1, dash-core-components==2.0.0, dash-html-components==2.0.0, dash-table==5.0.0, fastapi==0.95.2, Flask==2.3.2, h11==0.14.0, idna==3.4, itsdangerous==2.1.2, Jinja2==3.1.2, MarkupSafe==2.1.2, numpy==1.24.3, packaging==23.1, pandas==2.0.1, plotly==5.14.1, pydantic==1.10.7, PyJWT==2.7.0, python-dateutil==2.8.2, pytz==2023.3, semver==2.13.0, six==1.16.0, sniffio==1.3.0, starlette==0.27.0, tenacity==8.2.2, typing_extensions==4.5.0, tzdata==2023.3, uvicorn==0.22.0, websockets==12.0, Werkzeug==2.3.8, wsproto==1.2.0, " local_id=mAod2xIaRL7Y_xim source=server.log event_op=publish/restorePythonEnv
time=2024-01-29T11:44:05.347-05:00 level=INFO msg="2024/01/29 16:44:05.167265488 Creating lockfile: python/requirements.txt.lock" local_id=mAod2xIaRL7Y_xim source=server.log event_op=publish/restorePythonEnv
time=2024-01-29T11:44:06.415-05:00 level=INFO msg="Completed Python build against Python version: '3.11.3'" local_id=mAod2xIaRL7Y_xim source=server.log event_op=publish/restorePythonEnv
time=2024-01-29T11:44:06.415-05:00 level=INFO msg=Done local_id=mAod2xIaRL7Y_xim source=server.log event_phase=success event_op=publish/restorePythonEnv
time=2024-01-29T11:44:06.415-05:00 level=INFO msg="Launching FastAPI application..." local_id=mAod2xIaRL7Y_xim source=server.log event_phase=start event_op=publish/runContent
time=2024-01-29T11:44:11.209-05:00 level=INFO msg=Done local_id=mAod2xIaRL7Y_xim source=server.log event_phase=success event_op=publish/runContent
time=2024-01-29T11:44:11.209-05:00 level=INFO msg="Validating Deployment" local_id=mAod2xIaRL7Y_xim event_op=publish/validateDeployment event_phase=start
time=2024-01-29T11:44:11.276-05:00 level=INFO msg="Done validating deployment" local_id=mAod2xIaRL7Y_xim event_op=publish/validateDeployment event_phase=success
time=2024-01-29T11:44:11.276-05:00 level=INFO msg="Deployment successful" local_id=mAod2xIaRL7Y_xim event_phase=success event_op=publish dashboardURL=https://rsc.radixu.com/connect/#/apps/c690640f-09f0-4368-b357-07da440769d1 directURL=https://rsc.radixu.com/content/c690640f-09f0-4368-b357-07da440769d1 serverURL=https://rsc.radixu.com contentID=c690640f-09f0-4368-b357-07da440769d1

Dashboard URL:  https://rsc.radixu.com/connect/#/apps/c690640f-09f0-4368-b357-07da440769d1
Direct URL:     https://rsc.radixu.com/content/c690640f-09f0-4368-b357-07da440769d1
kgartland-rstudio commented 9 months ago
bin/darwin/arm64/1.0.alpha1-289-g61eaa382/publisher version
1.0.alpha1-289-g61eaa382

which is the same version as I see in the terminal logs in vscode when using the extension:

-> /Users/kgartland/.vscode/extensions/posit.publisher-0.0.0/bin/publisher ui -v --listen=localhost:60639 /Users/kgartland/work/publishing-client/test/sample-content/fastapi-simple
time=2024-01-29T11:43:14.084-05:00 level=INFO msg="Client version" version=1.0.alpha1-289-g61eaa382
kgartland-rstudio commented 9 months ago

Oh sorry, this looks like a separate issue. Closing and creating a new one...