From 21f57305f87d42e3750a01d0a1c05a4a58f80b0d Mon Sep 17 00:00:00 2001 From: wlandau Date: Mon, 13 Nov 2023 13:16:11 -0500 Subject: [PATCH] Fix #1172 --- DESCRIPTION | 2 +- NEWS.md | 2 +- R/class_gcp.R | 12 +++--------- R/utils_gcp.R | 2 +- tests/gcp/test-class_gcp_qs.R | 4 ++-- 5 files changed, 8 insertions(+), 14 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 5cce4f4ab..8f647ad76 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -12,7 +12,7 @@ Description: Pipeline tools coordinate the pieces of computationally The methodology in this package borrows from GNU 'Make' (2015, ISBN:978-9881443519) and 'drake' (2018, ). -Version: 1.3.2.9002 +Version: 1.3.2.9003 License: MIT + file LICENSE URL: https://docs.ropensci.org/targets/, https://github.com/ropensci/targets BugReports: https://github.com/ropensci/targets/issues diff --git a/NEWS.md b/NEWS.md index 0ed69df58..3ae1e3207 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# targets 1.3.2.9002 (development) +# targets 1.3.2.9003 (development) ## Invalidating changes diff --git a/R/class_gcp.R b/R/class_gcp.R index 8203dd799..31167a358 100644 --- a/R/class_gcp.R +++ b/R/class_gcp.R @@ -213,15 +213,9 @@ store_has_correct_hash.tar_gcp <- function(store) { } store_gcp_hash <- function(store) { - path <- store$file$path - head <- gcp_gcs_head( - key = store_gcp_key(path), - bucket = store_gcp_bucket(path), - version = store_gcp_version(path), - verbose = store$resources$gcp$verbose %|||% FALSE, - max_tries = store$resources$gcp$max_tries %|||% 5L - ) - if_any(is.null(head), NULL, digest_chr64(head$md5)) + tar_runtime$inventories$gcp <- tar_runtime$inventories$gcp %|||% + inventory_gcp_init() + tar_runtime$inventories$gcp$get_cache(store = store) } # nocov end diff --git a/R/utils_gcp.R b/R/utils_gcp.R index a1086b6b9..7daf6d3cb 100644 --- a/R/utils_gcp.R +++ b/R/utils_gcp.R @@ -58,7 +58,7 @@ gcp_gcs_list_md5s <- function( verbose = TRUE, max_tries = NULL ) { - verbose <- verbose %|||% FALSE + verbose <- verbose %|||% TRUE old_try_attempts <- getOption("googleAuthR.tryAttempts") on.exit(options(googleAuthR.tryAttempts = old_try_attempts), add = TRUE) if_any( diff --git a/tests/gcp/test-class_gcp_qs.R b/tests/gcp/test-class_gcp_qs.R index 4d6326677..87f5de81f 100644 --- a/tests/gcp/test-class_gcp_qs.R +++ b/tests/gcp/test-class_gcp_qs.R @@ -434,7 +434,7 @@ tar_test("gcp_qs format versioning", { }) expr <- tar_tidy_eval(expr, environment(), TRUE) eval(as.call(list(`tar_script`, expr, ask = FALSE))) - expect_equal(targets::tar_outdated(callr_function = NULL), character(0)) + expect_equal(targets::tar_outdated(callr_function = NULL), "x") tar_make(callr_function = NULL) - expect_equal(tar_progress(x)$progress, "skipped") + expect_equal(tar_progress(x)$progress, "built") })