Closed eteitelbaum closed 2 years ago
Thanks for report! It looks like the setup steps for library(googlePubSubR) should also be set which I missed as it's a one time thing you do. I'll look to add docs and update script to help with it.
This should be fixed now, but needs testing
Hi @MarkEdmondson1234 - I had the same error today as @eteitelbaum when trying to run cr_setup_test(). Everything was successful right up until the creating PubSub topic point.
Thanks for the tip above, as running library(googlePubSubR) gave me the below information:
library(googlePubsubR) ! GCP_PROJECT environment not found, please set it up before starting! ! googlePubsubR: GCP_AUTH_FILE environment variable not found, please set it up before authenticating
From there, i checked the https://cran.r-project.org/web/packages/googlePubsubR/googlePubsubR.pdf documentation and ran the ps_project_set() function (but with project id specified) in my RStudio session to set GCP projectID, then re-ran cr_setup_test(), and the setup finished successfully. @eteitelbaum I hope that helps a little.
Thanks for report, did the error still occur with GitHub version or were you on CRAN version? It should be fixed in the former.
I was on CRAN version using RStudio.
Ok cool, if you install the GitHub version this should be fixed (remotes::install_github("MarkEdmondson1234/googleCloudRunner")
)
I was able to configure
googleCloudRunner
and get everything working except for the last test (Cloud Scheduler - R script) where I get this error message:-- Testing scheduling R script deployments via cr_deploy_r(schedule = ' *') --
i 2022-03-25 13:29:33 > Deploy R script cr_rscript_2022031648229373132933 to Cloud Build i 2022-03-25 13:29:33 > Scheduling R script on cron schedule: * i 2022-03-25 13:29:33 > Creating PubSub topic: cr_rscript_2022031648229373132933-topic Error: Could not create topic:cr_rscript_2022031648229373132933-topicNo projectId set - use ps_project_set() or set GCP_PROJECT env var
Here is my session info:
Session info ----------------------------------------------------------------------------- setting value version R version 4.1.2 (2021-11-01) os Windows 10 x64 (build 19044) system x86_64, mingw32 ui RStudio language (EN) collate English_United States.1252 ctype English_United States.1252 tz America/New_York date 2022-03-25 rstudio 2021.09.2+382 Ghost Orchid (desktop) pandoc NA
Packages --------------------------------------------------------------------------------- package version date (UTC) lib source askpass 1.1 2019-01-13 [1] CRAN (R 4.1.2) assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.1.2) cachem 1.0.6 2021-08-19 [1] CRAN (R 4.1.2) cli 3.1.0 2021-10-27 [1] CRAN (R 4.1.2) colorspace 2.0-2 2021-06-24 [1] CRAN (R 4.1.2) crayon 1.4.2 2021-10-29 [1] CRAN (R 4.1.2) curl 4.3.2 2021-06-23 [1] CRAN (R 4.1.2) data.table 1.14.2 2021-09-27 [1] CRAN (R 4.1.2) DBI 1.1.2 2021-12-20 [1] CRAN (R 4.1.2) digest 0.6.29 2021-12-01 [1] CRAN (R 4.1.2) dplyr 1.0.7 2021-06-18 [1] CRAN (R 4.1.2) ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.1.2) fansi 1.0.2 2022-01-14 [1] CRAN (R 4.1.2) fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.1.2) fs 1.5.2 2021-12-08 [1] CRAN (R 4.1.2) gargle 1.2.0 2021-07-02 [1] CRAN (R 4.1.2) generics 0.1.1 2021-10-25 [1] CRAN (R 4.1.2) ggplot2 3.3.5 2021-06-25 [1] CRAN (R 4.1.2) glue 1.6.0 2021-12-17 [1] CRAN (R 4.1.2) googleAuthR 2.0.0 2022-01-28 [1] CRAN (R 4.1.3) googleCloudRunner 0.5.0 2022-02-28 [1] CRAN (R 4.1.3) googleCloudStorageR 0.7.0 2021-12-16 [1] CRAN (R 4.1.3) googlePubsubR 0.0.3 2022-01-16 [1] CRAN (R 4.1.3) gtable 0.3.0 2019-03-25 [1] CRAN (R 4.1.2) htmltools 0.5.2 2021-08-25 [1] CRAN (R 4.1.2) htmlwidgets 1.5.4 2021-09-08 [1] CRAN (R 4.1.3) httr 1.4.2 2020-07-20 [1] CRAN (R 4.1.2) jose 1.2.0 2021-11-06 [1] CRAN (R 4.1.3) jsonlite 1.7.3 2022-01-17 [1] CRAN (R 4.1.2) lazyeval 0.2.2 2019-03-15 [1] CRAN (R 4.1.2) lifecycle 1.0.1 2021-09-24 [1] CRAN (R 4.1.2) magrittr 2.0.1 2020-11-17 [1] CRAN (R 4.1.2) memoise 2.0.1 2021-11-26 [1] CRAN (R 4.1.2) munsell 0.5.0 2018-06-12 [1] CRAN (R 4.1.2) openssl 1.4.6 2021-12-19 [1] CRAN (R 4.1.2) pillar 1.6.4 2021-10-18 [1] CRAN (R 4.1.2) pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.1.2) plotly 4.10.0 2021-10-09 [1] CRAN (R 4.1.2) purrr 0.3.4 2020-04-17 [1] CRAN (R 4.1.2) R6 2.5.1 2021-08-19 [1] CRAN (R 4.1.2) rappdirs 0.3.3 2021-01-31 [1] CRAN (R 4.1.2) rlang 0.4.12 2021-10-18 [1] CRAN (R 4.1.2) rstudioapi 0.13 2020-11-12 [1] CRAN (R 4.1.2) scales 1.1.1 2020-05-11 [1] CRAN (R 4.1.2) sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.1.2) tibble 3.1.6 2021-11-07 [1] CRAN (R 4.1.2) tidyr 1.1.4 2021-09-27 [1] CRAN (R 4.1.2) tidyselect 1.1.1 2021-04-30 [1] CRAN (R 4.1.2) utf8 1.2.2 2021-07-24 [1] CRAN (R 4.1.2) vctrs 0.3.8 2021-04-29 [1] CRAN (R 4.1.2) viridisLite 0.4.0 2021-04-13 [1] CRAN (R 4.1.2) withr 2.4.3 2021-11-30 [1] CRAN (R 4.1.2) yaml 2.2.1 2020-02-01 [1] CRAN (R 4.1.1) zip 2.2.0 2021-05-31 [1] CRAN (R 4.1.2)