From 743639b0385d42969f6226aebb7fbc0a8746fd51 Mon Sep 17 00:00:00 2001 From: Kara Woo Date: Thu, 19 Feb 2026 15:16:09 -0800 Subject: [PATCH 1/2] remove tail parameter --- R/client-shinyapps.R | 2 +- tests/testthat/test-client.R | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/R/client-shinyapps.R b/R/client-shinyapps.R index a54a75161..b4380f6e2 100644 --- a/R/client-shinyapps.R +++ b/R/client-shinyapps.R @@ -132,7 +132,7 @@ shinyAppsClient <- function(service, authInfo) { getLogs = function(applicationId, entries = 50, format = NULL) { path <- paste0("/applications/", applicationId, "/logs") - query <- paste0("count=", entries, "&tail=0") + query <- paste0("count=", entries) if (!is.null(format)) { # format=json returns a structured response. query <- paste0(query, "&format=", format) diff --git a/tests/testthat/test-client.R b/tests/testthat/test-client.R index 5d9d6390e..037453298 100644 --- a/tests/testthat/test-client.R +++ b/tests/testthat/test-client.R @@ -10,6 +10,31 @@ test_that("connect cloud accounts create connect cloud clients", { expect_equal(client$service(), "connect.posit.cloud") }) +test_that("shinyapps getLogs does not include tail in query", { + captured_query <- NULL + local_mocked_bindings( + GET = function(service, authInfo, path, query = NULL, ...) { + captured_query <<- query + "fake log output" + } + ) + + client <- shinyAppsClient(service = list(), authInfo = list()) + client$getLogs("12345") + cat(captured_query) + expect_no_match(captured_query, "tail") + expect_match(captured_query, "count=50") + + client$getLogs("12345", entries = 100) + expect_no_match(captured_query, "tail") + expect_match(captured_query, "count=100") + + client$getLogs("12345", format = "json") + expect_no_match(captured_query, "tail") + expect_match(captured_query, "count=50") + expect_match(captured_query, "format=json") +}) + test_that("connect accounts create connect clients", { local_temp_config() From 77e0188e8401381b24328bff592247c02c1bbf8c Mon Sep 17 00:00:00 2001 From: Kara Woo Date: Thu, 19 Feb 2026 15:26:04 -0800 Subject: [PATCH 2/2] news --- NEWS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS.md b/NEWS.md index 5eaab6675..a02ce35b3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -35,6 +35,9 @@ will consider reintroduction of log streaming via rsconnect in Connect Cloud. (#1292) +* Updated non-streaming log retrieval to maintain compatibility with updates to + shinyapps.io's API. (#1294) + # rsconnect 1.7.0 * Added support for deploying from `manifest.json` files created by