Closed fh-mthomson closed 8 months ago
@DyfanJones I don't know enough about the use case for this cache functionality to test in depth, but I was able to confirm:
devtools::install_github("fh-mthomson/paws/paws.common@mthomson/os_env_vars")
package:paws.common
looks ~similar across branchesBefore (Mac):
After (Mac):
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
33de2e8
) 85.18% compared to head (1b44ae5
) 85.32%.:exclamation: Current head 1b44ae5 differs from pull request most recent head 13007dc. Consider uploading reports for the commit 13007dc to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@fh-mthomson can you check if this installs correctly please :)
remotes::install_github("fh-mthomson/paws/paws.common@mthomson/os_env_vars", force = T)
Also when you have initialised paws.common
can you check the environmental cache to make sure it is picking it up as expected :)
Here is an example of me assigning "AWS_DUMMY" to an environmental variable:
library(paws.common)
paws.common:::os_env_cache |> as.list()
#> $AWS_DUMMY
#> [1] "Hello World"
Confirmed! Adding AWS_TEST
to my ~/.Renvirion
then reloading:
> library(paws.common)
>
> paws.common:::os_env_cache |> as.list()
$AWS_TEST
[1] "yes"
Then, if I run a command to initialize temporary AWS creds, I see these as well:
> detach("package:paws.storage", unload = TRUE)
> detach("package:paws.common", unload = TRUE)
> library(paws.common)
> paws.common:::os_env_cache |> as.list() %>% names()
[1] "AWS_CREDENTIAL_EXPIRATION" "AWS_TEST" "AWS_ACCESS_KEY_ID" "AWS_SESSION_TOKEN"
[5] "AWS_SECRET_ACCESS_KEY"
I will release this in the next couple of days as it is stopping people from installing paws.common
on linux (which is not good :P)
Thank you for your quick resolution, as always @DyfanJones !
Closes #706
Introduced in https://github.com/paws-r/paws/pull/693