Skip to content

Commit ab70879

Browse files
committed
Remote backend: Stop setting message when creating runs
Historically, we've used TFC's default run messages as a sort of dumping ground for metadata about the run. We've recently decided to mostly stop doing that, in favor of: - Only specifying the run's source in the default message. - Letting TFC itself handle the default messages. Today, the remote backend explicitly sets a run message, overriding any default that TFC might set. This commit removes that explicit message so we can allow TFC to sort it out. This shouldn't have any bad effect on TFE out in the wild, because it's known how to set a default message for remote backend runs since late 2018.
1 parent f52aec8 commit ab70879

2 files changed

Lines changed: 0 additions & 10 deletions

File tree

‎internal/backend/remote/backend_plan.go‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,14 +273,8 @@ in order to capture the filesystem context the remote workspace expects:
273273
"Failed to upload configuration files", errors.New("operation timed out"))
274274
}
275275

276-
queueMessage := "Queued manually using Terraform"
277-
if op.Targets != nil {
278-
queueMessage = "Queued manually via Terraform using -target"
279-
}
280-
281276
runOptions := tfe.RunCreateOptions{
282277
ConfigurationVersion: cv,
283-
Message: tfe.String(queueMessage),
284278
Refresh: tfe.Bool(op.PlanRefresh),
285279
Workspace: w,
286280
}

‎internal/backend/remote/backend_plan_test.go‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -482,10 +482,6 @@ func TestRemote_planWithTarget(t *testing.T) {
482482
if diff := cmp.Diff([]string{"null_resource.foo"}, run.TargetAddrs); diff != "" {
483483
t.Errorf("wrong TargetAddrs in the created run\n%s", diff)
484484
}
485-
486-
if !strings.Contains(run.Message, "using -target") {
487-
t.Errorf("incorrect Message on the created run: %s", run.Message)
488-
}
489485
}
490486
}
491487

0 commit comments

Comments
 (0)