Skip to content

Commit

Permalink
fix other usage
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 committed Jan 10, 2025
1 parent dc5171e commit 7c6b6e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metadata-ingestion/src/datahub/cli/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def dataplatform2instance_func(

if not force and not dry_run:
# get a confirmation from the operator before proceeding if this is not a dry run
sampled_urns_to_migrate = random.choices(
sampled_urns_to_migrate = random.sample(

Check warning on line 182 in metadata-ingestion/src/datahub/cli/migrate.py

View check run for this annotation

Codecov / codecov/patch

metadata-ingestion/src/datahub/cli/migrate.py#L182

Added line #L182 was not covered by tests
urns_to_migrate, k=min(10, len(urns_to_migrate))
)
sampled_new_urns: List[str] = [
Expand All @@ -193,7 +193,7 @@ def dataplatform2instance_func(
if key
]
click.echo(
f"Will migrate {len(urns_to_migrate)} urns such as {random.choices(urns_to_migrate, k=min(10, len(urns_to_migrate)))}"
f"Will migrate {len(urns_to_migrate)} urns such as {random.sample(urns_to_migrate, k=min(10, len(urns_to_migrate)))}"
)
click.echo(f"New urns will look like {sampled_new_urns}")
click.confirm("Ok to proceed?", abort=True)
Expand Down

0 comments on commit 7c6b6e6

Please sign in to comment.