Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore new lint error & update formatting #1292

Merged
merged 1 commit into from
May 3, 2022
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
12 changes: 6 additions & 6 deletions catalog/data_views_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ func TestViewsData(t *testing.T) {
Tables: []TableInfo{
{
CatalogName: "a",
SchemaName: "b",
Name: "c",
TableType: "MANAGED",
SchemaName: "b",
Name: "c",
TableType: "MANAGED",
},
{
CatalogName: "a",
SchemaName: "b",
Name: "d",
TableType: "VIEW",
SchemaName: "b",
Name: "d",
TableType: "VIEW",
},
},
},
Expand Down
26 changes: 13 additions & 13 deletions catalog/resource_grants.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,29 +157,29 @@ func (sm securableMapping) validate(d attributeGetter, pl PermissionsList) error
var mapping = securableMapping{
// add other securable mappings once needed
"table": {
"MODIFY": true,
"SELECT": true,
"MODIFY": true,
"SELECT": true,
},
"view": {
"SELECT": true,
"SELECT": true,
},
"catalog": {
"CREATE": true,
"USAGE": true,
"CREATE": true,
"USAGE": true,
},
"schema": {
"CREATE": true,
"USAGE": true,
"CREATE": true,
"USAGE": true,
},
"storage_credential": {
"CREATE_TABLE": true,
"READ_FILES": true,
"WRITE_FILES": true,
"CREATE_TABLE": true,
"READ_FILES": true,
"WRITE_FILES": true,
},
"external_location": {
"CREATE_TABLE": true,
"READ_FILES": true,
"WRITE_FILES": true,
"CREATE_TABLE": true,
"READ_FILES": true,
"WRITE_FILES": true,
},
}

Expand Down
4 changes: 2 additions & 2 deletions common/resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func TestHTTP404TriggersResourceRemovalForReadAndDelete(t *testing.T) {
}
r := Resource{
Create: nope,
Read: nope,
Read: nope,
Update: nope,
Delete: nope,
Schema: map[string]*schema.Schema{
Expand All @@ -59,7 +59,7 @@ func TestHTTP404TriggersResourceRemovalForReadAndDelete(t *testing.T) {
client := &DatabricksClient{}
ctx := context.Background()
d := r.TestResourceData()

// Create propagates 404 error
diags := r.CreateContext(ctx, d, client)
assert.True(t, diags.HasError())
Expand Down
2 changes: 1 addition & 1 deletion permissions/resource_permissions.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func (a PermissionsAPI) Read(objectID string) (objectACL ObjectACL, err error) {
err = a.client.Get(a.context, urlPathForObjectID(objectID), nil, &objectACL)
apiErr, ok := err.(common.APIError)
// https://github.com/databrickslabs/terraform-provider-databricks/issues/1227
// platform propagates INVALID_STATE error for auto-purged clusters in
// platform propagates INVALID_STATE error for auto-purged clusters in
// the permissions api. this adds "a logical fix" also here, not to introduce
// cross-package dependency on "clusters".
if ok && strings.Contains(apiErr.Message, "Cannot access cluster") && apiErr.StatusCode == 400 {
Expand Down
4 changes: 2 additions & 2 deletions permissions/resource_permissions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ func TestResourcePermissionsCreate_PathIdRetriever_Error(t *testing.T) {
qa.HTTPFailures[0],
},
Resource: ResourcePermissions(),
Create: true,
Create: true,
HCL: `notebook_path = "/foo/bar"

access_control {
Expand All @@ -816,7 +816,7 @@ func TestResourcePermissionsCreate_ActualUpdate_Error(t *testing.T) {
qa.HTTPFailures[0],
},
Resource: ResourcePermissions(),
Create: true,
Create: true,
HCL: `cluster_id = "abc"

access_control {
Expand Down
1 change: 1 addition & 0 deletions staticcheck.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
checks = ["inherit", "-SA1019"]
2 changes: 1 addition & 1 deletion storage/resource_mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func ResourceMount() *schema.Resource {
r.DeleteContext = mountCallback(mountDelete).preProcess(r)
r.Importer = nil
r.Timeouts = &schema.ResourceTimeout{
Default: schema.DefaultTimeout(20*time.Minute),
Default: schema.DefaultTimeout(20 * time.Minute),
}
return r
}