Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/unreleased/fixed-20260415-120000.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: fixed
body: Remove hardcoded "Created by fab" and "Imported from fab" descriptions from mkdir and import commands
time: 2026-04-15T12:00:00.000000000Z
custom:
Author: HasanAboShally
AuthorLink: https://github.com/HasanAboShally
1 change: 0 additions & 1 deletion src/fabric_cli/commands/fs/impor/fab_fs_import_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ def _import_create_environment_item(

item_payload: dict = {
"type": str(item.item_type),
"description": "Imported from fab",
"displayName": item.short_name,
"folderId": item.folder_id,
}
Comment thread
HasanAboShally marked this conversation as resolved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ def exec(connection: VirtualWorkspaceItem, args: Namespace) -> None:

# Base payload
payload = {
"description": "Created by fab",
Comment thread
HasanAboShally marked this conversation as resolved.
"displayName": connection.short_name,
"connectivityType": connectivityType,
}
Comment thread
HasanAboShally marked this conversation as resolved.
Expand Down
1 change: 0 additions & 1 deletion src/fabric_cli/commands/fs/mkdir/fab_fs_mkdir_folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def exec(folder: Folder, args: Namespace) -> str | None:
utils_ui.print_grey(f"Creating a new Folder...")

payload = {
"description": "Created by fab",
"displayName": foldername,
}
if parent_folder_id:
Expand Down
5 changes: 3 additions & 2 deletions src/fabric_cli/commands/fs/mkdir/fab_fs_mkdir_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ def exec(gateway: VirtualWorkspaceItem, args: Namespace) -> None:
}

payload = {
# "description": "Created by fab",
"displayName": gateway.short_name,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

shouldn't we add the "description" in the payload if user provided it?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

same question for other types

"capacityId": params.get("capacityid"),
"inactivityMinutesBeforeSleep": params.get("inactivityminutesbeforesleep", 30),
Expand All @@ -96,7 +95,9 @@ def exec(gateway: VirtualWorkspaceItem, args: Namespace) -> None:
response = gateway_api.create_gateway(args, payload=json.dumps(payload))
if response.status_code in (200, 201):
data = json.loads(response.text)
utils_ui.print_output_format(args, message=f"'{gateway.name}' created", data=data, show_headers=True)
utils_ui.print_output_format(
args, message=f"'{gateway.name}' created", data=data, show_headers=True
)
gateway._id = data["id"]

# Add to mem_store
Expand Down
1 change: 0 additions & 1 deletion src/fabric_cli/commands/fs/mkdir/fab_fs_mkdir_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def exec(item: Item, args: Namespace) -> str | None:
utils.remove_keys_from_dict(params, ["displayname", "type"])

payload = {
"description": "Created by fab",
"displayName": item_name,
"type": str(item_type),
"folderId": item.folder_id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,12 @@ def exec(managed_private_endpoint: VirtualItem, args: Namespace) -> None:
"name": managed_private_endpoint_name,
"targetPrivateLinkResourceId": params.get("targetprivatelinkresourceid"),
"targetSubresourceType": params.get("targetsubresourcetype"),
"requestMessage": "Created by fab",
}

args.ws_id = managed_private_endpoint.workspace.id

response = managed_private_endpoint_api.create_managed_private_endpoint(
args, payload= json.dumps(payload)
args, payload=json.dumps(payload)
)
if response.status_code in (200, 201):
data = json.loads(response.text)
Expand Down Expand Up @@ -126,7 +125,7 @@ def exec(managed_private_endpoint: VirtualItem, args: Namespace) -> None:
_args
)
if response.status_code == 200:
result_message=f"'{managed_private_endpoint.name}' approved"
result_message = f"'{managed_private_endpoint.name}' approved"
else:
raise Exception("Approval failed")
except Exception:
Expand All @@ -135,4 +134,6 @@ def exec(managed_private_endpoint: VirtualItem, args: Namespace) -> None:
fab_constant.ERROR_OPERATION_FAILED,
)

Comment thread
HasanAboShally marked this conversation as resolved.
utils_ui.print_output_format(args, message=result_message, data=data, show_headers=True)
utils_ui.print_output_format(
args, message=result_message, data=data, show_headers=True
)
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ def exec(workspace: Workspace, args: Namespace) -> None:
utils.remove_keys_from_dict(args.params, ["displayName"])
Comment thread
HasanAboShally marked this conversation as resolved.
Outdated

payload = {
"description": "Created by fab",
"displayName": workspace.short_name,
}
payload.update(args.params)
Comment thread
HasanAboShally marked this conversation as resolved.
Outdated
Expand Down
1 change: 0 additions & 1 deletion src/fabric_cli/utils/fab_cmd_import_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def get_payload_for_item_type(
definition = _build_definition(path, input_format)
return {
"type": str(item.item_type),
"description": "Imported from fab",
"folderId": item.folder_id,
"displayName": item.short_name,
"definition": definition,
Expand Down
Loading
Loading