operator-framework / ansible-operator-plugins

Experimental extraction/refactoring of the Operator SDK's ansible operator plugin
Apache License 2.0
7 stars 17 forks source link

`make ansible-operator` does not download the correct asset #36

Closed piec closed 7 months ago

piec commented 8 months ago

Bug Report

What did you do?

make ansible-operator

What did you expect to see?

bin/ansible-operator binary

What did you see instead? Under which circumstances?

$ cat bin/ansible-operator
Not Found

Environment

Operator type:

/language ansible

Kubernetes cluster type:

vanilla

$ ./bin/operator-sdk version
operator-sdk version: "v1.32.0", commit: "4dcbbe343b29d325fd8a14cc60366335298b40a3", kubernetes version: "1.26.0", go version: "go1.19.13", GOOS: "linux", GOARCH: "amd64"

Possible Solution

The makefile expects a release asset named ansible-operator_$(OS)_$(ARCH) but the assets are tars (example: ansible-operator-plugins_1.32.0_linux_amd64.tar.gz).

Please see the makefile template code: https://github.com/operator-framework/ansible-operator-plugins/blob/cbc2d46705c5beee42021429630c2e184c1283b6/pkg/plugins/ansible/v1/scaffolds/internal/templates/makefile.go#L169

Cheers

openshift-ci[bot] commented 8 months ago

@piec: The label(s) language/ansible cannot be applied, because the repository doesn't have them.

In response to [this](https://github.com/operator-framework/ansible-operator-plugins/issues/36): >## Bug Report > >#### What did you do? > >`make ansible-operator` > >#### What did you expect to see? > >`bin/ansible-operator` binary > >#### What did you see instead? Under which circumstances? > >``` >$ cat bin/ansible-operator >Not Found >``` > >#### Environment > >**Operator type:** > >/language ansible > >**Kubernetes cluster type:** > >vanilla > >``` >$ ./bin/operator-sdk version >operator-sdk version: "v1.32.0", commit: "4dcbbe343b29d325fd8a14cc60366335298b40a3", kubernetes version: "1.26.0", go version: "go1.19.13", GOOS: "linux", GOARCH: "amd64" >``` > >#### Possible Solution > >The makefile expects a release asset named `ansible-operator_$(OS)_$(ARCH)` but the assets are tars (example: [ansible-operator-plugins_1.32.0_linux_amd64.tar.gz](https://github.com/operator-framework/ansible-operator-plugins/releases/tag/v1.32.0)). > >Please see the makefile template code: >https://github.com/operator-framework/ansible-operator-plugins/blob/cbc2d46705c5beee42021429630c2e184c1283b6/pkg/plugins/ansible/v1/scaffolds/internal/templates/makefile.go#L169 > >Cheers Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
OchiengEd commented 8 months ago

I ran into the same issue. We would need to either change the .goreleaser.yaml file to build binaries for different CPU architectures or update the makefile target to download the tarball and extract the binary from the tarball before placing it in the bin directory in the operator directory.

From my perspective, having the binaries in the releases seems to make more sense. This has been the behavior for a while however, if there is value in changing to tarballs I am open to hear.