rstudio / pins-r

Pin, discover, and share resources
https://pins.rstudio.com
Other
312 stars 63 forks source link

Enhancements to `board_azure` #532

Closed hongooi73 closed 2 years ago

hongooi73 commented 2 years ago

This PR makes the following changes:

Fully implementing the first point was rather messy due to underlying differences in API behaviour, as well as some missing functionality in AzureStor (recursive deleting of non-empty subdirs), but it should all be working now. I'll be backporting the code to AzureStor so in the future we should be able to clean the pins code a bit.

I also changed the board_azure_test function to allow specifying the storage account name in the PINS_AZURE_ACCOUNT env var, so that I could run the tests on my own account. If this var is unset, it defaults to "pins" which is the account currently used for testing.

I haven't added new snapshots for the tests, since I'm using my own storage account. However, the outputs should look like board_azure(AzureStor::storage_container("https://account_url"), path="test/path")

hongooi73 commented 2 years ago

closes #528

hongooi73 commented 2 years ago

Just a sec, found some errors for blobs when hierarchical namespaces is enabled.

hongooi73 commented 2 years ago

Should be ok now....

hadley commented 2 years ago

Thanks!

github-actions[bot] commented 2 years ago

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.