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

AnalyticsApplicationOutput does not implement pulumi.Output (missing Apply method) #1321

Closed
jslauthor opened this issue Jan 23, 2021 · 13 comments · Fixed by pulumi/pulumi#6209 or #1335
Assignees

Comments

@jslauthor
Copy link

jslauthor commented Jan 23, 2021

Hello all. I'm receiving an error when creating a stream with the Kinesis library. This happened around the v2.18.2 SDK release (it was working prior) when running pulumi up or go get:

github.com/pulumi/pulumi-aws/sdk/v3/go/aws/kinesis
../../go/pkg/mod/github.com/pulumi/pulumi-aws/sdk/v3@v3.25.0/go/aws/kinesis/analyticsApplication.go:274:43: impossible type assertion:
	AnalyticsApplicationOutput does not implement pulumi.Output (missing Apply method)
../../go/pkg/mod/github.com/pulumi/pulumi-aws/sdk/v3@v3.25.0/go/aws/kinesis/pulumiTypes.go:2204:6: AnalyticsApplicationOutput redeclared in this block
	previous declaration at ../../go/pkg/mod/github.com/pulumi/pulumi-aws/sdk/v3@v3.25.0/go/aws/kinesis/analyticsApplication.go:356:6

and here's the stream code:

  stream, err := kinesis.NewStream(ctx, "aws.chat.cmd.rooms.0", &kinesis.StreamArgs{
	  RetentionPeriod: pulumi.Int(24),
	  ShardCount: pulumi.Int(1),
	  ShardLevelMetrics: pulumi.StringArray{
		  pulumi.String("IncomingBytes"),
		  pulumi.String("OutgoingBytes"),
	  },
	  Tags: pulumi.StringMap{
			  "Environment": pulumi.String("staging"),
	  },
  })
  if err != nil {
	  return err
  }

I've tried downgrading to 2.18.0, but I received the same error. I've and tried go clean --modcache && go get to no avail. Any ideas?

@mikhailshilkov
Copy link
Member

@EvanBoyle could you triage this one?

@EvanBoyle
Copy link
Contributor

related to pulumi/pulumi#6170 and pulumi/pulumi#6128

This is a schematype colliding with generated types (codegen error). @viveklak can you take a look?

@EvanBoyle
Copy link
Contributor

@jslauthor this is a compilation error in the aws go SDK due to type collision. Was this working for you previously? If so, can you try downgrading the version of the AWS SDK you're using?

@jslauthor
Copy link
Author

Hi @EvanBoyle! It was working before and I tried downgrading to github.com/pulumi/pulumi-aws/sdk/v3@v3.22.1 and github.com/pulumi/pulumi/sdk/v2@v2.17.0 but I received the same error. I figured that would have worked, so I'm slightly stumped and am thinking the error might be due to a user error rather than you all. 😅 I do not recall what version was working as expected, but it wasn't more than 15 days ago (hence the versions I selected above).

@EvanBoyle
Copy link
Contributor

Can you try 3.21.0 or 3.15.0?

@jslauthor
Copy link
Author

@EvanBoyle Same error. Here's my go.mod so we are on the same page:

module github.com/jslauthor/infra

go 1.15

require (
	github.com/pulumi/pulumi-aws/sdk/v3 v3.15.0
	github.com/pulumi/pulumi-docker/sdk/v2 v2.6.1
	github.com/pulumi/pulumi/sdk/v2 v2.17.0
)

@jslauthor
Copy link
Author

@EvanBoyle is there anything else I can help with here? Or can I use a potential workaround? This is blocking me currently. Thank you for your help!

@EvanBoyle
Copy link
Contributor

@viveklak any thoughts?

@viveklak
Copy link
Contributor

@jslauthor we have fixes in the works on #6209 which should hopefully be merged soon. Apologies for the inconvenience. In terms of workarounds, I believe this was broken in v3.13.0 of the SDK. Could you try downgrading the SDK to 3.12.2 or so?

@jslauthor
Copy link
Author

@viveklak I downgraded to v3.12.2 and it is now working. Thank you for the workaround! I'll keep my eye on #6209.

@viveklak
Copy link
Contributor

This will be fixed in 3.26.0.

@jslauthor
Copy link
Author

@viveklak FYI, this is still broken in 3.26.1:

Diagnostics:
  pulumi:pulumi:Stack (infra-local):
    # github.com/pulumi/pulumi-aws/sdk/v3/go/aws/kinesis
    ../../go/pkg/mod/github.com/pulumi/pulumi-aws/sdk/v3@v3.26.1/go/aws/kinesis/analyticsApplication.go:274:43: impossible type assertion:
    	AnalyticsApplicationOutput does not implement pulumi.Output (missing Apply method)
    ../../go/pkg/mod/github.com/pulumi/pulumi-aws/sdk/v3@v3.26.1/go/aws/kinesis/pulumiTypes.go:2204:6: AnalyticsApplicationOutput redeclared in this block
    	previous declaration at ../../go/pkg/mod/github.com/pulumi/pulumi-aws/sdk/v3@v3.26.1/go/aws/kinesis/analyticsApplication.go:356:6
 
    error: an unhandled error occurred: program exited with non-zero exit code: 2

Do I need to do anything else to update it?

@viveklak
Copy link
Contributor

Apologies - looks like the change didn't make it through to the SDK in 3.26.x. Its staged here #1335 and should be available for the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants