fix user
This commit is contained in:
parent
4400d300a5
commit
5e43c25acf
4 changed files with 24 additions and 24 deletions
|
|
@ -9,62 +9,62 @@ depends_on:
|
|||
matrix:
|
||||
include:
|
||||
- PLATFORM: redhat-9
|
||||
BLOCK: 1:length(pkgs)
|
||||
BLOCK: 72:length(pkgs)
|
||||
ARCH: arm64
|
||||
NCPUS: 2
|
||||
MEMORY: 29Gi
|
||||
STRATEGY: multisession
|
||||
- PLATFORM: redhat-8
|
||||
BLOCK: 1:length(pkgs)
|
||||
BLOCK: 105:length(pkgs)
|
||||
ARCH: arm64
|
||||
NCPUS: 2
|
||||
MEMORY: 29Gi
|
||||
STRATEGY: multisession
|
||||
- PLATFORM: ubuntu-2404
|
||||
BLOCK: 1:length(pkgs)
|
||||
BLOCK: 17:length(pkgs)
|
||||
ARCH: arm64
|
||||
NCPUS: 2
|
||||
MEMORY: 29Gi
|
||||
STRATEGY: multisession
|
||||
- PLATFORM: ubuntu-2204
|
||||
BLOCK: 1:length(pkgs)
|
||||
BLOCK: 87:length(pkgs)
|
||||
ARCH: arm64
|
||||
NCPUS: 2
|
||||
MEMORY: 29Gi
|
||||
STRATEGY: multisession
|
||||
- PLATFORM: alpine-320
|
||||
BLOCK: 1:length(pkgs)
|
||||
BLOCK: 139:length(pkgs)
|
||||
ARCH: arm64
|
||||
NCPUS: 2
|
||||
MEMORY: 29Gi
|
||||
STRATEGY: multisession
|
||||
### AMD
|
||||
# ### AMD
|
||||
- PLATFORM: redhat-9
|
||||
BLOCK: 1:length(pkgs)
|
||||
BLOCK: 157:length(pkgs)
|
||||
ARCH: amd64
|
||||
NCPUS: 2
|
||||
MEMORY: 29Gi
|
||||
STRATEGY: multisession
|
||||
- PLATFORM: redhat-8
|
||||
BLOCK: 1:length(pkgs)
|
||||
BLOCK: 156:length(pkgs)
|
||||
ARCH: amd64
|
||||
NCPUS: 2
|
||||
MEMORY: 29Gi
|
||||
STRATEGY: multisession
|
||||
- PLATFORM: ubuntu-2404
|
||||
BLOCK: 1:length(pkgs)
|
||||
BLOCK: 77:length(pkgs)
|
||||
ARCH: amd64
|
||||
NCPUS: 2
|
||||
MEMORY: 29Gi
|
||||
STRATEGY: multisession
|
||||
- PLATFORM: ubuntu-2204
|
||||
BLOCK: 1:length(pkgs)
|
||||
BLOCK: 174:length(pkgs)
|
||||
ARCH: amd64
|
||||
NCPUS: 2
|
||||
MEMORY: 29Gi
|
||||
STRATEGY: multisession
|
||||
- PLATFORM: alpine-320
|
||||
BLOCK: 1:length(pkgs)
|
||||
BLOCK: 138:length(pkgs)
|
||||
ARCH: amd64
|
||||
NCPUS: 2
|
||||
MEMORY: 29Gi
|
||||
|
|
|
|||
2
R/db.R
2
R/db.R
|
|
@ -4,7 +4,7 @@
|
|||
dbcon <- function() {
|
||||
DBI::dbConnect(RPostgres::Postgres(),
|
||||
dbname = "build_metadata", host = "r-binaries.devxy.io",
|
||||
port = 15432, user = "arm_binaries", password = Sys.getenv("PGPASS")
|
||||
port = 15432, user = "r_binaries", password = Sys.getenv("PGPASS")
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@ store_build_metadata <- function(
|
|||
force = FALSE, error = NA, build_duration = NA, size = NA) {
|
||||
con <- DBI::dbConnect(RPostgres::Postgres(),
|
||||
dbname = "build_metadata", host = "r-binaries.devxy.io",
|
||||
port = 15432, user = "arm_binaries", password = Sys.getenv("PGPASS")
|
||||
port = 15432, user = "r_binaries", password = Sys.getenv("PGPASS")
|
||||
)
|
||||
|
||||
# Check if an entry with the same package_name and tag already exists
|
||||
existing_entries <- dbGetQuery(con, paste0(
|
||||
"SELECT * FROM single_builds WHERE package_name = '",
|
||||
"SELECT * FROM single_builds WHERE name = '",
|
||||
package_name, "' AND tag = '", tag, "' AND platform = '", platform, "'"
|
||||
))
|
||||
|
||||
|
|
@ -19,21 +19,21 @@ store_build_metadata <- function(
|
|||
} else if (nrow(existing_entries) >= 1 && force) {
|
||||
cli::cli_alert_info("{.fun store_build_metadata}: Force overwriting build metadata for {.pkg {package_name}} {.field {tag}} ({platform}) because {.code force = TRUE} was set.")
|
||||
|
||||
DBI::dbExecute(con, "UPDATE single_builds SET build_timestamp = $1, error_occurred = $2, error = $3, build_duration = $4, size = $5 WHERE package_name = $6 and tag = $7 and platform = $8",
|
||||
DBI::dbExecute(con, "UPDATE single_builds SET timestamp = $1, error_occurred = $2, error_text = $3, duration = $4, size = $5 WHERE name = $6 and tag = $7 and platform = $8",
|
||||
params = list(format(Sys.time(), "%Y-%m-%d %H:%M:%S"), error_occurred, error, build_duration, size, package_name, tag, platform)
|
||||
)
|
||||
} else if (nrow(existing_entries) == 0) {
|
||||
cli::cli_alert("{.fun store_build_metadata}: Storing build metadata for {.pkg {package_name}} {.field {tag}}.")
|
||||
# if no entry exists already, we can insert the info via dbWriteTable by passing a DF
|
||||
metadata <- data.frame(
|
||||
package_name = package_name,
|
||||
name = package_name,
|
||||
tag = tag,
|
||||
platform = platform,
|
||||
error_occurred = error_occurred,
|
||||
error = error,
|
||||
build_timestamp = format(Sys.time(), "%Y-%m-%d %H:%M:%S"),
|
||||
build_duration = build_duration,
|
||||
size = size
|
||||
error_text = error,
|
||||
size = size,
|
||||
timestamp = format(Sys.time(), "%Y-%m-%d %H:%M:%S"),
|
||||
duration = build_duration
|
||||
)
|
||||
# Write the data frame to the SQLite database
|
||||
dbWriteTable(con, "single_builds", metadata, append = TRUE)
|
||||
|
|
@ -48,11 +48,11 @@ store_build_metadata <- function(
|
|||
build_metadata_summary <- function(package_name, platform) {
|
||||
con <- DBI::dbConnect(RPostgres::Postgres(),
|
||||
dbname = "build_metadata", host = "r-binaries.devxy.io",
|
||||
port = 15432, user = "arm_binaries", password = Sys.getenv("PGPASS")
|
||||
port = 15432, user = "r_binaries", password = Sys.getenv("PGPASS")
|
||||
)
|
||||
|
||||
metadata <- dbGetQuery(con, sprintf(
|
||||
"SELECT * FROM single_builds WHERE package_name = '%s' AND platform = '%s'", package_name, platform
|
||||
"SELECT * FROM single_builds WHERE name = '%s' AND platform = '%s'", package_name, platform
|
||||
))
|
||||
|
||||
cli::cli_alert("{.fun build_binary_package}: Building/updating metadata summary for {.pkg {package_name[[1]]}}.")
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
query_metadata_table <- function(table = "single_builds") {
|
||||
con <- DBI::dbConnect(RPostgres::Postgres(),
|
||||
dbname = "build_metadata", host = "r-binaries.devxy.io",
|
||||
port = 15432, user = "arm_binaries", password = Sys.getenv("PGPASS")
|
||||
port = 15432, user = "r_binaries", password = Sys.getenv("PGPASS")
|
||||
)
|
||||
metadata <- tbl(con, table)
|
||||
return(metadata)
|
||||
|
|
@ -18,7 +18,7 @@ query_metadata_table <- function(table = "single_builds") {
|
|||
list_metadata_tables <- function() {
|
||||
con <- DBI::dbConnect(RPostgres::Postgres(),
|
||||
dbname = "build_metadata", host = "r-binaries.devxy.io",
|
||||
port = 15432, user = "arm_binaries", password = Sys.getenv("PGPASS")
|
||||
port = 15432, user = "r_binaries", password = Sys.getenv("PGPASS")
|
||||
)
|
||||
dbListTables(con)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue