-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handle missing service and route names detecting duplicates (#945)
As both Service and Route names are allowed to be empty, we have to account for this case in the code detecting duplicates and short-circuit when the target entity has no name to prevent panics.
- Loading branch information
Showing
5 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
tests/integration/testdata/sync/022-update-with-explicit-ids-with-no-names/after.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
_format_version: "3.0" | ||
services: | ||
- enabled: true | ||
host: mockbin.org | ||
id: c75a775b-3a32-4b73-8e05-f68169c23941 # Leaving ID | ||
port: 80 | ||
tags: [after] | ||
routes: | ||
- id: 97b6a97e-f3f7-4c47-857a-7464cb9e202b # Leaving ID | ||
paths: | ||
- /r1 | ||
tags: [after] |
10 changes: 10 additions & 0 deletions
10
tests/integration/testdata/sync/022-update-with-explicit-ids-with-no-names/before.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
_format_version: "3.0" | ||
services: | ||
- enabled: true | ||
host: mockbin.org | ||
id: c75a775b-3a32-4b73-8e05-f68169c23941 # Leaving ID | ||
port: 80 | ||
routes: | ||
- id: 97b6a97e-f3f7-4c47-857a-7464cb9e202b # Leaving ID | ||
paths: | ||
- /r1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters