Skip to content

Commit

Permalink
Fix describe locks bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mumoshu committed Nov 8, 2024
1 parent 272632a commit c781096
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions deploy/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ func configMapKey(project, environment string) string {
}

func splitConfigMapKey(key string) (string, string) {
parts := strings.Split(key, Sep)
return parts[0], parts[1]
i := strings.LastIndex(key, Sep)
return key[:i], key[i+1:]
}

func (c *Coordinator) getOrCreateConfigMap(ctx context.Context) (*corev1.ConfigMap, error) {
Expand Down
8 changes: 3 additions & 5 deletions deploy/lock_encoding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,9 @@ func TestKeysAndValuesEncoding(t *testing.T) {
},
},
},
// TODO There's a known bug where "myproject2-api/prod" are conflated as "myproject2/prod".
// },
// "myproject2-api": {
// "prod": {
"api": {
},
"myproject2-api": {
"prod": {
Locked: true,
LockHistory: []LockHistoryItem{
{
Expand Down

0 comments on commit c781096

Please sign in to comment.