Thanks to visit codestin.com
Credit goes to github.com

Skip to content

implement resource tag api for cloudwatch logs #7389

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

Merged
merged 2 commits into from
Dec 24, 2022
Merged

Conversation

steffyP
Copy link
Member

@steffyP steffyP commented Dec 23, 2022

This PR tackles the new API for resource tagging in cloudwatch logs, which was not yet implemented.
It is part of a fix for #7378.

The implementation relies on #7086 where the botocore/boto3 lib is upgraded.

The PR includes:

  • new store for logs
  • implementation of new resource-tagging APIs
  • override old tagging APIs (previously handled by moto), for easier accessing of tags (both APIs should return the same output)
  • snapshot test

TODO

@steffyP steffyP temporarily deployed to localstack-ext-tests December 23, 2022 10:29 — with GitHub Actions Inactive
@coveralls
Copy link

coveralls commented Dec 23, 2022

Coverage Status

Coverage: 84.794% (+0.04%) from 84.756% when pulling 960f0e7 on cloudwatch_tags into 39ec690 on master.

@github-actions
Copy link

github-actions bot commented Dec 23, 2022

LocalStack integration with Pro

       1 files   -     1         1 suites   - 1   1h 2m 58s ⏱️ - 14m 28s
1 561 tests  -   16  1 275 ✔️  -   26  285 💤 +    9  1 +1 
1 561 runs   - 331  1 275 ✔️  - 198  285 💤  - 134  1 +1 

For more details on these failures, see this check.

Results for commit e85e4ac. ± Comparison against base commit 39ec690.

♻️ This comment has been updated with latest results.

@alexrashed alexrashed temporarily deployed to localstack-ext-tests December 23, 2022 12:36 — with GitHub Actions Inactive
Copy link
Member

@alexrashed alexrashed left a comment

Choose a reason for hiding this comment

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

Awesome! A new set of operations. It's great to see how clean the implementations (provider and tests) are now with all our frameworks in place. 🚀



def get_moto_logs_backend(account_id: str = None, region_name: str = None) -> MotoLogsBackend:
account_id = account_id or DEFAULT_AWS_ACCOUNT_ID
Copy link
Member

Choose a reason for hiding this comment

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

nit: I think using the DEFAULT_AWS_ACCOUNT_ID might not be best practice anymore.
But I think this function is never called without an explicit region name or account ID, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, you are right - we currently never call it without explicit region/account id. I will remove the defaults here, thanks :)

@steffyP steffyP temporarily deployed to localstack-ext-tests December 23, 2022 13:49 — with GitHub Actions Inactive
@thrau thrau temporarily deployed to localstack-ext-tests December 23, 2022 16:03 — with GitHub Actions Inactive
@thrau thrau temporarily deployed to localstack-ext-tests December 23, 2022 18:20 — with GitHub Actions Inactive
@thrau thrau marked this pull request as ready for review December 24, 2022 20:51
@thrau
Copy link
Member

thrau commented Dec 24, 2022

merging since test failures look unrelated

@thrau thrau merged commit 40fcbd8 into master Dec 24, 2022
@thrau thrau deleted the cloudwatch_tags branch December 24, 2022 20:52
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.

4 participants