diff --git a/bundle/permissions/permission_diagnostics.go b/bundle/permissions/permission_diagnostics.go index 29d6a4840..24c268124 100644 --- a/bundle/permissions/permission_diagnostics.go +++ b/bundle/permissions/permission_diagnostics.go @@ -109,7 +109,7 @@ func isGroupOfCurrentUser(b *bundle.Bundle, groupName string) bool { } func ReportPermissionDenied(ctx context.Context, b *bundle.Bundle, path string) diag.Diagnostics { - log.Errorf(ctx, "Failed to update %v", path) + log.Errorf(ctx, "Failed to update, encountated permission denied error: %v", path) user := b.Config.Workspace.CurrentUser.DisplayName canManageBundle, assistance := analyzeBundlePermissions(b) diff --git a/bundle/permissions/terraform_errors.go b/bundle/permissions/terraform_errors.go index ab7d07aa7..cc4c9f614 100644 --- a/bundle/permissions/terraform_errors.go +++ b/bundle/permissions/terraform_errors.go @@ -21,7 +21,7 @@ func TryExtendTerraformPermissionError(ctx context.Context, b *bundle.Bundle, er if !strings.Contains(err.Error(), "cannot update permissions") && !strings.Contains(err.Error(), "permissions on pipeline") && !strings.Contains(err.Error(), "cannot read permissions") && - !strings.Contains(err.Error(), "annot set run_as to user") { + !strings.Contains(err.Error(), "cannot set run_as to user") { return nil } diff --git a/bundle/tests/run_as_test.go b/bundle/tests/run_as_test.go index 725eee7b4..24a48e43b 100644 --- a/bundle/tests/run_as_test.go +++ b/bundle/tests/run_as_test.go @@ -113,10 +113,9 @@ func TestRunAsErrorForPipelines(t *testing.T) { diags := bundle.Apply(ctx, b, mutator.SetRunAs()) err := diags.Error() - configPath := filepath.FromSlash("run_as/not_allowed/pipelines/databricks.yml") assert.ErrorContains(t, err, "pipelines do not support a setting a run_as user that is different from the owner.\n"+ "Current identity: jane@doe.com. Run as identity: my_service_principal.\n"+ - "See https://docs", configPath) + "See https://docs") } func TestRunAsNoErrorForPipelines(t *testing.T) {