Skip to content

[ISSUE #120] fix(nameservice): add sorting for hostIps and instance.Status.NameServers before deepEqual#104

Merged
caigy merged 1 commit intoapache:masterfrom
shangjin92:dev
Jul 29, 2022
Merged

[ISSUE #120] fix(nameservice): add sorting for hostIps and instance.Status.NameServers before deepEqual#104
caigy merged 1 commit intoapache:masterfrom
shangjin92:dev

Conversation

@shangjin92
Copy link
Copy Markdown
Contributor

Sometimes, hostsIps are equal to instance.Status.NameServers, just the order of value is different. But reflect.DeepEqual will return false to this situation, and it will update nameservices always.

For example, hostIps = ['192.168.2.1', '192.168.2.11'], instance.Status.NameServers = ['192.168.2.11', '192.168.2.1']

…vers before deepEqual.

Sometimes, hostsIps are equal to instance.Status.NameServers, just the order of value is different. But reflect.DeepEqual will return false to this situation, and it will update nameservices always.

For example, hostIps = ['192.168.2.1', '192.168.2.11'], instance.Status.NameServers = ['192.168.2.11', '192.168.2.1']
@caigy
Copy link
Copy Markdown
Contributor

caigy commented Jul 28, 2022

@shangjin92 Pls submit an issue and relate this pr to it.

@shangjin92
Copy link
Copy Markdown
Contributor Author

fix #120

@caigy caigy changed the title fix(nameservice): add sorting for hostIps and instance.Status.NameServers before deepEqual [ISSUE #120] fix(nameservice): add sorting for hostIps and instance.Status.NameServers before deepEqual Jul 29, 2022
@caigy caigy merged commit b73c752 into apache:master Jul 29, 2022
@ShannonDing ShannonDing linked an issue Jul 29, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Operator will update nameservers addr always.

2 participants