Feature #15467

Revisit new config, ordered lists must end in "List" and unordered sets should be turned into maps

Added by Peter Amstutz 7 days ago. Updated 2 days ago.

Status:
New
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
(Total: 0.00 h)
Story points:
1.0

Description

In Cluster configuration we say "Arrays and lists are not to be used" (and recently added "unless order is truly significant.")

But we already added some new config keys that broke this rule, including:
  • DriverParameters.SecurityGroupIDs
  • DisabledAPIs
  • NewUserNotificationRecipients
  • NewInactiveUserNotificationRecipients

These should be changed from lists to maps. For example, instead of

SecurityGroupIDs:
  - a
  - b
  - c

we should have

SecurityGroupIDs:
  a: {}
  b: {}
  c: {}

We can maintain compatibility with old configs the way we did for InstanceTypes: if the JSON value starts with '[', unmarshal into a slice of strings and build an appropriate map. See (*InstanceTypeMap)UnmarshalJSON() in source:sdk/go/arvados/config.go.

We also need a test in lib/config that
  • prohibits list/array values on keys that don't have the suffix "List".
  • prohibits the suffix "List" on keys whose values aren't lists/arrays.

Subtasks

Task #15478: ReviewNewEric Biagiotti

History

#1 Updated by Peter Amstutz 7 days ago

  • Status changed from New to In Progress

#2 Updated by Peter Amstutz 7 days ago

  • Status changed from In Progress to New

#3 Updated by Tom Clegg 7 days ago

  • Description updated (diff)

#4 Updated by Peter Amstutz 2 days ago

  • Target version changed from 2019-07-17 Sprint to 2019-07-31 Sprint

#5 Updated by Peter Amstutz 2 days ago

  • Assigned To set to Peter Amstutz

#6 Updated by Tom Morris 2 days ago

  • Story points set to 1.0

Also available in: Atom PDF