Skip to content

fix bingo-upgrade target #217

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

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

perdasilva
Copy link
Contributor

Description

The current bingo-upgrade make target can choke on bingo dependencies that require the whole path to the executable. For instance, golangci-lint needs to be installed with bingo as follows:

bingo get github.com/golangci/golangci-lint/cmd/golangci-lint

as opposed to:

bingo get github.com/golangci/golangci-lint

The update makes use of the 3rd column of the bingo list command:

$ bingo list
Name            Binary Name                                             Package @ Version                                                                       Build EnvVars   Build Flags
----            -----------                                             -----------------                                                                       -------------   -----------
bingo           bingo-v0.9.0                                            github.com/bwplotka/[email protected]                                                                        
controller-gen  controller-gen-v0.16.1                                  sigs.k8s.io/controller-tools/cmd/[email protected]                                                 
crd-diff        crd-diff-v0.1.0                                         github.com/everettraven/[email protected]                                                                 
crd-ref-docs    crd-ref-docs-v0.1.0                                     github.com/elastic/[email protected]                                                                  
golangci-lint   golangci-lint-v1.61.0                                   github.com/golangci/golangci-lint/cmd/[email protected]                                             
goreleaser      goreleaser-v1.26.2                                      github.com/goreleaser/[email protected]                                                                
kind            kind-v0.24.0                                            sigs.k8s.io/[email protected]                                                                                
kustomize       kustomize-v4.5.7                                        sigs.k8s.io/kustomize/kustomize/[email protected]                                                               
operator-sdk    operator-sdk-v1.36.1                                    github.com/operator-framework/operator-sdk/cmd/[email protected]                                     -ldflags=-X=github.com/operator-framework/operator-sdk/internal/version.Version=v1.34.1
opm             opm-v1.46.0                                             github.com/operator-framework/operator-registry/cmd/[email protected]                                         
setup-envtest   setup-envtest-v0.0.0-20240820183333-e6c3d139d2b6        sigs.k8s.io/controller-runtime/tools/[email protected]  

And uses sed to strip everything after (and including) the @.

I've tested this manually and it worked for every tool.

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

Signed-off-by: Per Goncalves da Silva <[email protected]>
@perdasilva perdasilva requested a review from a team as a code owner January 14, 2025 10:52
Copy link

codecov bot commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.55%. Comparing base (b08addd) to head (02753ff).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #217   +/-   ##
=======================================
  Coverage   88.55%   88.55%           
=======================================
  Files          18       18           
  Lines         699      699           
=======================================
  Hits          619      619           
  Misses         67       67           
  Partials       13       13           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 14, 2025
@perdasilva perdasilva added this pull request to the merge queue Jan 14, 2025
Merged via the queue into operator-framework:main with commit c68a979 Jan 14, 2025
6 checks passed
@perdasilva perdasilva deleted the fix/bingo-upgrade branch January 14, 2025 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants