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

Workaround new long ARNs #1165

Merged
merged 1 commit into from
Mar 16, 2021
Merged

Conversation

tyrken
Copy link
Contributor

@tyrken tyrken commented Oct 22, 2020

This patch should work around the new long ARNs that AWS are creating by default now (not next year as I had thought in #1156). It seems if you don't explicitly opt-out of the long ARNs you get them now, but you can opt out again manually.

We're actually using this server-side fix rebased to an older empire version, but it should also work in latest master I hope...

@sonarcloud
Copy link

sonarcloud bot commented Oct 22, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link

@Lowercases Lowercases left a comment

Choose a reason for hiding this comment

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

We've a similar patch on our ecs library, it works with the new arns.

@oliviagunton
Copy link

Hello all (hi @aengelas, nice to see a familiar face here!)

Any chance we could get this approved and merged? AWS is removing the ability to opt out of the long ARN format at the end of this month.

@aengelas
Copy link
Contributor

Hey Olivia :-) Unfortunately, CircleCI won't build this because no one was following it it :-/ I fixed that; @tyrken any chance you can rebase and re-push this PR to trigger a new CircleCI build?

If we don't get a response, I can make a new a new PR with the changes.

@isobit
Copy link

isobit commented Mar 15, 2021

Looks good to me, but I just wanted to point out that this change means empire extracts <cluster>/<name> as service/task names from ARNs rather than just <name>. Luckily the ECS API accepts that for serviceName etc., but as far as I can tell that's not documented.

For example, ListTasksPages(Cluster: "cluster", ServiceName: "acme-inc-web") will become ListTasksPages(Cluster: "cluster", ServiceName: "cluster/acme-inc-web")

This isn't strictly necessary but it might also be worth updating the tests in cloudformation_test.go to use the long ARN format instead, since that'll be the only format going forward.

@aengelas aengelas merged commit 30eb747 into remind101:master Mar 16, 2021
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.

5 participants