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

suppress task output and renv dependency output on logLevel="quiet" #1064

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

aronatkins
Copy link
Contributor

fixes #1051

@aronatkins aronatkins requested review from hadley and toph-allen April 24, 2024 13:56
Copy link
Contributor

@toph-allen toph-allen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh oh, I've looked at the word "quiet" too much and am in full-blown semantic satiation! 😂

@aronatkins aronatkins merged commit 76ffcfe into main Apr 24, 2024
10 checks passed
@aronatkins aronatkins deleted the aron-task-quiet branch April 24, 2024 17:56
@dethmasque
Copy link
Contributor

Without quiet log level:

 setwd("Shiny")
> getwd()
[1] "/Users/dethmasque/Crap/Shiny/Shiny"
> rsconnect::deployApp()
── Preparing for deployment ────────────────────────────────────────────────────────────────
Found multiple accounts.
Which one do you want to use?
1: server: 3.82.126.34 / username: toni
2: server: 3.95.164.248 / username: toni
3: server: 34.201.36.204 / username: toni
4: server: connect.localtest.me / username: admin3
5: server: connect.localtest.me / username: rootUser
6: server: localhost / username: john
7: server: localhost / username: othertoni
8: server: localhost / username: toni
9: server: rsc.radixu.com / username: t0n1
Selection: 9
✔ Deploying "shiny" using "server: rsc.radixu.com / username: t0n1"
ℹ Creating application on server...
✔ Created application with id 45181
ℹ Bundling 1 file: app.R
ℹ Capturing R dependencies with renv
✔ Found 31 dependencies
✔ Created 17,796b bundle
ℹ Uploading bundle...
✔ Uploaded bundle with id 96872
── Deploying to server ─────────────────────────────────────────────────────────────────────
Building Shiny application...
Bundle created with R version 4.2.2 is compatible with environment Local with R version 4.2.3 from /opt/R/4.2.3/bin/R 
Bundle requested R version 4.2.2; using /opt/R/4.2.3/bin/R which has version 4.2.3
Performing manifest.json to packrat transformation.
[rsc-session] Content GUID: cccbc6b5-264a-42e2-a2bb-57462e842a64
[rsc-session] Content ID: 45181
[rsc-session] Bundle ID: 96872
[rsc-session] Job Key: hP80A7WeqQ1ETotJ
Running on host: dogfood02
Linux distribution: Ubuntu 22.04.2 LTS (jammy)
Running as user: uid=1031(rstudio-connect) gid=999(rstudio-connect) groups=999(rstudio-connect)
Connect version: 2024.05.0-dev+14-geb87c92f2e
LANG: C.UTF-8
Working directory: /opt/rstudio-connect/mnt/app
Using R 4.2.3
R.home(): /opt/R/4.2.3/lib/R
Using user agent string: 'RStudio R (4.2.3 x86_64-pc-linux-gnu x86_64 linux-gnu)' 
# Validating R library read / write permissions --------------------------------
Using R library for packrat bootstrap: /opt/rstudio-connect/mnt/R/4.2.3
# Validating managed packrat installation --------------------------------------
Vendored packrat archive: /opt/rstudio-connect/ext/R/packrat_0.9.2.9000_70625806c44bda42a7f3aeaa92ee65542cc590be.tar.gz
Vendored packrat SHA: 70625806c44bda42a7f3aeaa92ee65542cc590be
Managed packrat SHA:  70625806c44bda42a7f3aeaa92ee65542cc590be
Managed packrat version: 0.9.2.9000
Managed packrat is up-to-date.
# Validating packrat cache read / write permissions ----------------------------
Using packrat cache directory: /opt/rstudio-connect/mnt/packrat/4.2.3
# Setting packrat options and preparing lockfile -------------------------------
Audited package hashes with local packrat installation.
# Resolving R package repositories ---------------------------------------------
Received repositories from Connect's configuration:
- CRAN = "https://packagemanager.posit.co/cran/__linux__/jammy/latest"
- RSPM = "https://packagemanager.posit.co/cran/__linux__/jammy/latest"
Received repositories from published content:
- CRAN = "https://cran.rstudio.com"
Combining repositories from configuration and content.
Packages will be installed using the following repositories:
- CRAN = "https://packagemanager.posit.co/cran/__linux__/jammy/latest"
- RSPM = "https://packagemanager.posit.co/cran/__linux__/jammy/latest"
- CRAN.1 = "https://cran.rstudio.com"
# Installing required R packages with `packrat::restore()` ---------------------
Warning in packrat::restore(overwrite.dirty = TRUE, prompt = FALSE, restart = FALSE) :
  The most recent snapshot was generated using R version 4.2.2
