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

[FEATURE] Add Checkpoint.run analytics #10382

Merged
merged 7 commits into from
Sep 12, 2024

Conversation

joshua-stauffer
Copy link
Member

  • Description of PR changes above includes a link to an existing GitHub issue
  • PR title is prefixed with one of: [BUGFIX], [FEATURE], [DOCS], [MAINTENANCE], [CONTRIB]
  • Code is linted - run invoke lint (uses ruff format + ruff check)
  • Appropriate tests and docs have been updated

For more information about contributing, see Contribute.

After you submit your PR, keep the page open and monitor the statuses of the various checks made by our continuous integration process at the bottom of the page. Please fix any issues that come up and reach out on Slack if you need help. Thanks for contributing!

@joshua-stauffer joshua-stauffer changed the title Add Checkpoint.run analytics [FEATURE] Add Checkpoint.run analytics Sep 11, 2024
Copy link

netlify bot commented Sep 11, 2024

Deploy Preview for niobium-lead-7998 ready!

Name Link
🔨 Latest commit 7c14248
🔍 Latest deploy log https://app.netlify.com/sites/niobium-lead-7998/deploys/66e3055b9728b10008676963
😎 Deploy Preview https://deploy-preview-10382.docs.greatexpectations.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.87%. Comparing base (e076690) to head (7c14248).
Report is 1 commits behind head on develop.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #10382   +/-   ##
========================================
  Coverage    79.86%   79.87%           
========================================
  Files          460      460           
  Lines        39855    39871   +16     
========================================
+ Hits         31830    31845   +15     
- Misses        8025     8026    +1     
Flag Coverage Δ
3.10 66.70% <100.00%> (+0.01%) ⬆️
3.11 66.70% <100.00%> (-0.01%) ⬇️
3.12 65.31% <100.00%> (-0.01%) ⬇️
3.12 aws_deps 45.93% <62.50%> (+<0.01%) ⬆️
3.12 big 54.57% <62.50%> (+<0.01%) ⬆️
3.12 filesystem 61.02% <100.00%> (+0.01%) ⬆️
3.12 mssql 49.98% <62.50%> (+<0.01%) ⬆️
3.12 mysql 50.04% <62.50%> (+<0.01%) ⬆️
3.12 postgresql 54.26% <100.00%> (+0.01%) ⬆️
3.12 spark 57.77% <100.00%> (+0.01%) ⬆️
3.12 trino 52.38% <100.00%> (+0.01%) ⬆️
3.8 66.74% <100.00%> (-0.01%) ⬇️
3.8 athena or clickhouse or openpyxl or pyarrow or project or sqlite or aws_creds 54.97% <100.00%> (+0.01%) ⬆️
3.8 aws_deps 45.95% <62.50%> (+<0.01%) ⬆️
3.8 big 54.59% <62.50%> (+<0.01%) ⬆️
3.8 databricks 47.36% <100.00%> (+0.02%) ⬆️
3.8 filesystem 61.04% <100.00%> (+0.01%) ⬆️
3.8 mssql 49.96% <62.50%> (+<0.01%) ⬆️
3.8 mysql 50.03% <62.50%> (+<0.01%) ⬆️
3.8 postgresql 54.25% <100.00%> (+0.01%) ⬆️
3.8 snowflake 48.27% <100.00%> (+0.02%) ⬆️
3.8 spark 57.74% <100.00%> (+0.01%) ⬆️
3.8 trino 52.37% <100.00%> (+0.01%) ⬆️
3.9 66.74% <100.00%> (+0.01%) ⬆️
cloud 0.00% <0.00%> (ø)
docs-basic 52.41% <100.00%> (+0.01%) ⬆️
docs-creds-needed 52.72% <100.00%> (+0.01%) ⬆️
docs-spark 52.11% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -6,6 +6,7 @@
DATA_CONTEXT_INITIALIZED: Action = Action("data_context.initialized")
CHECKPOINT_CREATED: Action = Action("checkpoint.created")
CHECKPOINT_DELETED: Action = Action("checkpoint.deleted")
CHECKPOINT_RAN: Action = Action("checkpoint.ran")
Copy link
Contributor

Choose a reason for hiding this comment

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

ran vs run?

Copy link
Member Author

Choose a reason for hiding this comment

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

every analytics action is named in the past tense, so checkpoint.ran is consistent.

Comment on lines 192 to 200
@dataclass
class CheckpointRanEvent(_CheckpointEvent):
_allowed_actions: ClassVar[List[Action]] = [CHECKPOINT_RAN]

def __init__(self, checkpoint_id: str | None = None):
super().__init__(
action=CHECKPOINT_RAN,
checkpoint_id=checkpoint_id,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want additional values (like the validation definition ids)? Are we aligned with Tetris on this?

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'll add them 👍

):
context = mocker.Mock(spec=AbstractDataContext)
set_context(project=context)
mocker.patch("great_expectations.checkpoint.checkpoint.submit_analytics_event")
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have to mock this? Or can we disable usage stats such that we don't even care about this call? I'm pretty confident that CI won't send events like this

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks! i was just trying to do due diligence to not send events from tests, whether from CI or when triggered by a developer, but I can remove this is it isn't necessary.

@joshua-stauffer joshua-stauffer added this pull request to the merge queue Sep 12, 2024
Merged via the queue into develop with commit 6c37615 Sep 12, 2024
68 checks passed
@joshua-stauffer joshua-stauffer deleted the f/v1-498/checkpoint_analytics branch September 12, 2024 15:40
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