Project

General

Profile

Actions

Feature #15467

closed

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

Added by Peter Amstutz over 4 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Story points:
1.0
Release relationship:
Auto

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 5 (0 open5 closed)

Task #15478: Review 15467-config-fixupsResolvedEric Biagiotti07/26/2019Actions
Task #15504: Fix dev clustersResolvedPeter Amstutz07/26/2019Actions
Task #15510: Review 15467-legacy-configResolvedEric Biagiotti07/26/2019Actions
Task #15515: Support missing KeepServices item, update documentation,ResolvedPeter Amstutz07/26/2019Actions
Task #15518: Review 15467-update-install-docsResolvedEric Biagiotti07/26/2019Actions

Related issues

Has duplicate Arvados - Idea #15147: Replace lists of strings in new config with mapsDuplicateActions
Actions

Also available in: Atom PDF