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

fix(metrics): metadata and dimensions not cleared on publish #1129

Conversation

shdq
Copy link
Contributor

@shdq shdq commented Oct 21, 2022

Description of your changes

To fix this bug, clearDimensions(); and clearMetadata(); are added to publishStoredMetrics() method to clear metadata and dimensions.

Bug described and reproduced in #1115.

How to verify this change

Related issues, RFCs

Issue number: #1115

PR status

Is this ready for review?: YES
Is it a breaking change?: NO

Checklist

  • My changes meet the tenets criteria
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in areas that should be flagged with a TODO, or hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding changes to the examples
  • My changes generate no new warnings
  • The code coverage hasn't decreased
  • I have added tests that prove my change is effective and works
  • New and existing unit tests pass locally and in Github Actions
  • Any dependent changes have been merged and published in downstream module
  • The PR title follows the conventional commit semantics

Breaking change checklist

  • I have documented the migration process
  • I have added, implemented necessary warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@github-actions github-actions bot added the bug Something isn't working label Oct 21, 2022
Copy link
Contributor

@dreamorosi dreamorosi 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 for your contribution.

The changes seem appropriate to me and the automated checks are green.

I have requested a second review by one of the other maintainers before merging.

@shdq
Copy link
Contributor Author

shdq commented Oct 24, 2022

Thank you, Andrea @dreamorosi. If you need help with other issues, feel free to mention me.

flochaz
flochaz previously approved these changes Oct 24, 2022
@flochaz flochaz dismissed their stale review October 24, 2022 12:17

Doubt on Unit test . neeed a sec to review

@shdq
Copy link
Contributor Author

shdq commented Oct 26, 2022

Hello @flochaz, what is your doubt? Should I add more or fix existing tests?

@flochaz
Copy link
Contributor

flochaz commented Oct 26, 2022

Hello @flochaz, what is your doubt? Should I add more or fix existing tests?

Sorry got dragged on something else. Double checked and all good. approving. thx a lot for the work

@dreamorosi dreamorosi merged commit b209c30 into aws-powertools:main Oct 26, 2022
@dreamorosi
Copy link
Contributor

Hi @shdq, the PR is merged and the change will be available in the next release. Congrats for getting your first PR merged in this project 🎉

To answer your question, I would start with issues that have the good-first-issue, or consider this one. If instead there's any other issue that interests you (except ones for Parameters & Idempotency which are already been worked on), feel free to comment under it & tag me and I'll be happy to give you more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants