Skip to content

Commit

Permalink
fix: Remove experimental feature usage
Browse files Browse the repository at this point in the history
  • Loading branch information
csgillespie committed Jul 24, 2024
1 parent c7e4155 commit a7fcb4a
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 15 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Type: Package
Package: audit.connect
Title: Posit Connect Health Check
Version: 0.7.5
Version: 0.7.6
Authors@R:
person("Jumping", "Rivers", , "[email protected]", role = c("aut", "cre"))
Description: Posit Connect Health Check. Deploys various content types to
assess whether Connect is functioning correctly.
License: file LICENSE
Imports:
Imports:
audit.base (>= 0.6.15),
cli,
connectapi (>= 0.2.0),
Expand Down
10 changes: 6 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# audit.connect 0.7.5 _2024-07-24_
- fix: Remove feature usage - experimental API no longer works
# audit.connect 0.7.5 _2024-06-10_
- fix: Use latest version of {connactapi}
- chore: Fix Rd warnings due to R4.4
- fix: #15

# audit.connect 0.7.4 _2024-04-04_
- feat: Force `server` to have `http(?s)`
- feat: Improved error message when testing status response

# audit.connect 0.7.3 _2024-03-27_
- fix: Remove additional / from user api call

# audit.connect 0.7.2 _2024-01-24_
- fix: If NA, return 0 locked apps

Expand All @@ -22,7 +24,7 @@

# audit.connect 0.6.4 _2023-10-01_
- feat: Check for Posit name leakage

# audit.connect 0.6.3 _2023-09-23_
- feat: Be less picky with server URLs
- fix: Deploy multiple files
Expand All @@ -41,7 +43,7 @@
- fix: Typo in report.qmd

# audit.connect 0.5.1 _2023-06-24_
- feat: Remove API keys from app call. Don't need; don't want them.
- feat: Remove API keys from app call. Don't need; don't want them.

# audit.connect 0.5.0 _2023-06-11_
- refactor: Move standard functions to audit.base
Expand Down
2 changes: 1 addition & 1 deletion R/check.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ check = function(server = NULL, token = NULL,
check_list$sys_deps = check_sys_deps(debug_level = debug_level)
check_list$versions = summarise_versions(get_server(), get_token())

check_list$feature_usage = summarise_feature_usage(get_server(), get_token())
# check_list$feature_usage = summarise_feature_usage(get_server(), get_token())
check_list$audit_details = audit_details(get_server(), get_token())
check_list$users_details = summarise_users(get_server(), get_token(), debug_level = debug_level)
register_uat_user(get_server(), get_token(), account = get_account())
Expand Down
4 changes: 2 additions & 2 deletions R/sanitise.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Sanitise {audit.connect} object
#' Sanitise audit.connect object
#'
#' This function removes user-identifying data from an audit.connect object
#' @param audit_connect_check An object from audit.connect::check()
#' @param audit_connect_check An object from `audit.connect::check()`
#' @export
sanitise = function(audit_connect_check) {
# Wipe any user-identifiable data
Expand Down
3 changes: 3 additions & 0 deletions R/summarise_feat_usage.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 2024/07/24:
# Used the experimental feature Connect. No longer seems to work.
# Leaving function here in case it comes back
summarise_feature_usage = function(server, token) {
cli::cli_h2("Checking Feature Usage")
connect = suppressMessages(connectapi::connect(server = server, api_key = token))
Expand Down
6 changes: 3 additions & 3 deletions R/summarise_users.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ print_audit_user_apps = function(client, debug_level) {
locked_users = suppress(connectapi::get_users(client)) |>
dplyr::filter(.data$locked)
locked_content = dplyr::inner_join(content, locked_users,
by = dplyr::join_by(owner_guid == guid)) |>
dplyr::group_by(username) |>
by = dplyr::join_by("owner_guid" == "guid")) |>
dplyr::group_by(.data$username) |>
dplyr::summarise(n = dplyr::n()) |>
dplyr::arrange(dplyr::desc(n))
dplyr::arrange(dplyr::desc(.data$n))

cli::cli_alert_info("{sum(locked_content$n)} applications owned by locked users")

Expand Down
4 changes: 2 additions & 2 deletions man/sanitise.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/testthat/test-check.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ test_that("High level test", {
rtn = suppressMessages(check())

expect_true(is.list(rtn))
check_names = c("setup", "posit_version", "server_headers", "feature_usage",
check_names = c("setup", "posit_version", "server_headers",
"audit_details", "users_details", "versions", "sys_deps", "results") %in%
names(rtn)
expect_true(all(check_names))
Expand Down

0 comments on commit a7fcb4a

Please sign in to comment.