Skip to content

Better exception handling when future package is not available on worker #216

Closed

Description

@HenrikBengtsson

When the future package is not available for a worker, e.g. when it's not installed on the worker machine, we get a non-informative error message:

Internal error: Unexpected result retrieved for ClusterFuture future (‘<none>’): ‘NA’

as reported in Issue #215.

It should be possible to detect this and improve the error message to something like:

Internal error: Unexpected result retrieved for ClusterFuture future (‘<none>’): Error in loadNamespace(name) : there is no package called 'future'

The main reason for this not happening now is that the internal code assumes that the future package is available, cf. https://github.com/HenrikBengtsson/future/blob/master/R/Future-class.R#L482-L629 (in several places).

Activity

  1. added this to the Next release milestone on Apr 23, 2018
  2. HenrikBengtsson commented on Apr 24, 2018

    @HenrikBengtsson
    CollaboratorAuthor

    Check also for sufficient version of the future package on worker, cf. Issue #214.

  3. HenrikBengtsson commented on Apr 27, 2018

    @HenrikBengtsson
    CollaboratorAuthor

    Forgot to post he following last night; when the future package is not available on the worker (or is too old or other unforeseeable errors occur), the next release will produce something like this:

    Error: Initialization of plan() failed, because the test future used for validation failed.
    The reason was: Unexpected result (of class 'snow-try-error' != 'FutureResult') retrieved
    for ClusterFuture future (label = '<none>', expression = 'NA'): Package 'future' is not 
    installed on worker (r_version: 3.4.4 (2018-03-15); platform: x86_64-pc-linux-gnu (64-bit); 
    os: Linux 4.4.0-122-generic #146-Ubuntu SMP Mon Apr 23 15:34:04 UTC 2018; hostname: hb-x1)

    The message is quite convoluted, but good enough for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions