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(lineage): error message for edit lineage #12724

Merged
merged 3 commits into from
Feb 25, 2025

Conversation

anshbansal
Copy link
Collaborator

@anshbansal anshbansal commented Feb 25, 2025

  • show proper error message in case user does not have privilege on upstream
  • change some log.debug(String.format to log.debug( on java side
  • move copying war to later as rest of items are less frequently changed. Will very slightly help with dev workflow for gms
  • add note that you need privilege on both upstream and downstream entity when editing lineage.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@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 Feb 25, 2025
@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Feb 25, 2025
Copy link

codecov bot commented Feb 25, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
1872 1 1871 41
View the full list of 1 ❄️ flaky tests
tests.cypress.integration_test::test_run_cypress

Flake rate in main: 11.11% (Passed 32 times, Failed 4 times)

Stack Traces | 886s run time
auth_session = <tests.utils.TestSessionWrapper object at 0x7ff64e169870>

    def test_run_cypress(auth_session):
        # Run with --record option only if CYPRESS_RECORD_KEY is non-empty
        record_key = os.getenv("CYPRESS_RECORD_KEY")
        tag_arg = ""
        test_strategy = os.getenv("TEST_STRATEGY", None)
        if record_key:
            record_arg = " --record "
            batch_number = os.getenv("BATCH_NUMBER")
            batch_count = os.getenv("BATCH_COUNT")
            if batch_number and batch_count:
                batch_suffix = f"-{batch_number}{batch_count}"
            else:
                batch_suffix = ""
            tag_arg = f" --tag {test_strategy}{batch_suffix}"
        else:
            record_arg = " "
    
        print(f"test strategy is {test_strategy}")
        test_spec_arg = ""
        specs_str = ",".join([f"**/{f}" for f in _get_cypress_tests_batch()])
        test_spec_arg = f" --spec '{specs_str}' "
    
        print("Running Cypress tests with command")
        command = f"NO_COLOR=1 npx cypress run {record_arg} {test_spec_arg} {tag_arg}"
        print(command)
        # Add --headed --spec '**/mutations/mutations.js' (change spec name)
        # in case you want to see the browser for debugging
        print_now()
        proc = subprocess.Popen(
            command,
            shell=True,
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE,
            cwd=f"{CYPRESS_TEST_DATA_DIR}",
        )
        assert proc.stdout is not None
        assert proc.stderr is not None
        stdout = proc.stdout.read()
        stderr = proc.stderr.read()
        return_code = proc.wait()
        print(stdout.decode("utf-8"))
        print("stderr output:")
        print(stderr.decode("utf-8"))
        print("return code", return_code)
        print_now()
>       assert return_code == 0
E       assert 1 == 0

tests/cypress/integration_test.py:250: 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.

COPY metadata-models/src/main/resources/entity-registry.yml /datahub/datahub-gms/resources/entity-registry.yml
COPY docker/datahub-gms/start.sh /datahub/datahub-gms/scripts/start.sh
COPY docker/monitoring/client-prometheus-config.yaml /datahub/datahub-gms/scripts/prometheus-config.yaml
RUN chmod +x /datahub/datahub-gms/scripts/start.sh
COPY war.war /datahub/datahub-gms/bin/war.war
Copy link
Collaborator

Choose a reason for hiding this comment

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

i don't know about this flow so not sure if you want to run this by anyone else or if you feel confident

@@ -5,6 +5,8 @@ The UI shows the latest version of the data lineage. The time picker can be used

## Editing from Lineage Graph View

Ensure that you have `Edit lineage` privilege on both upstream and downstream entities before you try to add upstream or downstream lineage.
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice

@datahub-cyborg datahub-cyborg bot added pending-submitter-merge and removed needs-review Label for PRs that need review from a maintainer. labels Feb 25, 2025
@anshbansal anshbansal merged commit 653f9ef into master Feb 25, 2025
178 of 181 checks passed
@anshbansal anshbansal deleted the ab-2025-feb-25-edit-lineage-privilege branch February 25, 2025 13:54
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants