Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort subnet in live manifest of ECS Drift Detection #5254

Merged

Conversation

HoangNguyen689
Copy link
Contributor

@HoangNguyen689 HoangNguyen689 commented Oct 4, 2024

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

  • How are users affected by this change: The diff will be changed on the ECS app.
  • Is this breaking change: No
  • How to migrate (if breaking change):

@t-kikuc
Copy link
Member

t-kikuc commented Oct 4, 2024

@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

@HoangNguyen689
Copy link
Contributor Author

@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.

Signed-off-by: HoangNguyen689 <ndhoang.bk.hedspi@gmail.com>
@HoangNguyen689 HoangNguyen689 force-pushed the remove-order-subnet-in-head-manifest branch from ff48a12 to 543beaf Compare October 4, 2024 09:50
@HoangNguyen689 HoangNguyen689 changed the title Remove subnet ordering in head manifest of ECS Drift Detection Sort subnet in live manifest of ECS Drift Detection Oct 4, 2024
@HoangNguyen689
Copy link
Contributor Author

@t-kikuc
I just changed to sort both the live state and the head manifest!

@t-kikuc
Copy link
Member

t-kikuc commented Oct 4, 2024

@HoangNguyen689
thank you!
I also think no sorting is ideal,
but let me ask AWS support.

@t-kikuc t-kikuc added kind/bug Something isn't working cherry-pick v0.49.1 labels Oct 4, 2024
@t-kikuc
Copy link
Member

t-kikuc commented Oct 7, 2024

@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.

Copy link
Member

@t-kikuc t-kikuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

Sorting both live and head is safer for the future.

@t-kikuc t-kikuc enabled auto-merge (squash) October 7, 2024 00:27
@t-kikuc t-kikuc removed the kind/bug Something isn't working label Oct 7, 2024
Copy link
Contributor

@Warashi Warashi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@t-kikuc t-kikuc merged commit 2fc66fa into pipe-cd:master Oct 7, 2024
14 checks passed
github-actions bot pushed a commit that referenced this pull request Oct 8, 2024
Signed-off-by: HoangNguyen689 <ndhoang.bk.hedspi@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>
t-kikuc added a commit that referenced this pull request Oct 8, 2024
#5263 (#5265)

* Fix panic in ECS driftdetection when a taskdef in livestates does not exist (#5240)

* Generate v0.49.x docs

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* fix: avoid panic when live taskdef does not exist

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

---------

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Upgrade aws-sdk-go-v2 (#5241)

* Generate v0.49.x docs

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* upgrade aws-sdk-go-v2

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* upgrade aws-sdk-go-v2/**/*

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* fix compile errors caused by the breaking change

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* fix a test due to added RestartPolicy

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* fix: avoid panic when live taskdef does not exist

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* fix go.sum by `make update/go-deps`

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

---------

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Remove an unused field 'configFilePathInGitRepo' (#5248)

* Generate v0.49.x docs

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* remove unused field 'configFilePathInGitRepo'

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

---------

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Support fetching a piped config from AWS SSM Parameter Store (#5249)

* Generate v0.49.x docs

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* add --aws-ssm-parameter

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* add config-aws-ssm-parameter to piped

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* update docs of runtime options

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

---------

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Remove subnet ordering in head manifest (#5254)

Signed-off-by: HoangNguyen689 <ndhoang.bk.hedspi@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Update quickstart header note (#5255)

Signed-off-by: khanhtc1202 <khanhtc1202@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Update feature status (#5256)

Signed-off-by: khanhtc1202 <khanhtc1202@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Support directly designating a gitSSHKey instead of File for launcher (#5258)

* Generate v0.49.x docs

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* add --git-ssh-key-env

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* update docs: add '--git-ssh-key-env'

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* add '\n' at the end of ssh key

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* Directly use data instead of env

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* Clarify the flag description

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* fix error message:  'and' -> 'or'

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

---------

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Add workflow steps to build and publish quickstart manifests (#5260)

Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Update workflow not to run by matrix (#5262)

Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

* Update RELEASE to v0.49.1 and update v0.49.x docs (#5263)

* update RELEASE to v0.49.1

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

* update docs of v0.49.x by `make release version=v0.49.1`

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>

---------

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>

---------

Signed-off-by: t-kikuc <tkikuchi07f@gmail.com>
Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>
Signed-off-by: HoangNguyen689 <ndhoang.bk.hedspi@gmail.com>
Signed-off-by: khanhtc1202 <khanhtc1202@gmail.com>
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Co-authored-by: Tetsuya Kikuchi <97105818+t-kikuc@users.noreply.github.com>
Co-authored-by: HoangNguyen689 <ndhoang.bk.hedspi@gmail.com>
Co-authored-by: Khanh Tran <32532742+khanhtc1202@users.noreply.github.com>
Co-authored-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants