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

[MAINTENANCE] Log service as gx-cloud if using cloud-mode #10651

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from

Conversation

TrangPham
Copy link
Contributor

  • 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, visit our community resources.

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!

Copy link

netlify bot commented Nov 9, 2024

Deploy Preview for niobium-lead-7998 canceled.

Name Link
🔨 Latest commit 257adf2
🔍 Latest deploy log https://app.netlify.com/sites/niobium-lead-7998/deploys/673e1b7277fac10008cb077f

Copy link

codecov bot commented Nov 9, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
27276 1 27275 4782
View the top 1 failed tests by shortest run time
tests.analytics.test_analytics::test_cloud_context_init
Stack Traces | 0.034s run time
cloud_api_fake = <responses.RequestsMock object at 0x7efd43654a60>
cloud_details = CloudDetails(base_url='https://app.greatexpectations.fake.io/', org_id='12345678-1234-5678-1234-567812345678', access_...yJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c')
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7efd439a6d00>

    @pytest.mark.cloud
    def test_cloud_context_init(cloud_api_fake, cloud_details, monkeypatch):
        monkeypatch.setattr(ENV_CONFIG, "gx_analytics_enabled", True)  # Enable usage stats
    
        with (
            mock.patch(
                "great_expectations.data_context.data_context.cloud_data_context.init_analytics"
            ) as mock_init,
            mock.patch("posthog.capture") as mock_submit,
        ):
            context = gx.get_context(
                cloud_access_token=cloud_details.access_token,
                cloud_organization_id=cloud_details.org_id,
                cloud_base_url=cloud_details.base_url,
                cloud_mode=True,
                mode="cloud",
            )
>           assert isinstance(context, gx.CloudDataContext)
E           AttributeError: module 'great_expectations' has no attribute 'CloudDataContext'

tests/analytics/test_analytics.py:158: AttributeError

To view more test analytics, go to the Test Analytics Dashboard
Got feedback? Let us know on Github

Copy link
Contributor

@wookasz wookasz left a comment

Choose a reason for hiding this comment

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

We still want to be able to distinguish between GX Core API (notebook/script) usage and internal GX Cloud usage.

@TrangPham TrangPham marked this pull request as ready for review November 20, 2024 07:59
@TrangPham TrangPham requested a review from wookasz November 20, 2024 07:59
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