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

Calling bottle :unneeded is deprecated! #110

Open
agrawal-prateek opened this issue Nov 2, 2021 · 12 comments
Open

Calling bottle :unneeded is deprecated! #110

agrawal-prateek opened this issue Nov 2, 2021 · 12 comments

Comments

@agrawal-prateek
Copy link

agrawal-prateek commented Nov 2, 2021

A deprecation warning is coming with elastic-search

Warning: Calling bottle: unneeded is deprecated! There is no replacement.
Please report this issue to the elastic/tap tap (not Homebrew/brew or Homebrew/core):
/usr/local/Homebrew/Library/Taps/elastic/homebrew-tap/Formula/elasticsearch-full.rb:9

Somebody have a look :)

@DPattee
Copy link

DPattee commented Nov 6, 2021

It isn't just elasticsearch, it is the beats too.

(Or at least filebeat, heartbeat, metricbeat, and packetbeat)

edit: looks like a fix from: 29faec9

@reilee
Copy link

reilee commented Nov 9, 2021

Same issue also in:

  • apm-server-full.rb:10
  • kibana-full.rb:9
  • logstash-full.rb:10

@DPattee
Copy link

DPattee commented Nov 9, 2021

Same issue also in:

  • apm-server-full.rb:10
  • kibana-full.rb:9
  • logstash-full.rb:10

Yep those are all addressed in the change I linked

@aarvee11
Copy link

aarvee11 commented Nov 10, 2021

brew remove apm-server-full kibana-full filebeat-full elasticsearch-full
brew untap elastic/tap


brew update -v

brew tap elastic/tap
brew update -v
brew install apm-server-full kibana-full filebeat-full elasticsearch-full

Was able to fix it on macOS Monterey using the above commands.

Output:

aarvee11@maccosmo  ~  brew update -v
Checking if we need to fetch /usr/local/Homebrew...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/elastic/homebrew-tap...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/hashicorp/homebrew-tap...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/wpscanteam/homebrew-tap...
Fetching /usr/local/Homebrew...
Updating /usr/local/Homebrew...
Branch 'master' set up to track remote branch 'master' from 'origin'.
Switched to and reset branch 'master'
Your branch is up to date with 'origin/master'.
Switched to and reset branch 'stable'
Current branch stable is up to date.

Already up-to-date.

NOTE: THIS WILL REMOVE AND REINSTALL ALL THE ELASTIC COMPONENTS ON YOUR MAC. TAKE NECESSARY BACKUPS BEFORE PROCEEDING

@soyaaroncervantes
Copy link

soyaaroncervantes commented Nov 16, 2021

brew remove apm-server-full kibana-full filebeat-full elasticsearch-full
brew untap elastic/tap


brew update -v

brew tap elastic/tap
brew update -v
brew install apm-server-full kibana-full filebeat-full elasticsearch-full

Was able to fix it on macOS Monterey using the above commands.

Output:

aarvee11@maccosmo  ~  brew update -v
Checking if we need to fetch /usr/local/Homebrew...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/elastic/homebrew-tap...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/hashicorp/homebrew-tap...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/wpscanteam/homebrew-tap...
Fetching /usr/local/Homebrew...
Updating /usr/local/Homebrew...
Branch 'master' set up to track remote branch 'master' from 'origin'.
Switched to and reset branch 'master'
Your branch is up to date with 'origin/master'.
Switched to and reset branch 'stable'
Current branch stable is up to date.

Already up-to-date.

NOTE: THIS WILL REMOVE AND REINSTALL ALL THE ELASTIC COMPONENTS ON YOUR MAC. TAKE NECESSARY BACKUPS BEFORE PROCEEDING

Thanks, this worked for me 👍🏽

mgreau added a commit that referenced this issue Nov 17, 2021
The default branch is now `main` instead of `master`.

The `master` branch is not updated anymore, and therefore
can generate some warning messages.

This commit adds instructions to explain how to update
the local configuration to point to the new `main` branch.

Relates #115 #110
mgreau added a commit that referenced this issue Nov 17, 2021
The default branch is now `main` instead of `master`.

The `master` branch is not updated anymore, and therefore
can generate some warning messages.

This commit adds instructions to explain how to update
the local configuration to point to the new `main` branch.

Relates #115 #110
@mgreau
Copy link

mgreau commented Nov 17, 2021

Hi all,

I have opened a PR to document how to solve this problem.
Could you please try the commands from this procedure to confirm it fixes the problem?

Thanks

@DPattee
Copy link

DPattee commented Nov 18, 2021

That PR does not solve the problem for me.

Just to really be sure I issued the commands multiple times:

> brew tap --repair elastic/tap
> brew update
> brew tap --repair elastic/tap
> brew update

The commands returned successfully. But then using one of the commands that normally shows these error messages shows that the problem wasn'te resolved:

> brew outdated
Warning: Calling bottle :unneeded is deprecated! There is no replacement.
Please report this issue to the elastic/tap tap (not Homebrew/brew or Homebrew/core):
  /usr/local/Homebrew/Library/Taps/elastic/homebrew-tap/Formula/filebeat-full.rb:10

