Closed HoangNguyen689 closed 1 month ago
@HoangNguyen689 thank you so much. let me check again.
the solution might be one of: a. remove sorting as you mentioned b. sort both livestate and head
@t-kikuc Thank you. It seems that sorting both safer. But when thinking that the livestate is the same as we the resource we defined, maybe the sorting is unnecessary.
@t-kikuc I just changed to sort both the live state and the head manifest!
@HoangNguyen689 thank you! I also think no sorting is ideal, but let me ask AWS support.
@HoangNguyen689
I asked AWS Support and it turned out that
sorting the subnets
occurs but that might be changed in the future. (so that is not described in any docs)
That's why, sorting both live and head manifests is the best.
What this PR does / why we need it:
Issue: When viewing the details of the drift-detector on the PipeCD console, the order of subnets in the live state (red) matches the defined resource (servicedef.yaml), but the Git state (green) shows subnets in reverse order.
Investigation: After reviewing the AWS DescribeServices documentation, I found no evidence that AWS guarantees any sorting of subnets in the returned live state. It appears that PipeCD fetches the live state using DescribeServices.
Proposed Solution: I suggest adding explicit sorting of subnets in PipeCD before performing comparisons in the drift detector to avoid confusion.
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?: No