Remove support for legacy registry yaml format

Since all registries' projects.yaml have been updated to the new yaml
map top level format, remove support for the legacy yaml sequence
format.

Bug: b/298263687
Change-Id: I456ced0cea98b5e1108a2e75f0e93e2f6aff09bf
Reviewed-on: https://fuchsia-review.googlesource.com/c/cobalt/+/923314
Commit-Queue: Steve Fung <stevefung@google.com>
Reviewed-by: Cameron Dale <camrdale@google.com>
Fuchsia-Auto-Submit: Steve Fung <stevefung@google.com>
diff --git a/src/bin/config_parser/src/config_parser/config_reader_test.go b/src/bin/config_parser/src/config_parser/config_reader_test.go
index dfa94eb..df5c5a1 100644
--- a/src/bin/config_parser/src/config_parser/config_reader_test.go
+++ b/src/bin/config_parser/src/config_parser/config_reader_test.go
@@ -44,6 +44,7 @@
 }
 
 const customersYaml = `
+customers:
 - customer_name: fuchsia
   customer_id: 1
   projects:
diff --git a/src/bin/config_parser/src/config_parser/project_list.go b/src/bin/config_parser/src/config_parser/project_list.go
index f4431ef..64c759d 100644
--- a/src/bin/config_parser/src/config_parser/project_list.go
+++ b/src/bin/config_parser/src/config_parser/project_list.go
@@ -16,7 +16,6 @@
 	"yamlpb"
 
 	"github.com/golang/glog"
-	"gopkg.in/yaml.v2"
 )
 
 var validNameRegexp = regexp.MustCompile("^[a-zA-Z][_a-zA-Z0-9]{1,81}$")
@@ -26,7 +25,7 @@
 func parseCustomerList(content string, l *[]ProjectConfigData) (err error) {
 	var registry config.CobaltRegistry
 	if err := yamlpb.UnmarshalString(content, &registry); err != nil {
-		return parseCustomerListFromMap(content, l)
+		return fmt.Errorf("Error while parsing the yaml for a list of Cobalt customer definitions: %v", err)
 	}
 
 	customerNames := map[string]bool{}
@@ -103,103 +102,6 @@
 	return nil
 }
 
-// TODO(b/298263687): Remove this when the legacy format is no longer used.
-func parseCustomerListFromMap(content string, l *[]ProjectConfigData) (err error) {
-	var y []map[string]interface{}
-	if err := yaml.Unmarshal([]byte(content), &y); err != nil {
-		return fmt.Errorf("Error while parsing the yaml for a list of Cobalt customer definitions: %v", err)
-	}
-
-	customerNames := map[string]bool{}
-	customerIds := map[int]bool{}
-	experimentsNamespaces := []interface{}{}
-	deletedProjectIds := []interface{}{}
-
-	for i, customer := range y {
-		v, ok := customer["customer_name"]
-		if !ok {
-			return fmt.Errorf("customer_name field is missing in entry %v of the customer list.", i)
-		}
-		customerName, ok := v.(string)
-		if !ok {
-			return fmt.Errorf("Customer name '%v' is not a string.", v)
-		}
-		if !validNameRegexp.MatchString(customerName) {
-			return fmt.Errorf("Customer name '%v' is invalid. Customer names must match the regular expression '%v'", customerName, validNameRegexp)
-		}
-		if customerNames[customerName] {
-			return fmt.Errorf("Customer name '%v' repeated. Customer names must be unique.", customerName)
-		}
-		customerNames[customerName] = true
-
-		v, ok = customer["customer_id"]
-		if !ok {
-			return fmt.Errorf("Missing customer id for '%v'.", customerName)
-		}
-		customerId, ok := v.(int)
-		if !ok {
-			return fmt.Errorf("Customer id '%v' for '%v' is not numeric.", customerId, customerName)
-		}
-		if customerId < 0 {
-			return fmt.Errorf("Customer id for '%v' is negative. Customer ids must be positive.", customerName)
-		}
-		if customerId == math.MaxInt32 && customerName != "cobalt_internal" {
-			return fmt.Errorf("Customer '%v' tried to register id %d, which is reserved for the internal customer 'cobalt_internal'.", customerName, math.MaxInt32)
-		}
-		if customerIds[customerId] {
-			return fmt.Errorf("Customer id %v for customer '%v' repeated. Customer names must be unique.", customerId, customerName)
-		}
-		customerIds[customerId] = true
-
-		v, ok = customer["experiments_namespaces"]
-		experimentsNamespaces = []interface{}{}
-		if ok {
-			experimentsNamespaces, ok = v.([]interface{})
-			if !ok {
-				return fmt.Errorf("Customer's experiments_namespaces '%v' for customer %v is not a []interface{}.", v, customerName)
-			}
-		}
-
-		v, ok = customer["deleted_project_ids"]
-		deletedProjectIds = []interface{}{}
-		if ok {
-			deletedProjectIds, ok = v.([]interface{})
-			if !ok {
-				return fmt.Errorf("Customer's deleted_project_ids '%v' for customer %v is not a []interface{}.", v, customerName)
-			}
-		}
-
-		projectsAsI, ok := customer["projects"]
-		if !ok {
-			glog.Warningf("No projects found for customer '%v'.", customerName)
-			continue
-		}
-
-		projectsAsList, ok := projectsAsI.([]interface{})
-		if !ok {
-			fmt.Errorf("Project list for customer %v is invalid. It should be a yaml list.", customerName)
-		}
-
-		c := []ProjectConfigData{}
-		if err := populateProjectListFromInterface(projectsAsList, &c); err != nil {
-			return fmt.Errorf("Project list for customer %v is invalid: %v", customerName, err)
-		}
-
-		for i := range c {
-			c[i].CustomerId = uint32(customerId)
-			c[i].CustomerName = customerName
-			c[i].CustomerExperimentsNamespaces = experimentsNamespaces
-			for _, deletedProjectId := range deletedProjectIds {
-				c[i].DeletedProjectIds = append(c[i].DeletedProjectIds, uint32(deletedProjectId.(int)))
-			}
-		}
-		*l = append(*l, c...)
-	}
-
-	return nil
-
-}
-
 // populateProjectList populates a list of cobalt projects given in the form of
 // an array of ProjectConfig proto objects. For more details, see
 // populateProjectConfigData. This function also validates that project names and
@@ -228,43 +130,6 @@
 	return
 }
 
-// populateProjectList populates a list of cobalt projects given in the form of
-// a map as returned by a call to yaml.Unmarshal. For more details, see
-// populateProjectConfigDataLegacy. This function also validates that project
-// names and ids are unique.
-// TODO(b/298263687): Remove this when the legacy format is no longer used.
-func populateProjectListFromInterface(y []interface{}, l *[]ProjectConfigData) (err error) {
-	projectNames := map[string]bool{}
-	projectIds := map[uint32]bool{}
-	for i, v := range y {
-		m, ok := v.(map[interface{}]interface{})
-		if !ok {
-			return fmt.Errorf("Entry %v in project list is not a yaml map.", i)
-		}
-		p, err := toStrMap(m)
-		if err != nil {
-			return fmt.Errorf("Entry %v in project list is not valid: %v", i, err)
-		}
-		c := ProjectConfigData{}
-		if err := populateProjectConfigDataLegacy(p, &c); err != nil {
-			return fmt.Errorf("Error in entry %v in project list: %v", i, err)
-		}
-
-		if projectNames[c.ProjectName] {
-			return fmt.Errorf("Project name '%v' repeated. Project names must be unique.", c.ProjectName)
-		}
-		projectNames[c.ProjectName] = true
-
-		if projectIds[c.ProjectId] {
-			return fmt.Errorf("Project id %v for project %v is repeated. Project ids must be unique.", c.ProjectId, c.ProjectName)
-		}
-		projectIds[c.ProjectId] = true
-
-		*l = append(*l, c)
-	}
-	return
-}
-
 // populateProjectConfigData populates a cobalt project given in the form of a
 // ProjectConfig proto object. It populates the name, projectId and contact
 // fields of the ProjectConfigData it returns. It also validates those values.
@@ -272,7 +137,7 @@
 // and contact fields.
 func populateProjectConfigData(p *config.ProjectConfig, c *ProjectConfigData) (err error) {
 	if p.ProjectName == "" {
-		return fmt.Errorf("Missing name in project list.")
+		return fmt.Errorf("Missing name in project list: %v", p)
 	}
 	c.ProjectName = p.ProjectName
 	if !validNameRegexp.MatchString(c.ProjectName) {
@@ -299,59 +164,6 @@
 	return nil
 }
 
-// populateProjectConfigData populates a cobalt project given in the form of a map
-// as returned by a call to yaml.Unmarshal. It populates the name, projectId and
-// contact fields of the ProjectConfigData it returns. It also validates those
-// values. The project id must be a positive integer. The project must have
-// name, id and contact fields.
-// TODO(b/298263687): Remove this when the legacy format is no longer used.
-func populateProjectConfigDataLegacy(p map[string]interface{}, c *ProjectConfigData) (err error) {
-	v, ok := p["project_name"]
-	if !ok {
-		return fmt.Errorf("Missing name in project list.")
-	}
-	c.ProjectName, ok = v.(string)
-	if !ok {
-		return fmt.Errorf("Project name '%v' is not a string.", v)
-	}
-	if !validNameRegexp.MatchString(c.ProjectName) {
-		return fmt.Errorf("Project name '%v' is invalid. Project names must match the regular expression '%v'", c.ProjectName, validNameRegexp)
-	}
-
-	v, ok = p["project_id"]
-	if !ok {
-		return fmt.Errorf("Missing project_id for project %v.", c.ProjectName)
-	}
-	projectId, ok := v.(int)
-	if !ok {
-		return fmt.Errorf("ID '%v' for project %v is not an integer.", v, c.ProjectName)
-	}
-	if projectId <= 0 {
-		return fmt.Errorf("ID for project %v is not a positive integer.", c.ProjectName)
-	}
-	c.ProjectId = uint32(projectId)
-
-	v, ok = p["project_contact"]
-	if !ok {
-		return fmt.Errorf("Missing contact for project %v.", c.ProjectName)
-	}
-	c.Contact, ok = v.(string)
-	if !ok {
-		return fmt.Errorf("Contact '%v' for project %v is not a string.", v, c.ProjectName)
-	}
-
-	v, ok = p["experiments_namespaces"]
-	c.ProjectExperimentsNamespaces = []interface{}{}
-	if ok {
-		c.ProjectExperimentsNamespaces, ok = v.([]interface{})
-		if !ok {
-			return fmt.Errorf("ProjectExperimentsNamespaces '%v' for project %v is not a []interface{}].", v, c.ProjectName)
-		}
-	}
-
-	return nil
-}
-
 func toStrMap(i map[interface{}]interface{}) (o map[string]interface{}, err error) {
 	o = make(map[string]interface{})
 	for k, v := range i {
diff --git a/src/bin/config_parser/src/config_parser/project_list_test.go b/src/bin/config_parser/src/config_parser/project_list_test.go
index ded5cdb..ce17a3e 100644
--- a/src/bin/config_parser/src/config_parser/project_list_test.go
+++ b/src/bin/config_parser/src/config_parser/project_list_test.go
@@ -5,7 +5,9 @@
 package config_parser
 
 import (
+	"config"
 	"testing"
+	"yamlpb"
 
 	"github.com/google/go-cmp/cmp"
 	"google.golang.org/protobuf/proto"
@@ -92,93 +94,8 @@
 		t.Error(err)
 	}
 
-	if !cmp.Equal(e, l, cmp.Comparer(proto.Equal)) {
-		t.Errorf("%v != %v", e, l)
-	}
-}
-
-// Basic test case for parseCustomerList using the legacy format.
-// TODO(b/298263687): Remove this when the legacy format is no longer used.
-func TestParseCustomerListLegacy(t *testing.T) {
-	y := `
-- customer_name: fuchsia
-  customer_id: 20
-  projects:
-  - project_name: ledger
-    project_contact: ben
-    project_id: 10
-    experiments_namespaces: ["red.green.yellow", "blue.green.yellow"]
-- customer_name: test_project
-  customer_id: 25
-  experiments_namespaces: ["black.green.yellow"]
-  projects:
-  - project_name: ledger
-    project_id: 10
-    project_contact: ben
-  deleted_project_ids: [11, 1]
-- customer_name: test_project2
-  customer_id: 26
-  experiments_namespaces: ["white.green.yellow"]
-  projects:
-  - project_name: ledger2
-    project_id: 11
-    project_contact: maria
-    experiments_namespaces: ["red.green.yellow", "blue.green.yellow"]
-  - project_name: ledger3
-    project_id: 12
-    project_contact: maria
-  deleted_project_ids: [10]
-`
-
-	e := []ProjectConfigData{
-		{
-			CustomerName:                  "fuchsia",
-			CustomerId:                    20,
-			ProjectName:                   "ledger",
-			ProjectId:                     10,
-			Contact:                       "ben",
-			CustomerExperimentsNamespaces: []interface{}{},
-			ProjectExperimentsNamespaces:  []interface{}{"red.green.yellow", "blue.green.yellow"},
-		},
-		{
-			CustomerName:                  "test_project",
-			CustomerId:                    25,
-			ProjectName:                   "ledger",
-			ProjectId:                     10,
-			Contact:                       "ben",
-			CustomerExperimentsNamespaces: []interface{}{"black.green.yellow"},
-			ProjectExperimentsNamespaces:  []interface{}{},
-			DeletedProjectIds:             []uint32{11, 1},
-		},
-		{
-			CustomerName:                  "test_project2",
-			CustomerId:                    26,
-			ProjectName:                   "ledger2",
-			ProjectId:                     11,
-			Contact:                       "maria",
-			CustomerExperimentsNamespaces: []interface{}{"white.green.yellow"},
-			ProjectExperimentsNamespaces:  []interface{}{"red.green.yellow", "blue.green.yellow"},
-			DeletedProjectIds:             []uint32{10},
-		},
-		{
-			CustomerName:                  "test_project2",
-			CustomerId:                    26,
-			ProjectName:                   "ledger3",
-			ProjectId:                     12,
-			Contact:                       "maria",
-			CustomerExperimentsNamespaces: []interface{}{"white.green.yellow"},
-			ProjectExperimentsNamespaces:  []interface{}{},
-			DeletedProjectIds:             []uint32{10},
-		},
-	}
-
-	l := []ProjectConfigData{}
-	if err := parseCustomerList(y, &l); err != nil {
-		t.Error(err)
-	}
-
-	if !cmp.Equal(e, l, cmp.Comparer(proto.Equal)) {
-		t.Errorf("%v != %v", e, l)
+	if !cmp.Equal(l, e, cmp.Comparer(proto.Equal)) {
+		t.Errorf("%v != %v", l, e)
 	}
 }
 
@@ -226,49 +143,6 @@
 	}
 }
 
-// Tests that duplicated customer project_names and ids result in errors using the legacy format.
-// TODO(b/298263687): Remove this when the legacy format is no longer used.
-func TestParseCustomerListDuplicateValuesLegacy(t *testing.T) {
-	var y string
-	l := []ProjectConfigData{}
-
-	// Checks that an error is returned if a duplicate customer project_name is used.
-	y = `
-- customer_name: fuchsia
-  customer_id: 10
-  projects:
-  - project_name: ledger
-    project_contact: ben
-- customer_name: fuchsia
-  customer_id: 11
-  projects:
-  - project_name: ledger
-    project_contact: ben
-`
-
-	if err := parseCustomerList(y, &l); err == nil {
-		t.Error("Accepted customer list with duplicate customer project_names.")
-	}
-
-	// Checks that an error is returned if a duplicate customer id is used.
-	y = `
-- customer_name: fuchsia
-  customer_id: 10
-  projects:
-  - project_name: ledger
-    project_contact: ben
-- customer_name: test_project
-  customer_id: 10
-  projects:
-  - project_name: ledger
-    project_contact: ben
-`
-
-	if err := parseCustomerList(y, &l); err == nil {
-		t.Error("Accepted customer list with duplicate customer ids.")
-	}
-}
-
 // Tests that deleted customer IDs are parsed.
 func TestParseCustomerListDeletedCustomerIds(t *testing.T) {
 	y := `
