Skip to content

🐛 fix bingo-upgrade target #1609

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)

@perdasilva perdasilva requested a review from a team as a code owner January 14, 2025 10:43
Copy link

netlify bot commented Jan 14, 2025

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 1f0a7aa
🔍 Latest deploy log https://app.netlify.com/sites/olmv1/deploys/678640ebad03c200082dcde4
😎 Deploy Preview https://deploy-preview-1609--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Signed-off-by: Per Goncalves da Silva <[email protected]>
@perdasilva perdasilva enabled auto-merge January 14, 2025 10:55
Copy link

codecov bot commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.68%. Comparing base (b83bd4e) to head (1f0a7aa).
Report is 8 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (b83bd4e) and HEAD (1f0a7aa). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (b83bd4e) HEAD (1f0a7aa)
unit 2 1
e2e 2 1
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1609      +/-   ##
==========================================
- Coverage   75.64%   66.68%   -8.96%     
==========================================
  Files          42       57      +15     
  Lines        3326     4584    +1258     
==========================================
+ Hits         2516     3057     +541     
- Misses        638     1302     +664     
- Partials      172      225      +53     
Flag Coverage Δ
e2e 52.72% <ø> (-0.02%) ⬇️
unit 53.62% <ø> (-6.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@for pkg in $$($(BINGO) list | awk '{ print $$1 }' | tail -n +3); do \
echo "Upgrading $$pkg to latest..."; \
@for pkg in $$($(BINGO) list | awk '{ print $$3 }' | tail -n +3 | sed 's/@.*//'); do \
echo -e "Upgrading \033[35m$$pkg\033[0m to latest..."; \
$(BINGO) get "$$pkg@latest"; \
done
Copy link
Contributor

Choose a reason for hiding this comment

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

Worked fine in the MAC as well
Screenshot 2025-01-14 at 11 02 14

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

@perdasilva perdasilva added this pull request to the merge queue Jan 14, 2025
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 14, 2025
Merged via the queue into operator-framework:main with commit 7a6fa07 Jan 14, 2025
21 of 22 checks passed
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.

3 participants