Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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-20260112-143553.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: fixed
body: Fix the job run command so that it exits with status code 1 on failure.
time: 2026-01-12T14:35:53.325666256Z
custom:
Author: aviatco
AuthorLink: https://github.com/aviatco
11 changes: 3 additions & 8 deletions src/fabric_cli/utils/fab_cmd_job_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,11 @@ def wait_for_job_completion(
)
return
elif status == "Failed":
fab_ui.print_output_error(
FabricCLIError(
fab_ui.print_entries_unix_style([content], content.keys(), header=True)
raise FabricCLIError(
ErrorMessages.Common.job_instance_failed(job_ins_id),
fab_constant.ERROR_JOB_FAILED,
),
command=args.command,
output_format_type=args.output_format,
)
fab_ui.print_entries_unix_style([content], content.keys(), header=True)
return
)
elif status in ["NotStarted", "InProgress"]:
fab_ui.print_progress(f"Job instance status: {status}")

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/fabric/gitIntegration/platformProperties/2.0.0/schema.json",
"metadata": {
"type": "Notebook",
"displayName": "example_failed",
"description": "Created by fab - designed to fail for testing"
},
"config": {
"version": "2.0",
"logicalId": "00000000-0000-0000-0000-000000000000"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"microsoft": {
"language": "python",
"language_group": "synapse_pyspark"
}
},
"outputs": [],
"source": [
"# This notebook is designed to fail for testing purposes\n",
"import sys\n",
"from time import sleep\n",
"\n",
"print('Starting notebook execution...')\n",
"sleep(2)\n",
"\n",
"# Intentionally cause a failure\n",
"raise Exception('Intentional failure for testing job failure scenarios')\n",
"\n",
"# This code should never be reached\n",
"print('This should never execute')"
]
}
],
"metadata": {
"dependencies": {},
"kernel_info": {
"name": "synapse_pyspark"
},
"kernelspec": {
"display_name": "synapse_pyspark",
"name": "synapse_pyspark"
},
"language_info": {
"name": "python"
},
"microsoft": {
"language": "python",
"language_group": "synapse_pyspark",
"ms_spell_check": {
"ms_spell_check_language": "en"
}
},
"nteract": {
"version": "nteract-front-end@1.0.0"
},
"spark_compute": {
"compute_id": "/trident/default",
"session_options": {
"conf": {
"spark.synapse.nbs.session.timeout": "1200000"
}
}
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.1.0.rc2 (None; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
body:
string: '{"value": [{"id": "94da8ea5-0bd6-4a9e-b717-5fdb482f4c71", "displayName":
string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName":
"My workspace", "description": "", "type": "Personal"}]}'
headers:
Access-Control-Expose-Headers:
Expand All @@ -26,23 +26,23 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '466'
- '2232'
Content-Type:
- application/json; charset=utf-8
Date:
- Sun, 07 Sep 2025 14:56:16 GMT
- Mon, 19 Jan 2026 13:12:34 GMT
Pragma:
- no-cache
RequestId:
- 44867d1e-b196-408d-a59d-853099d12386
- 4e2c0cb4-ed18-4096-b87b-957a3cbc8192
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- deny
home-cluster-uri:
- https://wabi-west-europe-redirect.analysis.windows.net/
- https://wabi-us-central-b-primary-redirect.analysis.windows.net/
request-redirected:
- 'true'
status:
Expand All @@ -60,12 +60,12 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.1.0.rc2 (None; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
body:
string: '{"value": [{"id": "94da8ea5-0bd6-4a9e-b717-5fdb482f4c71", "displayName":
string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName":
"My workspace", "description": "", "type": "Personal"}]}'
headers:
Access-Control-Expose-Headers:
Expand All @@ -75,23 +75,23 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '466'
- '2232'
Content-Type:
- application/json; charset=utf-8
Date:
- Sun, 07 Sep 2025 14:56:17 GMT
- Mon, 19 Jan 2026 13:12:34 GMT
Pragma:
- no-cache
RequestId:
- b950f45e-3ecd-4ffe-9bd0-8f2bcc83fab1
- 62d5a5a6-f18d-4f82-afb1-1b25b2db2f37
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- deny
home-cluster-uri:
- https://wabi-west-europe-redirect.analysis.windows.net/
- https://wabi-us-central-b-primary-redirect.analysis.windows.net/
request-redirected:
- 'true'
status:
Expand All @@ -109,13 +109,13 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.1.0.rc2 (None; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/capacities
response:
body:
string: '{"value": [{"id": "00000000-0000-0000-0000-000000000004", "displayName":
"mocked_fabriccli_capacity_name", "sku": "F16", "region": "West Europe", "state":
"mocked_fabriccli_capacity_name", "sku": "F32", "region": "Central US", "state":
"Active"}]}'
headers:
Access-Control-Expose-Headers:
Expand All @@ -125,23 +125,23 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '456'
- '425'
Content-Type:
- application/json; charset=utf-8
Date:
- Sun, 07 Sep 2025 14:56:23 GMT
- Mon, 19 Jan 2026 13:12:40 GMT
Pragma:
- no-cache
RequestId:
- 88b1f9a5-c429-4332-a6e0-de57280898d2
- a5664de8-11d6-4182-b695-4db555cb2919
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- deny
home-cluster-uri:
- https://wabi-west-europe-redirect.analysis.windows.net/
- https://wabi-us-central-b-primary-redirect.analysis.windows.net/
request-redirected:
- 'true'
status:
Expand All @@ -162,12 +162,12 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.1.0.rc2 (None; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: POST
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
body:
string: '{"id": "ab04aa79-51eb-45b8-8fa6-c96d985f33e7", "displayName": "fabriccli_WorkspacePerTestclass_000001",
string: '{"id": "4aec0924-bc5a-4b1a-a84b-e7863321d437", "displayName": "fabriccli_WorkspacePerTestclass_000001",
"description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}'
headers:
Access-Control-Expose-Headers:
Expand All @@ -181,21 +181,21 @@ interactions:
Content-Type:
- application/json; charset=utf-8
Date:
- Sun, 07 Sep 2025 14:56:32 GMT
- Mon, 19 Jan 2026 13:12:46 GMT
Location:
- https://api.fabric.microsoft.com/v1/workspaces/ab04aa79-51eb-45b8-8fa6-c96d985f33e7
- https://api.fabric.microsoft.com/v1/workspaces/4aec0924-bc5a-4b1a-a84b-e7863321d437
Pragma:
- no-cache
RequestId:
- 31dc3411-4e07-40c6-9e1b-39aef1d3d5b8
- 2e49777f-790b-4976-9f30-93fe6d4506a9
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- deny
home-cluster-uri:
- https://wabi-west-europe-redirect.analysis.windows.net/
- https://wabi-us-central-b-primary-redirect.analysis.windows.net/
request-redirected:
- 'true'
status:
Expand All @@ -213,13 +213,13 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.1.0.rc2 (job run; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (job run; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
body:
string: '{"value": [{"id": "94da8ea5-0bd6-4a9e-b717-5fdb482f4c71", "displayName":
"My workspace", "description": "", "type": "Personal"}, {"id": "ab04aa79-51eb-45b8-8fa6-c96d985f33e7",
string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName":
"My workspace", "description": "", "type": "Personal"}, {"id": "4aec0924-bc5a-4b1a-a84b-e7863321d437",
"displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created
by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}'
headers:
Expand All @@ -230,23 +230,23 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '498'
- '2266'
Content-Type:
- application/json; charset=utf-8
Date:
- Sun, 07 Sep 2025 15:19:47 GMT
- Mon, 19 Jan 2026 13:14:01 GMT
Pragma:
- no-cache
RequestId:
- ab18667e-4ac1-4f63-af69-69c038a4bea0
- 6573ea3c-6d46-4903-8c4d-26b5a8d933ae
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- deny
home-cluster-uri:
- https://wabi-west-europe-redirect.analysis.windows.net/
- https://wabi-us-central-b-primary-redirect.analysis.windows.net/
request-redirected:
- 'true'
status:
Expand All @@ -264,9 +264,9 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.1.0.rc2 (job run; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (job run; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces/ab04aa79-51eb-45b8-8fa6-c96d985f33e7/items
uri: https://api.fabric.microsoft.com/v1/workspaces/4aec0924-bc5a-4b1a-a84b-e7863321d437/items
response:
body:
string: '{"value": []}'
Expand All @@ -282,19 +282,19 @@ interactions:
Content-Type:
- application/json; charset=utf-8
Date:
- Sun, 07 Sep 2025 15:19:47 GMT
- Mon, 19 Jan 2026 13:14:01 GMT
Pragma:
- no-cache
RequestId:
- afd4579c-aa01-4f03-a8fe-a6c0cf1c64d8
- a8d40339-290e-4252-993e-606957f6c9a7
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- deny
home-cluster-uri:
- https://wabi-west-europe-redirect.analysis.windows.net/
- https://wabi-us-central-b-primary-redirect.analysis.windows.net/
request-redirected:
- 'true'
status:
Expand All @@ -314,9 +314,9 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.1.0.rc2 (job run; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (job run; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: DELETE
uri: https://api.fabric.microsoft.com/v1/workspaces/ab04aa79-51eb-45b8-8fa6-c96d985f33e7
uri: https://api.fabric.microsoft.com/v1/workspaces/4aec0924-bc5a-4b1a-a84b-e7863321d437
response:
body:
string: ''
Expand All @@ -332,19 +332,19 @@ interactions:
Content-Type:
- application/octet-stream
Date:
- Sun, 07 Sep 2025 15:19:47 GMT
- Mon, 19 Jan 2026 13:14:02 GMT
Pragma:
- no-cache
RequestId:
- 4fbb4a9c-fec8-4c41-bd0b-6df06126cb8b
- 4e1f295c-c70b-4ed2-9eb0-33a1e04f30cd
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- deny
home-cluster-uri:
- https://wabi-west-europe-redirect.analysis.windows.net/
- https://wabi-us-central-b-primary-redirect.analysis.windows.net/
request-redirected:
- 'true'
status:
Expand Down
Loading