@@ -362,8 +236,8 @@
 		t.Error(err)
 	}
 
-	if !cmp.Equal(e, l, cmp.Comparer(proto.Equal)) {
-		t.Errorf("%v != %v", e, l)
+	if !cmp.Equal(l, e, cmp.Comparer(proto.Equal)) {
+		t.Errorf("%v != %v", l, e)
 	}
 }
 
@@ -414,51 +288,6 @@
 	}
 }
 
-// Tests the customer project_name validation logic using the legacy format.
-// TODO(b/298263687): Remove this when the legacy format is no longer used.
-func TestParseCustomerListNameValidationLegacy(t *testing.T) {
-	var y string
-	l := []ProjectConfigData{}
-
-	// Checks that an error is returned if no customer project_name is specified.
-	y = `
-- customer_id: 20
-  projects:
-  - project_name: ledger
-    project_contact: ben
-`
-
-	if err := parseCustomerList(y, &l); err == nil {
-		t.Error("Accepted customer without a project_name.")
-	}
-
-	// Checks that an error is returned if the customer project_name has an invalid type.
-	y = `
-- customer_name: 20
-  customer_id: 10
-  projects:
-  - project_name: ledger
-    project_contact: ben
-`
-
-	if err := parseCustomerList(y, &l); err == nil {
-		t.Error("Accepted customer with invalid project_name type.")
-	}
-
-	// Checks that an error is returned if a project_name is invalid.
-	y = `
-- customer_name: hello world
-  customer_id: 10
-  projects:
-  - project_name: ledger
-    project_contact: ben
-`
-
-	if err := parseCustomerList(y, &l); err == nil {
-		t.Error("Accepted customer with invalid project_name.")
-	}
-}
-
 // Tests the customer id validation logic.
 func TestParseCustomerListIdValidation(t *testing.T) {
 	var y string
@@ -506,64 +335,20 @@
 	}
 }
 