Installing R6 (2.5.1) ... 
	OK (symlinked cache)
Installing Rcpp (1.0.9) ... 
	OK (symlinked cache)
Installing base64enc (0.1-3) ... 
	OK (symlinked cache)
Installing cli (3.6.1) ... 
	OK (symlinked cache)
Installing commonmark (1.8.1) ... 
	OK (symlinked cache)
Installing crayon (1.5.2) ... 
	OK (symlinked cache)
Installing digest (0.6.33) ... 
	OK (symlinked cache)
Installing fastmap (1.1.1) ... 
	OK (symlinked cache)
Installing fs (1.5.2) ... 
	OK (symlinked cache)
Installing glue (1.6.2) ... 
	OK (symlinked cache)
Installing jsonlite (1.8.7) ... 
	OK (symlinked cache)
Installing magrittr (2.0.3) ... 
	OK (symlinked cache)
Installing mime (0.12) ... 
	OK (symlinked cache)
Installing rappdirs (0.3.3) ... 
	OK (symlinked cache)
Installing rlang (1.1.1) ... 
	OK (symlinked cache)
Installing sourcetools (0.1.7-1) ... 
	OK (symlinked cache)
Installing withr (2.5.0) ... 
	OK (symlinked cache)
Installing xtable (1.8-4) ... 
	OK (symlinked cache)
Installing cachem (1.0.6) ... 
	OK (symlinked cache)
Installing ellipsis (0.3.2) ... 
	OK (symlinked cache)
Installing htmltools (0.5.8.1) ... 
	OK (symlinked cache)
Installing later (1.3.0) ... 
	OK (symlinked cache)
Installing lifecycle (1.0.3) ... 
	OK (symlinked cache)
Installing memoise (2.0.1) ... 
	OK (symlinked cache)
Installing fontawesome (0.5.0) ... 
	OK (symlinked cache)
Installing jquerylib (0.1.4) ... 
	OK (symlinked cache)
Installing sass (0.4.9) ... 
	OK (symlinked cache)
Installing promises (1.2.0.1) ... 
	OK (symlinked cache)
Installing bslib (0.7.0) ... 
	OK (symlinked cache)
Installing httpuv (1.6.9) ... 
curl: HTTP 200 https://packagemanager.posit.co/cran/__linux__/jammy/latest/src/contrib/PACKAGES.rds
curl: HTTP 200 https://cran.rstudio.com/src/contrib/PACKAGES.rds
curl: HTTP 200 https://rspm-sync.rstudio.com/bin/4.2-jammy/f4bf018d14799ec30207c7f13dbe106e7e57bac0ace97ebf00cf2cf6778bb943.tar.gz
Caching httpuv.
Using cached httpuv.
	OK (downloaded binary)
Installing shiny (1.7.4) ... 
	OK (symlinked cache)
Completed packrat build against R version: '4.2.3'
Launching Shiny application...
── Deployment complete ─────────────────────────────────────────────────────────────────────
✔ Successfully deployed to <https://rsc.radixu.com/content/cccbc6b5-264a-42e2-a2bb-57462e842a64/>

With:

> rsconnect::deployApp(logLevel = "quiet")
>

Interactive prompts are emitted as expected:

 rsconnect::deployApp(logLevel = "quiet")
Failed to find existing application on server; it's probably been deleted.
What do you want to do?
1: Give up and try again later
2: Delete existing deployment & create a new app
Selection: 2
> 

rsconnect::writeManifest(quiet = "true") is silent and generated the manfiest:

setwd("/Users/dethmasque/Crap/Shiny/New_Shiny")
> getwd()
[1] "/Users/dethmasque/Crap/Shiny/New_Shiny"
> rsconnect::writeManifest(quiet = "true")
> 

image

With quiet = "false":

rsconnect::writeManifest(quiet = "false")
ℹ Capturing R dependencies with renv
✔ Found 31 dependencies

All good!

@dethmasque
Copy link
Contributor

Quick question @aronatkins - is the deployment information emitted in the interactive prompt also considered sensitive info in this case? Do we want to suppress the prompts as well (server selection, missing content from prior deploy, maybe more?) and document that folks need to pass in parameters when logLevel = "quiet" / quiet = "true" as opposed to relying on the interactive console prompts?

@aronatkins
Copy link
Contributor Author

@dethmasque - that's a good question about prompts. I'm inclined to keep the prompts for now.

Prompts are disabled for non-interactive sessions, but they trigger errors about the problem.

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 this pull request may close these issues.

Turn off all deployment logs from deployApp
3 participants