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

apache-pulsar 2.8.0 (new formula) #83238

Closed
wants to merge 27 commits into from
Closed

apache-pulsar 2.8.0 (new formula) #83238

wants to merge 27 commits into from

Conversation

zbentley
Copy link
Contributor

This commit adds a formula for the Apache Pulsar message broker
(https://pulsar.apache.org/). The broker will operate in its minimal/
default "standalone" mode when started by this formula, which is
roughly equivalent to the behavior of ZooKeeper and other similar
formulae.

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

This commit adds a formula for the Apache Pulsar message broker
(https://pulsar.apache.org/). The broker will operate in its minimal/
default "standalone" mode when started by this formula, which is
roughly equivalent to the behavior of ZooKeeper and other similar
formulae.
@BrewTestBot BrewTestBot added java Java use is a significant feature of the PR or issue new formula PR adds a new formula to Homebrew/homebrew-core labels Aug 13, 2021
@dawidd6 dawidd6 added the CI-force-linux [DEPRECATED] Don't pass --skip-unbottled-linux to brew test-bot. label Aug 13, 2021
Formula/apache-pulsar.rb Outdated Show resolved Hide resolved
@zbentley
Copy link
Contributor Author

The arm64 CI failure is due to missing support upstream: os72/protoc-jar#93

@chenrui333 chenrui333 changed the title New Formula: Apache Pulsar apache-pulsar 2.8.0 (new formula) Aug 14, 2021
@carlocab carlocab added the CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. label Aug 15, 2021
@zbentley
Copy link
Contributor Author

I'm unsure what the ubuntu-latest CI failure indicates. Does anyone know what this means?

==> FAILED
Error: 1 problem in 1 formula detected
Error: No such file or directory @ realpath_rec - /home/runner
apache-pulsar:
  * Binaries built for a non-native architecture were installed into apache-pulsar's prefix.
    The offending files are:
      /home/linuxbrew/.linuxbrew/Cellar/apache-pulsar/2.8.0/libexec/lib/presto/bin/procname/Linux-ppc64le/libprocname.so	(dunno)

@SMillerDev
Copy link
Member

That means it shouldn't be installing powerpc binaries for Linux because we only support x86_64 on Linux

@zbentley
Copy link
Contributor Author

After spending some time trying to get this working on M1, it seems like there are multiple significant issues blocking it working on that platform: grpc, protoc-maven, protoc itself, and rocksdb all have open issues for M1 support. Some of those have workarounds, but threading those workarounds down through Pulsar's (complicated) build system seems questionable and would require programmatically editing at least the build system, if not some of Pulsar's code.

Attempting to override the architecture to build x86_64 artifacts on ARM causes other build failures, as it appears some compiled artifacts used by this project do not honor the arch override and thus fail to link/load on M1.

That leads me to the question:
@SMillerDev @dawidd6, Is it acceptable to have this formula indicate that it does not work on M1 macs, at least until support is added upstream? If so, how would I go about doing that?

@zbentley zbentley closed this Aug 20, 2021
@zbentley
Copy link
Contributor Author

Sorry, didn't mean to close, just comment.

@zbentley zbentley reopened this Aug 20, 2021
def install
chmod "+x", "src/rename-netty-native-libs.sh"
with_env(
"JAVA_HOME" => Formula["openjdk@11"].opt_prefix,
Copy link
Member

Choose a reason for hiding this comment

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

This isn't the usual location for JAVA_HOME so I don't think this does anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍, addressed!

Copy link
Member

Choose a reason for hiding this comment

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

How exactly? The line is still the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately removing this caused tests to fail; I restored it in the latest commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Failures in 1e325fb went away when I put this line back in 0d2389d

Copy link
Member

Choose a reason for hiding this comment

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

Wait, the test block was failing? That means that it's compiling in this value. In that case especially this shouldn't be opt_prefix but overridable_java_home

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, the install step was failing because it was building on a newer, incompatible version of Java. Evidence from the CI failure in the first linked commit:

==> mvn -X clean package -DskipTests -Pcore-modules
Picked up _JAVA_OPTIONS: -Duser.home=/Users/brew/Library/Caches/Homebrew/java_cache
Apache Maven 3.8.2 (ea98e05a04480131370aa0c110b8c54cf726c06f)
Maven home: /usr/local/Cellar/maven/3.8.2/libexec
Java version: 16.0.2, vendor: Homebrew, runtime: /usr/local/Cellar/openjdk/16.0.2/libexec/openjdk.jdk/Contents/Home
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "11.3.1", arch: "x86_64", family: "mac"
[DEBUG] Created new class realm maven.api

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apologies for the confusion; by "tests" I meant "formula CI in general", not brew test.

@BrewTestBot BrewTestBot added the no Linux bottle Formula has no Linux bottle label Aug 29, 2021
@BrewTestBot BrewTestBot removed the no Linux bottle Formula has no Linux bottle label Aug 30, 2021
@zbentley
Copy link
Contributor Author

zbentley commented Sep 2, 2021

Are there additional changes that should be made to this formula before it can be merged?

Unrelated to this formula, I have a question: there is another distribution of this project, streamnative pulsar, which leads ahead of the Apache release (though they try to upstream most of their work to Apache eventually) and releases on a more regular cadence. If I wanted to make a formula for that distribution, should I a) make a tap, b) make another formula with a different name (e.g. streamnative-pulsar), or c) make a future PR suggesting modifications to this formula to switch where it gets code from?

@zbentley
Copy link
Contributor Author

zbentley commented Sep 7, 2021

@SMillerDev any further changes needed here? Apologies for the nagging.

Copy link
Member

@carlocab carlocab left a comment

Choose a reason for hiding this comment

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

Unrelated to this formula, I have a question: there is another distribution of this project, streamnative pulsar, which leads ahead of the Apache release (though they try to upstream most of their work to Apache eventually) and releases on a more regular cadence.

Is that a fork of this one? If so, I'd guess that that would belong in an external tap, unless it's very popular.

Formula/apache-pulsar.rb Outdated Show resolved Hide resolved
Formula/apache-pulsar.rb Outdated Show resolved Hide resolved
Comment on lines 24 to 31
system(
"mvn",
"-X",
"clean",
"package",
"-DskipTests",
"-Pcore-modules",
)
Copy link
Member

Choose a reason for hiding this comment

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

Can we turn this into one (or maybe two) lines?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 fixed!

@zbentley
Copy link
Contributor Author

@carlocab @SMillerDev what additional changes are needed here?

Formula/apache-pulsar.rb Outdated Show resolved Hide resolved
Formula/apache-pulsar.rb Outdated Show resolved Hide resolved
Formula/apache-pulsar.rb Outdated Show resolved Hide resolved
Formula/apache-pulsar.rb Outdated Show resolved Hide resolved
Formula/apache-pulsar.rb Outdated Show resolved Hide resolved
Formula/apache-pulsar.rb Outdated Show resolved Hide resolved
Formula/apache-pulsar.rb Show resolved Hide resolved
zbentley and others added 3 commits September 14, 2021 11:04
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
Copy link
Member

@carlocab carlocab left a comment

Choose a reason for hiding this comment

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

Thanks, @zbentley.

@BrewTestBot
Copy link
Member

:shipit: @carlocab has triggered a merge.

@zbentley
Copy link
Contributor Author

Thanks @carlocab and @SMillerDev for your time and assistance!

@zbentley zbentley deleted the new_formula_apache_pulsar branch September 16, 2021 03:38
@zbentley zbentley restored the new_formula_apache_pulsar branch September 16, 2021 03:39
@carlocab
Copy link
Member

carlocab commented Sep 16, 2021

No problem. Thanks for your patience here!

@zbentley zbentley deleted the new_formula_apache_pulsar branch December 27, 2021 23:00
@github-actions github-actions bot added the outdated PR was locked due to age label Jan 27, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CI-force-linux [DEPRECATED] Don't pass --skip-unbottled-linux to brew test-bot. CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. java Java use is a significant feature of the PR or issue new formula PR adds a new formula to Homebrew/homebrew-core outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants