Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Eron Wright <[email protected]>
  • Loading branch information
AaronFriel and EronWright committed Apr 9, 2024
1 parent 8cd0a87 commit b0aa1ba
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/codegen/schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (t primitiveType) String() string {
case jsonType:
fallthrough
case anyResourceType:
fallthrough
return "pulumi:pulumi:Resource"
case anyType:
return "pulumi:pulumi:Any"
default:
Expand Down
1 change: 0 additions & 1 deletion sdk/go/pulumi/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,6 @@ func unmarshalOutput(ctx *Context, v resource.PropertyValue, dest reflect.Value)
return secret, nil
}

// TODO: pulumi.Resource is a non-empty interface type
if !anyType.Implements(typ) {
return false, fmt.Errorf("cannot unmarshal into non-empty interface type %v", dest.Type())
}
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/any_resource_types/go/echo_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//go:build !all
// +build !all

// Exposes the FailsOnDelete resource from the testprovider.
// Exposes the Echo resource from the testprovider.

package main

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/any_resource_types/go_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/stretchr/testify/assert"
)

// TestDeletedWithGo tests the DeletedWith resource option.
// TestAnyResource tests the `pulumi.json/#Resource` schema type.
//
//nolint:paralleltest // ProgramTest calls t.Parallel()
func TestAnyResource(t *testing.T) {
Expand Down

0 comments on commit b0aa1ba

Please sign in to comment.