Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse more defensively #302

Closed

Commits on Sep 28, 2023

  1. Add tests for docker inspect parsing

    This includes a failing test for a result observed with podman
    Rory-Reid committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    6eb9080 View commit details
    Browse the repository at this point in the history
  2. Change Container.State.Health.Status to be nullable

    The only place this is used (.WaitForHealthy()) already performs a null-
    safe check against the Status, comparing it to "Healthy" only. Changing
    the property to nullable allows more defensive parsing if it is an empty
    string for whatever reason, and is still interpreted as "Unhealthy"
    where it matters.
    Rory-Reid committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    29bf1a9 View commit details
    Browse the repository at this point in the history
  3. Parse container EntryPoint from array or string

    This adds and uses a custom converter which will parse
    Container.Config.Entrypoint from a json string array I.E.
    
    ```json
    {
      "EntryPoint": [
        "my-entrypoint"
      ]
    }
    ```
    
    Or from a single string value, I.E:
    
    ```json
    {
      "EntryPoint": "my-entrypoint"
    }
    ```
    Rory-Reid committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    03f07bd View commit details
    Browse the repository at this point in the history
  4. Omit unused docker network ls output

    This removes unused fields from the output of the `docker network ls`
    command, to avoid parsing errors when one or more formatted properties
    are unavailable on a host machine.
    
    **Warning:** This could potentially break client code, if any client
    actively relies on the public method:
    
    - IContainerHost.DockerHost.NetworkLs();
    Rory-Reid committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    862bbfd View commit details
    Browse the repository at this point in the history
  5. Remove unused parsed output from docker top

    This removes the need to parse all output from docker top, preventing
    parsing errors where format of columns may differ from host to host.
    
    **Warning:** This could potentially break client code, if any client
    actively relies on the public method:
    
    - IContainerService.DockerHost.Top(...).Processes.Rows
    Rory-Reid committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    97d7242 View commit details
    Browse the repository at this point in the history