Skip to content

Releases: wlandau/crew

Migrate to mirai 1.0.0

03 Feb 14:14
e28d0c7
Compare
Choose a tag to compare

crew 1.0.0

  • Avoid partial match in a call to crew_terminate_process().
  • Migrate to mirai 2.0.0 with the pair 1 poly protocol (#193). Most notably, all workers now share the same URL instead of having different web sockets for different workers. This gets rid of crew's previous "slotted" model for workers.
  • Prohibit duplicated task names in push(). (The task must be popped first before another task of the same name can be submitted.) This allows controllers to use hash tables to track tasks, which makes push() and pop() orders of magnitude faster. It is also needed for the new retry mechanism based on backup controllers and controller groups.
  • Use exponential backoff in throttles.
  • Share throttles between scale() and wait() to increase responsiveness.
  • Use a unified throttle for controller groups, which requires refactoring wait(mode = "all") for controller groups.
  • Name every task and record every command.
  • Switch URLs from ws:// (and wss://) to tcp:// (and tls+tcp://) (#193).
  • Change R-level error status code to -1 (previously 1).
  • Add a queue class for resolved tasks to make pop() and collect() more efficient. pop() is 64 times faster.
  • For clarity, rename the "launcher" column of the results to "controller".
  • Log crashes and cancellations separately from ordinary errors in summary().

Improved crash detection

15 Nov 15:40
859a9b4
Compare
Choose a tag to compare

crew 0.10.2

  • Eliminate spurious launch_max error from underutilized workers (#189).
  • Deprecate launch_max in favor of crashes_error (#189).
  • Look for crashes of all workers in rotate() instead of looking for crashes of a specific worker in launch() (#189).
  • Add a crashes() launcher method to allow plugins to detect and respond to crashes more easily.
  • Change default seconds_idle to 300.
  • Move autometric to Suggests:.

Resource logging with autometric

11 Oct 16:14
1d21795
Compare
Choose a tag to compare

crew 0.10.0

  • Give full worker name in the worker launch error message (@multimeric).
  • Start the controller automatically in more methods.
  • Add an r_arguments argument to supply command line arguments to R for workers (#175, @rpruim).
  • Add a cancel() controller method to cancel one or more tasks.
  • Call cancel(all = TRUE) from terminate() as a safeguard.
  • Make client$dispatcher a ps::ps_handle() handle and add a new client$client handle for the current process.
  • To passively log memory usage when log_resources is given, the controller now calls log() as a side effect in most controller methods, with throttling to preserve speed.
  • Return a status and status code from pop() etc.
  • New internal function as_monad() makes error reporting more consistent.
  • Use path.expand() on local log files.
  • Switch to Rscript.
  • Print session info from crew_worker() before attempting to dial into mirai.
  • Add asyncdial = FALSE back to mirai::daemon() call.
  • Deprecate local_log_directory and local_log_join in favor of crew_options_local() and the options_local argument.
  • Add crew_options_metrics() and the options_metrics argument for recording resource metrics (#178).
  • Add a new logging.Rmd vignette to explain best practices for logging and resource usage metrics (#178).

CRAN patch

24 Jun 13:33
8ca0208
Compare
Choose a tag to compare

crew 0.9.5

  • CRAN patch.

simplified Shiny/promises docs

20 Jun 18:26
c02449f
Compare
Choose a tag to compare

crew 0.9.4

  • Do not use extended tasks in Shiny vignette.
  • Add a new retry_tasks argument with default TRUE (#170).
  • Avoid Base64 encoding functions from nanonext

Delegate promises

22 May 20:04
82919e1
Compare
Choose a tag to compare

crew 0.9.3

  • Deprecate native crew promises in favor of native event-driven promises in mirai (#162).
  • Update the shiny.Rmd and promises.Rmd vignette to recommend native event-driven mirai promises (#162).

minor patch

24 Apr 14:26
72eaaf4
Compare
Choose a tag to compare

crew 0.9.2

  • Use .args rather than ... in mirai::mirai() to make sure arguments continue to be passed as local variables in mirai >= 0.13.1.9012.
  • Add new controller methods autoscale(), descale(), and started() to facilitate different kinds of Shiny apps.
  • Deprecate the scale and throttle methods of controller$promise(). promise() now always calls autoscale() to make sure one and only one auto-scaling loop is running asynchronously. Auto-scaling thus continues even after the promise resolves.
  • Add a second example vignette that simulates coin flips.
  • Add a new error argument to collect() (#166).

Shiny-related improvements

25 Mar 16:16
6f1b504
Compare
Choose a tag to compare

crew 0.9.1

  • Rewrite the async Shiny vignette with crew promises and Shiny extended tasks (#157, @jcheng5).
  • Clarify the intent of controller$promise(mode = "one") in the vignette on promises (@jcheng5).
  • Implement an error argument in pop() which may help with integration with ExtendedTask (@jcheng5).
  • Handle task errors in the Shiny vignette (@jcheng5).

Promises and backlogged task management for {targets}

07 Feb 13:39
3c8f77d
Compare
Choose a tag to compare

crew 0.9.0

  • Require nanonext >= 0.12.0 and mirai >= 0.12.0.
  • Return to always re-launching backlogged inactive workers (#79, shikokuchuo/mirai#95).
  • Implement push_backlog() and pop_backlog() to manage cases when it is not desirable to push to saturated controllers (ropensci/targets#1220).
  • Invisibly return the mirai object of a task pushed to the controller. This allows users to interact with the task directly, e.g. to create a promise object with promises::as.promise() (#146, @jcheng5).
  • Add a new walk() method for controllers and controller groups to submit tasks in batch and return control immediately without waiting for any task to complete (#148, @jcheng5).
  • Revive the collect() method for popping multiple tasks at once (#148, @jcheng5).
  • Add controller group methods nonempty(), resolved(), unresolved(), and unpopped() to help with #148.
  • Make the mirai dispatcher error message extremely verbose.

Vital safety for workers using SIGTERM

08 Jan 16:17
Compare
Choose a tag to compare
  • Configure workers to send themselves a termination signal if the connection to the dispatcher is broken (#141, @psychelzh). Huge thanks to @shikokuchuo for the support through shikokuchuo/mirai#87, shikokuchuo/mirai#88, and shikokuchuo/nanonext#25! The signal itself is platform-dependent and determined by the new function crew_terminate_signal().
  • Implement crew_monitor_local() to help users monitor and terminate local R processes created by crew and mirai.
  • Implement new utility function crew_terminate_process() to terminate a process manually without resorting to SIGKILL on Windows.
  • Throw a warning from controller$map() if at least one task threw one. warnings = FALSE suppresses this behavior.
  • Set output = TRUE in daemon() so stdout and stderr streams print.
  • Add new arguments local_log_directory and local_log_join to write to local log files.