Warning: Calling bottle :unneeded is deprecated! There is no replacement.
Please report this issue to the elastic/tap tap (not Homebrew/brew or Homebrew/core):
  /usr/local/Homebrew/Library/Taps/elastic/homebrew-tap/Formula/heartbeat-full.rb:10

Warning: Calling bottle :unneeded is deprecated! There is no replacement.
Please report this issue to the elastic/tap tap (not Homebrew/brew or Homebrew/core):
  /usr/local/Homebrew/Library/Taps/elastic/homebrew-tap/Formula/metricbeat-full.rb:10

Warning: Calling bottle :unneeded is deprecated! There is no replacement.
Please report this issue to the elastic/tap tap (not Homebrew/brew or Homebrew/core):
  /usr/local/Homebrew/Library/Taps/elastic/homebrew-tap/Formula/packetbeat-full.rb:10

And then the suggested
> git -C /opt/homebrew/Library/Taps/elastic/homebrew-tap status

won't always be right, sometimes it would be /usr/local/ instead of /opt/

And doing

> git -C /usr/local/homebrew/Library/Taps/elastic/homebrew-tap status

On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

And then manually typing 'upgrade' for one of the impacted beats just says it is already up-to-date and doesn't force any kind of refresh / reset to the 'main' branch

Double checking the update, not even restricting it:

> brew update -v
Checking if we need to fetch /usr/local/Homebrew...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/elastic/homebrew-tap...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/minio/homebrew-stable...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/teamookla/homebrew-speedtest...
Already up-to-date.

Git doesn't even seem to be recognizing that there are other branch options other than master?

git -C /usr/local/homebrew/Library/Taps/elastic/homebrew-tap branch -av
* master                ab7b64e Update to 7.15.2 (#111)
  remotes/origin/HEAD   -> origin/master
  remotes/origin/master ab7b64e Update to 7.15.2 (#111)

@motou
Copy link

motou commented Nov 30, 2021

It is related to the default branch renaming, see https://github.com/elastic/homebrew-tap/pull/116/files#r759735461

@motou
Copy link

motou commented Dec 1, 2021

On my local MacBook, after running brew update-reset $(brew --repo elastic/tap), the default branch is reset to main

@DPattee
Copy link

DPattee commented Dec 7, 2021

That command worked on only 1 of 4 machines. They have all been brew doctored, brew updated, and brew upgraded many times recently.

Three responded with:

brew update-reset $(brew --repo elastic/tap)
==> Fetching /usr/local/Homebrew/Library/Taps/elastic/homebrew-tap...
error: Not a valid ref: refs/remotes/origin/main

==> Resetting /usr/local/Homebrew/Library/Taps/elastic/homebrew-tap...
Branch 'master' set up to track remote branch 'master' from 'origin'.
Reset branch 'master'
Your branch is up to date with 'origin/master'.

The fourth responded with:

brew update-reset $(brew --repo elastic/tap)
==> Fetching /usr/local/Homebrew/Library/Taps/elastic/homebrew-tap...
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 9 (delta 4), reused 3 (delta 2), pack-reused 0
Unpacking objects: 100% (9/9), done.
From https://github.com/elastic/homebrew-tap
 * [new branch]      main            -> origin/main
 * [new branch]      main-as-default -> origin/main-as-default

==> Resetting /usr/local/Homebrew/Library/Taps/elastic/homebrew-tap...
Branch 'main' set up to track remote branch 'main' from 'origin'.
Switched to a new branch 'main'

@a03nikki
Copy link

a03nikki commented Jan 7, 2022

This issue is preventing brew upgrade from recognizing the versions later than 7.15.2 to be installed. ☹️
In light of the Log4j2 issues, we should really get this resolved.

@DPattee
Copy link

DPattee commented Jan 27, 2022

I finally figured out how to fix this on my own since it was causing security issues. The original configuration of the branch via homebrew wasn't right, and that bad configuration was causing all other steps to fail.

@a03nikki give these sequence of 3 commands a shot....

My homebrew install puts the taps in this location, if it is different for you of course you'll need to be in the right repo spot:
cd /usr/local/homebrew/Library/Taps/elastic/homebrew-tap

git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"

That resets a broken config, replacing hardcoded "master" filter with the "*" wildcard.

git fetch --all

should then suddenly report that it discovered a bunch of new branches and changes beyond the #111 that was the last I could see previously.

git reset --hard origin/main

to kick it in its pants.

brew outdated

should now show the 7.16.3 version of elasticsearch-full(etc) and should not show any of those "deprecated" errors.

mgreau pushed a commit that referenced this issue Mar 21, 2024
* [doc] Document the renaming from master to main

The default branch is now `main` instead of `master`.

The `master` branch is not updated anymore, and therefore
can generate some warning messages.

This commit adds instructions to explain how to update
the local configuration to point to the new `main` branch.

Relates #115 #110
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants