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
Error on BranchProtection resource #7112
Comments
This part doesn't look like legal Go code - so there is definitely something wrong in the Go codegen here: PushRestrictions: interface{}{
nil,
nil,
pulumi.String("MDQ6VGVhbTQwMjg0ODk="),
}, We should understand whether this impacts only a corner case of |
Unfortunately, I can't repro this exact issue because But, the correct code here should be (I think): PushRestrictions: pulumi.StringArray{
pulumi.String("MDQ6VGVhbTQwMjg0ODk="),
}, It doesn't look like this is an issue with go programgen in general, since the Unfortunately I have very low context on the inner workings of |
The panic is due to generating invalid go source code. Other generators like the docs/examples generator catch panics from the codegens and report diagnostics at the end of a run. We should probably use the code generators in a similar manner within the import command. pulumi/pkg/codegen/go/gen_program.go Lines 91 to 92 in 3e3e4f2
|
@kateetrant could you do a But yeah, I can at least make the fix of not panicking and providing a more useful error. |
I've fixed the panic to provide a better error, but the underlying error in import remains. Removing the p1 label and we can come back to this (or someone with the right github access can maybe get a repro so we can track down the underlying issue). |
@kateetrant closing this due to inactivity. We've gone ahead and fixed the panic to get a better error but still need repro steps to understand the underlying |
Hey sorry I didn't see this earlier. I'm not sure the export would be of any use now. We deleted all the previous resources and now have the |
Expected behavior
pulumi imports BranchProtection resource after retrieval without error
Current behavior
Errors on import. Subsequent import fails on preview as it is already imported
Steps to reproduce
pulumi import github:index/branchProtection:BranchProtection repo.repo repo.repo:development
Stack Trace and relevant info
The text was updated successfully, but these errors were encountered: