beanumber / etl

R package to facilitate ETL operations
127 stars 21 forks source link

dplyr update error? #27

Closed beanumber closed 7 years ago

beanumber commented 7 years ago

This is now sometimes failing its tests, see https://cran.r-project.org/web/checks/check_results_etl.html

Once again there is insufficient information in the check output: the full log contains

  1. Error: etl works (@test-etl.R#93) ------------------------------------------- internal error in RS_DBI_getConnection: corrupt connection handle 1: expect_output(print(etl("mtcars")), "sqlite") at testthat/test-etl.R:93 2: capture_output(object) 3: capture_output_as_vector(code, print) 4: with_sink(temp, withVisible(code)) 5: withVisible(code) 6: print(etl("mtcars")) 7: print.etl(etl("mtcars")) 8: dplyr::bind_rows(summary_dir(attr(x, "raw_dir")), summary_dir(attr(x, "loaddir"))) %>% summarize(N = ~sum(n), size = ~sum(tidyr::extract_numeric(size))) 9: eval(lhs, parent, parent) 10: eval(lhs, parent, parent) 11: dplyr::bind_rows 12: getExportedValue(pkg, name) 13: asNamespace(ns) 14: (function (...) { if (!quiet) { message("Auto-disconnecting ", name, " connection ", "(", paste(con@Id, collapse = ", "), ")") } dbDisconnect(con) })() 15: dbDisconnect(con) 16: dbDisconnect(con) 17: dbIsValid(conn) 18: dbIsValid(conn) 19: .local(dbObj, ...)

This is calling dplyr::db_disconnector at step 14, which says

Creates an environment that disconnects the database when it's

garbage collected

so this is an issue with the lifetime of a dplyr object. I confirmed that it fails all the time with R CMD check --use-gct (but takes hours to do so).

Please investigate and correct.

beanumber commented 7 years ago

This seems to have gone away...will reopen if it re-appears.