Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardfeng-db committed Apr 13, 2024
1 parent 0c9f90d commit 23baf33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions common/reflect_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,6 @@ func StructToData(result any, s map[string]*schema.Schema, d *schema.ResourceDat
case schema.TypeList, schema.TypeSet:
es, ok := fieldSchema.Elem.(*schema.Schema)
if ok {
println("1")
log.Printf("[TRACE] Set %s %s %v", es.Type, fieldPath, fieldValue)
// here we rely on Terraform SDK to perform
// validation, so we don't to it twice
Expand All @@ -712,11 +711,9 @@ func StructToData(result any, s map[string]*schema.Schema, d *schema.ResourceDat
if len(nv) == 0 {
return nil
}
println("2")
log.Printf("[TRACE] set %s %#v", fieldPath, nv)
return d.Set(fieldPath, nv)
default:
println("3")
log.Printf("[TRACE] set %s %#v", fieldPath, fieldValue)
return d.Set(fieldPath, fieldValue)
}
Expand Down
3 changes: 3 additions & 0 deletions jobs/resource_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,9 @@ func (JobSettingsResource) CustomizeSchema(s map[string]*schema.Schema, path []s
common.CustomizeSchemaPath(s, "task", "library").Schema.Type = schema.TypeSet
common.CustomizeSchemaPath(s, "task", "for_each_task", "task", "library").Schema.Type = schema.TypeSet

common.CustomizeSchemaPath(s, "task", "task_key").SetOptional()
common.CustomizeSchemaPath(s, "task", "for_each_task", "task", "task_key").SetOptional()

topLevelDeprecationMessage := "should be used inside a task block and not inside a job block"
common.CustomizeSchemaPath(s, "max_retries").SetDeprecated(topLevelDeprecationMessage)
common.CustomizeSchemaPath(s, "min_retry_interval_millis").SetDeprecated(topLevelDeprecationMessage)
Expand Down

0 comments on commit 23baf33

Please sign in to comment.