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

csi/api: populate ReadAllocs/WriteAllocs fields #9377

Merged
merged 2 commits into from
Nov 25, 2020

Commits on Nov 25, 2020

  1. csi/api: populate ReadAllocs/WriteAllocs fields

    The API is missing values for `ReadAllocs` and `WriteAllocs` fields, resulting
    in allocation claims not being populated in the web UI. These fields mirror
    the fields in `nomad/structs.CSIVolume`. Returning a separate list of stubs
    for read and write would be ideal, but this can't be done without either
    bloating the API response with repeated full `Allocation` data, or causing a
    panic in previous versions of the CLI.
    
    The `nomad/structs` fields are persisted with nil values and are populated
    during RPC, so we'll do the same in the HTTP API and populate the `ReadAllocs`
    and `WriteAllocs` fields with a map of allocation IDs, but with null
    values. The web UI will then create its `ReadAllocations` and
    `WriteAllocations` fields by mapping from those IDs to the values in
    `Allocations`, instead of flattening the map into a list.
    tgross committed Nov 25, 2020
    Configuration menu
    Copy the full SHA
    701da2e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    efdce68 View commit details
    Browse the repository at this point in the history