-// Tests the customer id validation logic using the legacy format.
-// TODO(b/298263687): Remove this when the legacy format is no longer used.
-func TestParseCustomerListIdValidationLegacy(t *testing.T) {
-	var y string
-	l := []ProjectConfigData{}
-
-	// Checks that an error is returned if no customer id is specified.
-	y = `
-- customer_name: fuchsia
-  projects:
-  - project_name: ledger
-    project_contact: ben
-`
-
-	if err := parseCustomerList(y, &l); err == nil {
-		t.Error("Accepted customer without an id.")
-	}
-
-	// Checks that an error is returned if a non-numeric customer id is specified.
-	y = `
-- customer_id: fuchsia
-  customer_name: fuchsia
-  projects:
-  - project_name: ledger
-    project_contact: ben
-`
-
-	if err := parseCustomerList(y, &l); err == nil {
-		t.Error("Accepted customer with non-numeric id.")
-	}
-
-	// Checks that an error is returned if a negative customer id is specified.
-	y = `
-- customer_id: -10
-  customer_name: fuchsia
-  projects:
-  - project_name: ledger
-    project_contact: ben
-`
-
-	if err := parseCustomerList(y, &l); err == nil {
-		t.Error("Accepted customer with negative id.")
-	}
-}
-
 // Allows tests to specify input data in yaml when testing populateProjectList.
 func parseProjectListForTest(content string, l *[]ProjectConfigData) (err error) {
-	var y []interface{}
-	if err := yaml.Unmarshal([]byte(content), &y); err != nil {
+	var y config.CustomerConfig
+	if err := yamlpb.UnmarshalString(content, &y); err != nil {
 		panic(err)
 	}
 
-	return populateProjectListFromInterface(y, l)
+	return populateProjectList(y.Projects, l)
 }
 
 // Basic test case for populateProjectList.
 func TestPopulateProjectList(t *testing.T) {
 	y := `
+projects:
 - project_name: ledger
   project_contact: ben,etienne
   project_id: 10
@@ -591,8 +376,8 @@
 			ProjectExperimentsNamespaces: []interface{}{},
 		},
 	}
-	if !cmp.Equal(e, l, cmp.Comparer(proto.Equal)) {
-		t.Errorf("%v != %v", e, l)
+	if !cmp.Equal(l, e, cmp.Comparer(proto.Equal)) {
+		t.Errorf("%v != %v", l, e)
 	}
 }
 
@@ -602,6 +387,7 @@
 	var l []ProjectConfigData
 	// Checks that an error is returned if a project_name is duplicated.
 	y = `
+projects:
 - project_name: ledger
   project_contact: ben
 - project_name: ledger
@@ -616,12 +402,12 @@
 
 // Allows tests to specify inputs in yaml when testing populateProjectConfigData.
 func parseProjectConfigDataForTest(content string, c *ProjectConfigData) (err error) {
-	var y map[string]interface{}
+	var y *config.ProjectConfig
 	if err := yaml.Unmarshal([]byte(content), &y); err != nil {
 		panic(err)
 	}
 
-	return populateProjectConfigDataLegacy(y, c)
+	return populateProjectConfigData(y, c)
 }
 
 // Checks validation for the project_name field.
diff --git a/src/bin/config_parser/test_source_generator_for_all_projects.py b/src/bin/config_parser/test_source_generator_for_all_projects.py
index 9929f31..29ee954 100755
--- a/src/bin/config_parser/test_source_generator_for_all_projects.py
+++ b/src/bin/config_parser/test_source_generator_for_all_projects.py
@@ -34,14 +34,7 @@
     registry = yaml.safe_load(stream)
 
   running_compiles = []
-  # TODO(b/298263687): Remove this when the legacy format is no longer used.
-  if isinstance(registry, dict):
-    # The new projects.yaml format parses as a `dict` containing `customers` and `deleted_customer_ids`.
-    customers_list = registry['customers']
-  else:
-    # The legacy projects.yaml format parses as a `list` of projects.
-    customers_list = registry
-  for customer in customers_list:
+  for customer in registry['customers']:
     customer_id = customer['customer_id']
     if customer['projects'] is None:
       # There are no projects defined for the customer.
diff --git a/src/lib/client/rust/tests/test_registry/projects.yaml b/src/lib/client/rust/tests/test_registry/projects.yaml
index 7e36fa6..d4e9278 100644
--- a/src/lib/client/rust/tests/test_registry/projects.yaml
+++ b/src/lib/client/rust/tests/test_registry/projects.yaml
@@ -2,6 +2,7 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+customers:
 - customer_name: test
   customer_id: 1
   projects:
diff --git a/src/local_aggregation/testing/test_privacy_registry/projects.yaml b/src/local_aggregation/testing/test_privacy_registry/projects.yaml
index 9a53000..1fa42b4 100644
--- a/src/local_aggregation/testing/test_privacy_registry/projects.yaml
+++ b/src/local_aggregation/testing/test_privacy_registry/projects.yaml
@@ -1,3 +1,4 @@
+customers:
 - customer_name: CustomerA
   customer_id: 123
 
diff --git a/src/local_aggregation/testing/test_registry/projects.yaml b/src/local_aggregation/testing/test_registry/projects.yaml
index 9a53000..1fa42b4 100644
--- a/src/local_aggregation/testing/test_registry/projects.yaml
+++ b/src/local_aggregation/testing/test_registry/projects.yaml
@@ -1,3 +1,4 @@
+customers:
 - customer_name: CustomerA
   customer_id: 123
 
diff --git a/src/local_aggregation/testing/test_registry_with_report_all_set/projects.yaml b/src/local_aggregation/testing/test_registry_with_report_all_set/projects.yaml
index 9a53000..1fa42b4 100644
--- a/src/local_aggregation/testing/test_registry_with_report_all_set/projects.yaml
+++ b/src/local_aggregation/testing/test_registry_with_report_all_set/projects.yaml
@@ -1,3 +1,4 @@
+customers:
 - customer_name: CustomerA
   customer_id: 123
 
diff --git a/src/local_aggregation/testing/test_registry_with_select_last_set/projects.yaml b/src/local_aggregation/testing/test_registry_with_select_last_set/projects.yaml
index 9a53000..1fa42b4 100644
--- a/src/local_aggregation/testing/test_registry_with_select_last_set/projects.yaml
+++ b/src/local_aggregation/testing/test_registry_with_select_last_set/projects.yaml
@@ -1,3 +1,4 @@
+customers:
 - customer_name: CustomerA
   customer_id: 123
 
diff --git a/src/logger/test_registries/all_report_types_test_registry/projects.yaml b/src/logger/test_registries/all_report_types_test_registry/projects.yaml
index 3724636..36b45a1 100644
--- a/src/logger/test_registries/all_report_types_test_registry/projects.yaml
+++ b/src/logger/test_registries/all_report_types_test_registry/projects.yaml
@@ -1,3 +1,4 @@
+customers:
 - customer_name: CustomerA
   customer_id: 1
 
diff --git a/src/logger/test_registries/empty_test_registry/projects.yaml b/src/logger/test_registries/empty_test_registry/projects.yaml
index 8344094..7f45216 100644
--- a/src/logger/test_registries/empty_test_registry/projects.yaml
+++ b/src/logger/test_registries/empty_test_registry/projects.yaml
@@ -1,3 +1,4 @@
+customers:
 - customer_name: CustomerE
   customer_id: 9876
 
diff --git a/src/logger/test_registries/project_context_factory_test_registry/projects.yaml b/src/logger/test_registries/project_context_factory_test_registry/projects.yaml
index 9f6eb31..c7cfcb5 100644
--- a/src/logger/test_registries/project_context_factory_test_registry/projects.yaml
+++ b/src/logger/test_registries/project_context_factory_test_registry/projects.yaml
@@ -1,3 +1,4 @@
+customers:
 - customer_name: Customer11
   customer_id: 11
   projects:
diff --git a/src/logger/test_registries/project_context_test_registry/projects.yaml b/src/logger/test_registries/project_context_test_registry/projects.yaml
index 1c7c2a4..4e7a77d 100644
--- a/src/logger/test_registries/project_context_test_registry/projects.yaml
+++ b/src/logger/test_registries/project_context_test_registry/projects.yaml
@@ -1,3 +1,4 @@
+customers:
 - customer_name: CustomerA
   customer_id: 123
 
diff --git a/src/logger/test_registries/test_registry/projects.yaml b/src/logger/test_registries/test_registry/projects.yaml
index 3724636..36b45a1 100644
--- a/src/logger/test_registries/test_registry/projects.yaml
+++ b/src/logger/test_registries/test_registry/projects.yaml
@@ -1,3 +1,4 @@
+customers:
 - customer_name: CustomerA
   customer_id: 1