Permalink
Commits on Oct 18, 2018
  1. Merge pull request #309 from kyleam/enh-known-resource-err

    yarikoptic committed Oct 18, 2018
    ENH: Don't list resources if loading a known resource fails
  2. Merge pull request #302 from kyleam/enh-backend-cmd

    yarikoptic committed Oct 18, 2018
    List backend parameters with command rather than as unformatted block
  3. resource: Add another layer of exception catching

    kyleam committed Oct 18, 2018
  4. ENH: Add 'backend-parameters' command

    kyleam committed Sep 17, 2018
    Use a separate command to list the parameters to avoid the long
    unformatted block of parameters in 'niceman create --help's output.
    
    Fixes #284.
  5. RF: create: Rename --backend to --backend-parameters

    kyleam committed Sep 17, 2018
    It's confusing to show these as "--backend BACKEND [BACKEND ...]"
    because they are parameters for the backend rather than backends
    themselves.  The clearer --backend-parameters is unwieldy, but that
    doesn't really matter since there's a short option, '-b'.
  6. Merge pull request #311 from mjtravers/bf-singularity-id

    yarikoptic committed Oct 18, 2018
    BF: Fixed issues with creating a singularity resource
  7. BF: fixed singularity test and added clear message to exec fails

    mjtravers committed Oct 18, 2018
  8. Merge pull request #304 from kyleam/enh-get-default-dest

    kyleam committed Oct 18, 2018
     ENH: resources: Teach get/put to infer destination basename
  9. Merge pull request #306 from kyleam/tst-cleanup-singularity

    kyleam committed Oct 18, 2018
     TST: resource: Prevent proliferation of Singularity instances
  10. Merge pull request #303 from kyleam/enh-attr-inst

    yarikoptic committed Oct 18, 2018
     ENH: Support required backend parameters
  11. ENH: report which non-absolute path was provided in the exception mes…

    yarikoptic committed Oct 18, 2018
    …sage
    
    It is unlikely to leak any sensitive information here, and I find it often
    more useful to have (more) informative exception messages by providing relevant
    implicated values
  12. DOC: state that fixture yields and not returns

    yarikoptic committed Oct 18, 2018
  13. BF: Fixed issues with creating a singularity resource

    mjtravers committed Oct 18, 2018
Commits on Oct 17, 2018
  1. TST: resource: Prevent proliferation of Singularity instances

    kyleam committed Oct 1, 2018
    Adjust the resource_session fixture to delete singularity instances so
    that they don't pollute the user's list of running instances.  Without
    this, each run of test_session_abstract_methods with
    SingularitySession adds entries like
    
      $ singularity instance.list
      DAEMON NAME      PID      CONTAINER IMAGE
      70ee38d1a70      21382    /tmp/.singularity-runtime.EcWxJv4l/python:2.7
      e9eed6fafdb      20911    /tmp/.singularity-runtime.zeQVjAch/python:2.7
  2. RF+TST: Convert resource_session fixture into a generator

    kyleam committed Oct 1, 2018
    Use a generator so that we can perform clean-up actions afterwards.
  3. ENH: resources: Teach get/put to infer destination basename

    kyleam committed Sep 27, 2018
    Re: #295
  4. BF: Restrict singularity and docker put() to absolute targets

    kyleam committed Oct 1, 2018
    The put() docstring doesn't explicitly mention whether the destination
    is expected to be an absolute path, but based on the put() call in
    test_ssh_class and on that fact that there is no explicit isabs()
    check in any put() method, relative paths seem to be allowed.
    
    For ssh sessions, there is an obvious default working directory: the
    user's home directory. For local shell's, the put() is just a get(),
    so it defaults to the current directory.  The situation isn't as clear
    for docker and singularity, and their methods don't currently provide
    any special handling.  The docker put() method fails if there is no
    leading directory, and it puts the files in "/" if there is a
    non-absolute leading path.  The singularity put() method appears to
    use a path that matches the local directory if it exists in the
    singularity image and a /home/USER otherwise.
    
    Adjust singularity and docker to signal an error when a non-absolute
    path is given, at least until these methods are updated with explicit
    rules for handling non-absolute paths.
  5. BF: resources: Avoid trying to create directory for empty string

    kyleam committed Sep 27, 2018
    Like the code that it replaced, _prepare_dest_path() does not check
    that there's a leading directory before calling mkdir on an empty
    string.  Add an explicit check for a leading path.
    
    Note: This worked by chance for some resources because their exists()
    methods return true for an empty string.  This should be fixed
    separately.
  6. RF: resource: Move common get/put destination path logic to helper

    kyleam committed Sep 27, 2018
    This logic will get more involved in the upcoming commits, so let's
    put it in one place.  Alternatively, we could use a decorator, but
    this has the downside that each resource module would have to import
    it.
Commits on Oct 16, 2018
  1. ENH: Don't list resources if loading a known resource fails

    kyleam committed Oct 16, 2018
    Usually importing a resource fails because the user has passed an
    unknown resource type, so we report the known resources in the
    exception message.  But if the import of a known resource fails (e.g.,
    because the resource imports an uninstalled module), it's confusing to
    show a list of known resources.
    
    Closes #297.
Commits on Oct 15, 2018
  1. TST: create: Add test for missing but required backend parameter

    kyleam committed Sep 26, 2018
  2. ENH: resource: Make ssh's host attribute mandatory

    kyleam committed Sep 26, 2018
    Backend parameters are now passed when creating the resource class, so
    attributes can be marked as required.
    
    Re: #300
  3. ENH: Support required backend parameters

    kyleam committed Sep 26, 2018
    ResourceManager.create() instantiates the resource class with the name
    and type, and then backend_set_config() handles setting up all the
    remaining attributes.  This means that even if a parameter is
    operationally required (e.g., "host" for ssh) the attribute can't be
    mandatory (i.e., default=attr.NOTHING).
    
    To make this possible, pass all backend parameters during instance
    creation.  We need to catch when instance creation fails so that we
    can provide useful information to the user about missing or unknown
    backend parameters.
    
    Fixes #299.
    Fixes #300.
  4. CLN: resource: Remove unnecessary code

    kyleam committed Sep 26, 2018
    This appears to be stale code that should have been removed in
    309bdbb (RF: Absorb more resource handling into ResourceManager,
    2018-07-27).  The code immediately upstream checks that the resource
    does not exist, so there should be no point in trying to load
    configuration for it.
  5. BF: create: Restrict splitting of backend parameters to first '='

    kyleam committed Sep 26, 2018
    parse_backend_parameters retained the splitting behavior of
    backend_set_config, including the incorrect handling of backend
    parameter values that contain a '='.
  6. RF: Move backend parameter parsing to interface.create

    kyleam committed Sep 26, 2018
    The ["key=value" ...] format is a detail of the command-line
    interface, so it makes sense to handle the parsing there.
  7. Merge pull request #296 from mjtravers/bf-unicode-screen

    kyleam committed Oct 15, 2018
    BF - Replaced high level paramiko with fabric in SSH resource
Commits on Oct 1, 2018
  1. Merge pull request #305 from kyleam/enh-quiet-singularity

    yarikoptic committed Oct 1, 2018
    ENH: singularity: Expect failures when running commands
  2. ENH: singularity: Expect failures when running commands

    kyleam committed Oct 1, 2018
    Pass expect_fail=True to the runner calls to prevent methods like
    exists() from unnecessarily worrying the user with things like
    
        [ERROR  ] stderr| cat: /no/such/file: No such file or directory
    
    Using expect_fail=True here is consistent with
    ShellSession._execute_command().
Commits on Sep 13, 2018