Skip to content

Commit

Permalink
returning index change as diff
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmayja committed May 10, 2024
1 parent f70b1a5 commit 50a0f57
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions asconfig/asconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ func (s *AsConfigTestSuite) TestAsConfigGetDiff() {
"xdr.dcs.{DC1}.namespaces.{ns1}.ignore-sets": {Add: []string{"set1"}},
"namespaces.{test}.replication-factor": {Update: 3},
"namespaces.{bar}.replication-factor": {Update: uint64(2)},
"xdr.dcs.{DC1}.<index>": {Update: 0},
"xdr.dcs.{DC1}.namespaces.{ns1}.<index>": {Update: 0},
},
},
{
Expand Down Expand Up @@ -312,6 +314,7 @@ func (s *AsConfigTestSuite) TestAsConfigGetDiff() {
"xdr.dcs.{DC3}.namespaces.{ns1}.name": {Add: "ns1"},
"xdr.dcs.{DC3}.namespaces.{ns2}.name": {Remove: "ns2"},
"xdr.dcs.{DC3}.namespaces.{ns1}.bin-policy": {Update: "all"},
"xdr.dcs.{DC3}.namespaces.{ns1}.<index>": {Update: 0},
},
},
}
Expand Down
3 changes: 2 additions & 1 deletion asconfig/confdiff.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ func detailedDiff(log logr.Logger, desired, current Conf, isFlat,
// or if type or value is different add/update/remove it
for key, desiredValue := range desired {
bN := BaseKey(key)
if isNodeSpecificField(bN) || bN == keyIndex {
//if isNodeSpecificField(bN) || bN == keyIndex {
if isNodeSpecificField(bN) {
// Ignore node specific details and ordering
continue
}
Expand Down

0 comments on commit 50a0f57

Please sign in to comment.