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

[BUGFIX] Fix usage stats events #3857

Merged
merged 5 commits into from
Dec 15, 2021

Conversation

anthonyburdi
Copy link
Member

Changes proposed in this pull request:

  • Fixes an issue that was throwing a KeyError when running UsageStatisticsHandler.emit, preventing events from being sent
  • Adds a test that ensures common messages are sent by checking for errors in the log
  • There will be further PRs with additional tests, see GREAT-440 for a complete listing

Definition of Done

Please delete options that are not relevant.

  • My code follows the Great Expectations style guide
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added unit tests where applicable and made sure that new and existing tests are passing.
  • I have run any local integration tests and made sure that nothing is broken.

Thank you for submitting!

@anthonyburdi anthonyburdi self-assigned this Dec 15, 2021
@netlify
Copy link

netlify bot commented Dec 15, 2021

✔️ Deploy Preview for niobium-lead-7998 ready!

🔨 Explore the source changes: 5f579f5

🔍 Inspect the deploy log: https://app.netlify.com/sites/niobium-lead-7998/deploys/61ba2639b576860007042bbc

😎 Browse the preview: https://deploy-preview-3857--niobium-lead-7998.netlify.app

@github-actions
Copy link
Contributor

HOWDY! This is your friendly 🤖 CHANGELOG bot 🤖

Please don't forget to add a clear and succinct description of your change under the Develop header in docs_rtd/changelog.rst, if applicable. This will help us with the release process. See the Contribution checklist in the Great Expectations documentation for the type of labels to use!

Thank you!

@@ -187,7 +189,7 @@ def build_envelope(self, message):
+ "Z"
)

event_duration_property_name: str = f'{message["event_name"]}.duration'.replace(
event_duration_property_name: str = f'{message["event"]}.duration'.replace(
Copy link
Contributor

@alexsherstinsky alexsherstinsky Dec 15, 2021

Choose a reason for hiding this comment

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

@anthonyburdi I am sure you are right -- it just seems a little surprising that it has worked with our "standard" tests before (with the key being "event_name") -- are you sure about this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought so too, but this was a recent addition in #3729 - we have used event_name as a parameter in many places but the key has always been event.

Copy link
Contributor

Choose a reason for hiding this comment

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

@anthonyburdi So maybe that was the issue, meaning that while the schema and message tests worked, the events were never actually emitted?.. Is that what is happening here?

Copy link
Contributor

@alexsherstinsky alexsherstinsky left a comment

Choose a reason for hiding this comment

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

Just one question there...

Copy link
Contributor

@alexsherstinsky alexsherstinsky left a comment

Choose a reason for hiding this comment

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

LGTM

@anthonyburdi anthonyburdi enabled auto-merge (squash) December 15, 2021 17:59
@anthonyburdi anthonyburdi merged commit 4b603cd into develop Dec 15, 2021
@anthonyburdi anthonyburdi deleted the BUGFIX/none/GREAT-440/fix_usage_stats_events branch December 15, 2021 18:09
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.

2 participants