Skip to content

Commit 123770d

Browse files
authored
pipelines run: remove --refresh-all flag (#3284)
## Changes Remove the --refresh-all flag from pipelines run ## Why As mentioned in the bug bash, pipelines run -–refresh-all=false still does a refresh-all, which is the default for run. The flag becomes redundant. OSS is also omitting this flag. ## Tests Remove --refresh-all flags from pipelines
1 parent 0c87157 commit 123770d

File tree

3 files changed

+2
-21
lines changed

3 files changed

+2
-21
lines changed

acceptance/pipelines/run/refresh-flags/output.txt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,6 @@ Deploying resources...
55
Updating deployment state...
66
Deployment complete!
77

8-
=== Running pipeline with --refresh-all flag
9-
>>> [PIPELINES] run --refresh-all
10-
Update URL: [DATABRICKS_URL]/#joblist/pipelines/[UUID]/updates/[UUID]
11-
12-
13-
>>> print_requests
14-
{
15-
"body": {},
16-
"method": "POST",
17-
"path": "/api/2.0/pipelines/[UUID]/updates"
18-
}
19-
208
=== Running pipeline with --refresh flag and specific tables
219
>>> [PIPELINES] run --refresh table1,table2
2210
Update URL: [DATABRICKS_URL]/#joblist/pipelines/[UUID]/updates/[UUID]

acceptance/pipelines/run/refresh-flags/script

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ print_requests() {
66
trace $PIPELINES deploy
77
rm out.requests.txt
88

9-
title "Running pipeline with --refresh-all flag"
10-
# Should perform a full graph update (empty refresh_selection and full_refresh_selection implies refresh_all)
11-
trace $PIPELINES run --refresh-all
12-
trace print_requests
13-
149
title "Running pipeline with --refresh flag and specific tables"
1510
# Should refresh only the specified tables
1611
trace $PIPELINES run --refresh table1,table2

cmd/pipelines/run.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,15 @@ func runCommand() *cobra.Command {
2828
Short: "Run a pipeline",
2929
Long: `Run the pipeline identified by KEY.
3030
KEY is the unique name of the pipeline to run, as defined in its YAML file.
31-
If there is only one pipeline in the project, KEY is optional and the pipeline will be auto-selected.`,
31+
If there is only one pipeline in the project, KEY is optional and the pipeline will be auto-selected.
32+
Refreshes all tables in the pipeline unless otherwise specified.`,
3233
}
3334

34-
var refreshAll bool
3535
var refresh []string
3636
var fullRefreshAll bool
3737
var fullRefresh []string
3838

3939
pipelineGroup := cmdgroup.NewFlagGroup("Pipeline Run")
40-
pipelineGroup.FlagSet().BoolVar(&refreshAll, "refresh-all", false, "Perform a full graph run.")
4140
pipelineGroup.FlagSet().StringSliceVar(&refresh, "refresh", nil, "List of tables to run.")
4241
pipelineGroup.FlagSet().BoolVar(&fullRefreshAll, "full-refresh-all", false, "Perform a full graph reset and recompute.")
4342
pipelineGroup.FlagSet().StringSliceVar(&fullRefresh, "full-refresh", nil, "List of tables to reset and recompute.")
@@ -94,7 +93,6 @@ If there is only one pipeline in the project, KEY is optional and the pipeline w
9493

9594
runOptions := run.Options{
9695
Pipeline: run.PipelineOptions{
97-
RefreshAll: refreshAll,
9896
Refresh: refresh,
9997
FullRefreshAll: fullRefreshAll,
10098
FullRefresh: fullRefresh,

0 commit comments

Comments
 (0)