Skip to content

Profiler CLI #1623

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

Open
wants to merge 11 commits into
base: feature/synapse_data_collector
Choose a base branch
from

Conversation

sundarshankar89
Copy link
Collaborator

@sundarshankar89 sundarshankar89 commented Jun 3, 2025

Changes

What does this PR do?

This introduces the intial version of CLI

Relevant implementation details

Caveats/things to watch out for when reviewing:

Linked issues

Resolves #..

Functionality

  • added relevant user documentation
  • added new CLI command
  • modified existing command: databricks labs remorph ...
  • ... +add your own

Tests

  • manually tested
  • added unit tests
  • added integration tests

@sundarshankar89 sundarshankar89 requested a review from a team as a code owner June 3, 2025 20:19
@sundarshankar89 sundarshankar89 changed the base branch from main to feature/synapse_data_collector June 3, 2025 20:19
Copy link

github-actions bot commented Jun 3, 2025

✅ 19/19 passed, 1m20s total

Running from acceptance #1134

labs.yml Outdated
@@ -67,8 +67,11 @@ commands:
- name: debug-me
description: "[INTERNAL] Debug SDK connectivity"
- name: install-assessment
description: "Install Assessment"
description: "[EXPERIMENTAL] Install Assessment"
Copy link
Collaborator

Choose a reason for hiding this comment

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

What does Install assessment do?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

may be configure-assessment would be better word, it configures crednetials

Copy link
Collaborator

@gueniai gueniai Jun 3, 2025

Choose a reason for hiding this comment

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

These credentials are the same we would use for Reconcile, no? Can we call it configure-source-credentials or something purposeful like that?

Comment on lines 112 to 114
logger.info(
f"Creating a virtual environment for Python script execution: ${venv_dir} for step: {step.name}"
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Stray $, maybe reword:

Suggested change
logger.info(
f"Creating a virtual environment for Python script execution: ${venv_dir} for step: {step.name}"
)
logger.info(f"Creating a virtual environment for Python script execution, step {step.name}: {venv_dir}")

Comment on lines 125 to 126
run([str(venv_pip), "install", "--upgrade", "pip"], check=True, stdout=DEVNULL, stderr=DEVNULL)
run([str(venv_pip), "install", *dependencies], check=True, stdout=DEVNULL, stderr=DEVNULL)
Copy link
Contributor

Choose a reason for hiding this comment

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

Before we drop the pip output, I think I'd like to see us passing these options:

  • --require-virtualenv (safety)
  • --quiet (suppress normal output, but warning and higher will be emitted).
  • --no-input (we're non-interactive at this point)
  • --disable-pip-version-check (the check should be redundant, maybe its faster without)

In particular with --quiet I think maybe it's better to leave stdout and stderr alone so that we do get warnings, etc.

If this works I'll add the same to the transpiler side of things.

from databricks.labs.remorph.assessments.profiler import Profiler


def test_supported_source_technologies():
Copy link
Contributor

Choose a reason for hiding this comment

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

Remember to add -> None to the test declarations, otherwise the bodies aren't type-checked.

…ntry_point

# Conflicts:
#	src/databricks/labs/lakebridge/assessments/profiler.py
#	src/databricks/labs/lakebridge/cli.py
Copy link

github-actions bot commented Jun 8, 2025

✅ 14/14 passed, 1 skipped, 51s total

Running from acceptance #1162

@@ -61,3 +61,7 @@ commands:
default: null
- name: configure-reconcile
description: "Configure Necessary Reconcile Dependencies"
- name: execute-databse-profiler
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo in "database"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants