Skip to content

Commit d10702a

Browse files
authored
Rename workflows to jobs in the bundle explorer UI (#1591)
## Changes This change renames workflows to jobs in the bundle explorer UI to align with the terminology used in the Databricks UI. Note that we still have "run file as workflow" command and `databricks-workflow` launch config - decided to leave it as is to not break existing users' workflows (and it's still a correct term in that context) ## Tests Manually and existing integ tests
1 parent dbbaa00 commit d10702a

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

packages/databricks-vscode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@
234234
{
235235
"command": "databricks.bundle.deployAndRunJob",
236236
"icon": "$(run)",
237-
"title": "Deploy the bundle and run the workflow",
237+
"title": "Deploy the bundle and run the job",
238238
"enablement": "databricks.context.activated && databricks.context.bundle.isTargetSet && databricks.context.bundle.deploymentState == idle",
239239
"category": "Databricks"
240240
},

packages/databricks-vscode/src/test/e2e/bundle_sub_folder.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ describe("Bundle in a sub folder", async function () {
111111
async () => {
112112
const job = await getResourceViewItem(
113113
resourceExplorerView,
114-
"Workflows",
114+
"Jobs",
115115
jobs[folder].name!
116116
);
117117
return job !== undefined;

packages/databricks-vscode/src/test/e2e/deploy_and_run_job.e2e.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ describe("Deploy and run job", async function () {
7070

7171
const jobItem = await getResourceViewItem(
7272
resourceExplorerView,
73-
"Workflows",
73+
"Jobs",
7474
jobName
7575
);
7676
assert(jobItem, `Job ${jobName} not found in resource explorer`);
7777

7878
const deployAndRunButton = await jobItem.getActionButton(
79-
"Deploy the bundle and run the workflow"
79+
"Deploy the bundle and run the job"
8080
);
8181
assert(deployAndRunButton, "Deploy and run button not found");
8282
await deployAndRunButton.elem.click();
@@ -85,7 +85,7 @@ describe("Deploy and run job", async function () {
8585

8686
await waitForRunStatus(
8787
resourceExplorerView,
88-
"Workflows",
88+
"Jobs",
8989
jobName,
9090
"Success"
9191
);

packages/databricks-vscode/src/test/e2e/refresh_resource_explorer_on_yml_change.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ describe("Automatically refresh resource explorer", async function () {
9090
async () => {
9191
const job = await getResourceViewItem(
9292
resourceExplorerView,
93-
"Workflows",
93+
"Jobs",
9494
jobDef.name!
9595
);
9696
return job !== undefined;

packages/databricks-vscode/src/test/e2e/utils/dabsExplorerUtils.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {CustomTreeSection} from "wdio-vscode-service";
33

44
export async function getResourceViewItem(
55
resourceExplorer: CustomTreeSection,
6-
resourceType: "Workflows" | "Pipelines",
6+
resourceType: "Jobs" | "Pipelines",
77
resourceName: string
88
) {
99
const jobs = await resourceExplorer.openItem(resourceType);
@@ -21,7 +21,7 @@ export async function geTaskViewItem(
2121
) {
2222
const tasks = await getResourceSubItems(
2323
resourceExplorerView,
24-
"Workflows",
24+
"Jobs",
2525
resourceName,
2626
"Tasks"
2727
);
@@ -34,7 +34,7 @@ export async function geTaskViewItem(
3434

3535
export async function getResourceSubItems(
3636
resourceExplorerView: CustomTreeSection,
37-
resourceType: "Workflows" | "Pipelines",
37+
resourceType: "Jobs" | "Pipelines",
3838
resourceName: string,
3939
...subItemNames: string[]
4040
) {
@@ -56,8 +56,8 @@ export async function getResourceSubItems(
5656

5757
export async function waitForRunStatus(
5858
resourceExplorerView: CustomTreeSection,
59-
resourceType: "Workflows" | "Pipelines",
60-
resorceName: string,
59+
resourceType: "Jobs" | "Pipelines",
60+
resourceName: string,
6161
successLabel: string,
6262
timeout: number = 120_000
6363
) {
@@ -67,10 +67,10 @@ export async function waitForRunStatus(
6767
const item = await getResourceViewItem(
6868
resourceExplorerView,
6969
resourceType,
70-
resorceName
70+
resourceName
7171
);
7272
if (item === undefined) {
73-
console.log(`Item ${resorceName} not found`);
73+
console.log(`Item ${resourceName} not found`);
7474
return false;
7575
}
7676

packages/databricks-vscode/src/ui/bundle-resource-explorer/BundleCommands.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -226,22 +226,22 @@ export class BundleCommands implements Disposable {
226226
type: "pipelines",
227227
key: `pipelines.${key}`,
228228
}));
229-
const workflows = remoteState?.resources?.jobs ?? {};
230-
const workflowItems = Object.keys(workflows).map((key) => ({
229+
const jobs = remoteState?.resources?.jobs ?? {};
230+
const jobItems = Object.keys(jobs).map((key) => ({
231231
label: key,
232-
description: "Workflow",
232+
description: "Job",
233233
type: "jobs",
234234
}));
235-
if (pipelineItems.length === 0 && workflowItems.length === 0) {
235+
if (pipelineItems.length === 0 && jobItems.length === 0) {
236236
window.showErrorMessage(
237-
"No pipelines or workflows found in the bundle."
237+
"No pipelines or jobs found in the bundle."
238238
);
239239
return;
240240
}
241241
const pick = await window.showQuickPick(
242-
[...pipelineItems, ...workflowItems],
242+
[...pipelineItems, ...jobItems],
243243
{
244-
placeHolder: "Select a pipeline or workflow to run",
244+
placeHolder: "Select a pipeline or a job to run",
245245
}
246246
);
247247
if (!pick) {

packages/databricks-vscode/src/ui/bundle-resource-explorer/ResourceTypeHeaderTreeNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function humaniseResourceType(type: BundleResourceExplorerTreeNode["type"]) {
2020
case "pipelines":
2121
return "Pipelines";
2222
case "jobs":
23-
return "Workflows";
23+
return "Jobs";
2424
default:
2525
return capitalize(type).replace(/_/g, " ");
2626
}

0 commit comments

Comments
 (0)