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

packer-sdc struct-markdown is stuck doing nothing #169

Open
panekj opened this issue Mar 13, 2023 · 2 comments
Open

packer-sdc struct-markdown is stuck doing nothing #169

panekj opened this issue Mar 13, 2023 · 2 comments
Labels
bug Something isn't working waiting-reply

Comments

@panekj
Copy link

panekj commented Mar 13, 2023

Overview of the Issue

Using below code with go generate -v -x

//go:generate packer-sdc struct-markdown
//go:generate packer-sdc mapstructure-to-hcl2 -type ProvisionerConfig

will get stuck forever doing nothing

❯ go generate -v -x
data.go
packer-sdc mapstructure-to-hcl2 -type DataSourceOutput,DataSourceConfig
data.hcl2spec.go
main.go
post-processor.go
packer-sdc mapstructure-to-hcl2 -type PostProcessorConfig
post-processor.hcl2spec.go
provisioner.go
packer-sdc struct-markdown

Reproduction Steps

git clone https://git.panekj.dev/pj/packer-plugin-http.git
cd packer-plugin-http
go generate -v -x

Packer Plugin SDK version

packersdk.Version

❯ packer-sdc --version
0.4.0
require (
	github.com/hashicorp/hcl/v2 v2.14.1
	github.com/hashicorp/packer-plugin-sdk v0.4.0
	github.com/zclconf/go-cty v1.10.0
	golang.org/x/net v0.8.0
)

Same thing happening on 0.3.4

Operating system and Environment details

OS: macOS 13.1
Architecture: arm64

❯ go version
go version go1.20.2 darwin/arm64

can reproduce it on Ubuntu 22.04 x64

@panekj panekj added the bug Something isn't working label Mar 13, 2023
@nywilken
Copy link
Contributor

Hi there @panekj I don't have access to your repo to test against. Are you still running into this issue?

If so, can you please provide access to the plugin so that we can test against it to see what might be happening. Thanks.

@naveenrajm7
Copy link

I had a similar issue.
packer-sdc which was working fine, had stopped working and got stuck every time I did make generate within my plugin template.

I have a packer plugin for UTM and I am adding new builders/post-processors, generating hcl2spec for my new configs depends on proper working of packer-sdc.

packer-plugin-utm %packer-sdc   
^C^Z^D

I was not able to get any trace to report specific error, I can reproduce it in my machine outside of my plugin .
I even tried older release , but same result.

~ %go install github.com/hashicorp/packer-plugin-sdk/cmd/[email protected]
go: downloading github.com/hashicorp/packer-plugin-sdk v0.5.3
go: downloading golang.org/x/crypto v0.17.0
~ %packer-sdc --version               
zsh: killed     packer-sdc --version

(this did not happen inside a fresh VM, only in my machine which was working fine before)

I had to continue with the development of my plugin, so I forced it to use the main branch

github.com/hashicorp/packer-plugin-sdk v0.5.5-0.20241218223252-db2a445bf726

Now it is working.
Because nature of the issue (binary gets stuck with no output) I do not have any idea what caused it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting-reply
Projects
None yet
Development

No branches or pull requests

3 participants