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

(logs): Importing log group ignores region #18214

Closed
kornicameister opened this issue Dec 29, 2021 · 5 comments · Fixed by #18215
Closed

(logs): Importing log group ignores region #18214

kornicameister opened this issue Dec 29, 2021 · 5 comments · Fixed by #18215
Assignees
Labels
@aws-cdk/aws-logs Related to Amazon CloudWatch Logs bug This issue is a bug. p1

Comments

@kornicameister
Copy link
Contributor

What is the problem?

Per this comment

It's a bug in the LogGroup.fromLogGroupArn() method - you can see here that the region is not passed from the ARN to the returned Resource, like it should be (here's a working example).

Blocks: #17747

Reproduction Steps

Same as in #

What did you expect to happen?

When imported log group's region is referenced incorrect region is taken into account. A region coming from log group's ARN ought to be taken into account instead of region of the stack.

What actually happened?

Region of the stack where log group is imported in is taken into account.

CDK CLI Version

1.134

Framework Version

No response

Node.js Version

17.1.0

OS

Linux

Language

Typescript, Python, .NET, Java, Go

Language Version

No response

Other information

No response

@kornicameister kornicameister added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 29, 2021
@github-actions github-actions bot added the @aws-cdk/aws-logs Related to Amazon CloudWatch Logs label Dec 29, 2021
kornicameister added a commit to kornicameister/aws-cdk that referenced this issue Dec 29, 2021
When log group is imported it is crucial to preserve an information
about region where log group exists. Without that information it is not possible
to implement cross region logging.

fixes aws#18214
@NGL321
Copy link
Contributor

NGL321 commented Dec 30, 2021

Hey @kornicameister,

Thank you for reporting this, and thank you for submitting a fix!

Before someone takes a look at your PR, I see the listed CLI version is 1.134. Have you confirmed your published fix with the v2 library?

😸 😷

@NGL321 NGL321 added p1 and removed needs-triage This issue or PR still needs to be triaged. labels Dec 30, 2021
@kornicameister
Copy link
Contributor Author

Actually, I haven't thought about that. I just copied details from an issue we ( or more like @skinny85 who confirmed that issue exists) found this one in.
What exactly should I do to cover that fix is published to V2?

@kornicameister
Copy link
Contributor Author

@NGL321 apart from the fact I have submitted a PR against master I don't know how to publish a change against v2.
Would that be sufficient?

@skinny85
Copy link
Contributor

skinny85 commented Jan 3, 2022

@NGL321 apart from the fact I have submitted a PR against master I don't know how to publish a change against v2. Would that be sufficient?

The change will make it to v2 automatically - we have an automated job that merges master to v2-main periodically. So, no need to do anything to get this in v2.

@mergify mergify bot closed this as completed in #18215 Jan 4, 2022
mergify bot pushed a commit that referenced this issue Jan 4, 2022
When log group is imported it is crucial to preserve an information
about region where log group exists. Without that information it is not possible
to implement cross region logging.

fixes #18214

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

github-actions bot commented Jan 4, 2022

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this issue Feb 21, 2022
When log group is imported it is crucial to preserve an information
about region where log group exists. Without that information it is not possible
to implement cross region logging.

fixes aws#18214

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-logs Related to Amazon CloudWatch Logs bug This issue is a bug. p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants