Skip to content

Conversation

david-leifker
Copy link
Collaborator

No description provided.

@github-actions github-actions bot added product PR or Issue related to the DataHub UI/UX devops PR or Issue related to DataHub backend & deployment labels May 5, 2025
@david-leifker david-leifker changed the title fix(): ensure producer kafka config, fix tracking endpoint fix(): DUE Producer Configuration & tracking message validation May 5, 2025
Copy link

alwaysmeticulous bot commented May 5, 2025

✅ Meticulous spotted visual differences in 3 of 1383 screens tested, but all differences have already been approved: view differences detected.

Meticulous evaluated ~8 hours of user flows against your PR.

Last updated for commit fc4b7eb. This comment will update as new commits are pushed.

@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label May 5, 2025
Copy link

codecov bot commented May 5, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2397 1 2396 41
View the full list of 1 ❄️ flaky tests
tests.audit_events.audit_events_test::test_policy_events

Flake rate in main: 28.57% (Passed 5 times, Failed 2 times)

Stack Traces | 30s run time
auth_exclude_filter = {'condition': 'EQUAL', 'field': 'name', 'negated': True, 'values': ['Test Session Token']}

    def test_policy_events(auth_exclude_filter):
        user_session = login_as(admin_user, admin_pass)
        json = {
            "query": """mutation createPolicy($input: PolicyUpdateInput!) {\n
                createPolicy(input: $input) }""",
            "variables": {
                "input": {
                    "type": "METADATA",
                    "name": "Test Metadata Policy",
                    "description": "My Metadaata Policy",
                    "state": "ACTIVE",
                    "resources": {"type": "dataset", "allResources": True},
                    "privileges": ["EDIT_ENTITY_TAGS"],
                    "actors": {
                        "users": ["urn:li:corpuser:datahub", "urn:li:corpuser:admin"],
                        "resourceOwners": False,
                        "allUsers": False,
                        "allGroups": False,
                    },
                }
            },
        }
    
        response = user_session.post(f"{get_frontend_url()}....../api/v2/graphql", json=json)
        response.raise_for_status()
        res_data = response.json()
    
        assert res_data
        assert res_data["data"]
        assert res_data["data"]["createPolicy"]
    
        wait_for_writes_to_sync(consumer_group="datahub-usage-event-consumer-job-client")
    
        new_urn = res_data["data"]["createPolicy"]
    
        update_json = {
            "query": """mutation updatePolicy($urn: String!, $input: PolicyUpdateInput!) {\n
                updatePolicy(urn: $urn, input: $input) }""",
            "variables": {
                "urn": new_urn,
                "input": {
                    "type": "METADATA",
                    "state": "ACTIVE",
                    "name": "Test Metadata Policy",
                    "description": "Updated Metadaata Policy",
                    "privileges": ["EDIT_ENTITY_TAGS", "EDIT_ENTITY_GLOSSARY_TERMS"],
                    "actors": {
                        "resourceOwners": False,
                        "allUsers": True,
                        "allGroups": False,
                    },
                },
            },
        }
    
        response = user_session.post(
            f"{get_frontend_url()}....../api/v2/graphql", json=update_json
        )
        response.raise_for_status()
        res_data = response.json()
    
        # Check updated was submitted successfully
        assert res_data
        assert res_data["data"]
        assert res_data["data"]["updatePolicy"]
        assert res_data["data"]["updatePolicy"] == new_urn
    
        wait_for_writes_to_sync(consumer_group="datahub-usage-event-consumer-job-client")
        res_data = searchForAuditEvents(
            user_session,
            2,
            ["CreatePolicyEvent", "UpdatePolicyEvent"],
            ["urn:li:corpuser:datahub", "urn:li:corpuser:admin"],
            [],
        )
        print(res_data)
        assert res_data
        assert res_data["usageEvents"]
        assert len(res_data["usageEvents"]) == 2
>       assert res_data["usageEvents"][0]["eventType"] == "UpdatePolicyEvent"
E       AssertionError: assert 'CreatePolicyEvent' == 'UpdatePolicyEvent'
E         
E         - UpdatePolicyEvent
E         ? ^^^
E         + CreatePolicyEvent
E         ? ^^^

tests/audit_events/audit_events_test.py:318: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@datahub-cyborg datahub-cyborg bot added pending-submitter-merge and removed needs-review Label for PRs that need review from a maintainer. labels May 6, 2025
@david-leifker
Copy link
Collaborator Author

Failure is a known flaky smoke-test

@david-leifker david-leifker merged commit 131de0f into master May 6, 2025
34 of 35 checks passed
@david-leifker david-leifker deleted the tracking-fixes branch May 6, 2025 15:29
@pedro93 pedro93 added this to the v1.1.0 milestone May 6, 2025
pedro93 added a commit that referenced this pull request May 6, 2025
kartikey-visa pushed a commit to kartikey-visa/datahub that referenced this pull request Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops PR or Issue related to DataHub backend & deployment pending-submitter-merge product PR or Issue related to the DataHub UI/UX release-1.1.0 PRs targeted ro Release 1.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants