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

GH-43377: [Java][CI] Java-Jars CI is Failing with a linking error on macOS #43385

Merged
merged 6 commits into from
Jul 26, 2024

Conversation

vibhatha
Copy link
Collaborator

@vibhatha vibhatha commented Jul 23, 2024

Rationale for this change

For googletest, we have installation via BUNDLED and brew, a version mismatch from one of these options could cause conflicts and linking related issues. Preferring BUNDLED version, this PR uninstalls the brew installation of googletest.

What changes are included in this PR?

Removing brew installation of googletest

Are these changes tested?

Yes.

Are there any user-facing changes?

No

@vibhatha
Copy link
Collaborator Author

@github-actions crossbow submit -g java

Copy link

⚠️ GitHub issue #43377 has been automatically assigned in GitHub to PR creator.

@github-actions github-actions bot added the awaiting review Awaiting review label Jul 23, 2024
Copy link

Revision: 02eb021

Submitted crossbow builds: ursacomputing/crossbow @ actions-5dda3b0a91

Task Status
java-jars GitHub Actions
test-conda-python-3.11-spark-master GitHub Actions
verify-rc-source-java-linux-almalinux-8-amd64 GitHub Actions
verify-rc-source-java-linux-conda-latest-amd64 GitHub Actions
verify-rc-source-java-linux-ubuntu-20.04-amd64 GitHub Actions
verify-rc-source-java-linux-ubuntu-22.04-amd64 GitHub Actions
verify-rc-source-java-macos-amd64 GitHub Actions

Copy link
Contributor

@llama90 llama90 left a comment

Choose a reason for hiding this comment

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

I reviewed it quickly. Thank you for looking into the issue caused by my PR.

dev/tasks/java-jars/github.yml Outdated Show resolved Hide resolved
@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Jul 23, 2024
@llama90
Copy link
Contributor

llama90 commented Jul 23, 2024

Additionally, according to the link, it seems that the MACOSX_DEPLOYMENT_TARGET needs to be updated, but I’ve noticed that this code appears in many places.

I think this should be addressed beyond just Java. Should I create an issue for this?

@vibhatha
Copy link
Collaborator Author

Additionally, according to the link, it seems that the MACOSX_DEPLOYMENT_TARGET needs to be updated, but I’ve noticed that this code appears in many places.

I think this should be addressed beyond just Java. Should I create an issue for this?

That would be wonderful @llama90

* [code search result](https://github.com/search?q=repo%3Aapache%2Farrow%20MACOSX_DEPLOYMENT_TARGET&type=code)

@llama90
Copy link
Contributor

llama90 commented Jul 23, 2024

FYI: #43386 (comment)

@vibhatha
Copy link
Collaborator Author

@github-actions crossbow submit -g java java-jars

Copy link

Revision: 4b467bd

Submitted crossbow builds: ursacomputing/crossbow @ actions-9387c4cfe5

Task Status
java-jars GitHub Actions
test-conda-python-3.11-spark-master GitHub Actions
verify-rc-source-java-linux-almalinux-8-amd64 GitHub Actions
verify-rc-source-java-linux-conda-latest-amd64 GitHub Actions
verify-rc-source-java-linux-ubuntu-20.04-amd64 GitHub Actions
verify-rc-source-java-linux-ubuntu-22.04-amd64 GitHub Actions
verify-rc-source-java-macos-amd64 GitHub Actions

@vibhatha
Copy link
Collaborator Author

@github-actions crossbow submit java-jars

Copy link

Revision: 4b467bd

Submitted crossbow builds: ursacomputing/crossbow @ actions-834fce646a

Task Status
java-jars GitHub Actions

@danepitkin
Copy link
Member

danepitkin commented Jul 23, 2024

I don't think changing MACOSX_DEPLOYMENT_TARGET is going to help here, only because the warning also appears in the last successful java-jars build. It looks like parquet tests and orc tests are failing to link in the C++ layer.

For example, in https://github.com/ursacomputing/crossbow/actions/runs/10055540527/job/27792410574:

...
[497/510] Linking CXX executable release/arrow-orc-adapter-test
FAILED: release/arrow-orc-adapter-test 
...
[498/510] Linking CXX executable release/parquet-internals-test
FAILED: release/parquet-internals-test 
...
[499/510] Linking CXX executable release/parquet-writer-test
FAILED: release/parquet-writer-test 
...
[500/510] Linking CXX executable release/parquet-reader-test
FAILED: release/parquet-reader-test 
...
[501/510] Linking CXX executable release/parquet-arrow-test
FAILED: release/parquet-arrow-test 
...

@kou by chance do you know what might be happening here?

@vibhatha
Copy link
Collaborator Author

@danepitkin I was merely testing an idea, in the time period the change happened the direct change I could find was the change in the CIs. And I agree, the issue is with the test library which cannot be linked.

@kou
Copy link
Member

kou commented Jul 24, 2024

It seems that this was happen since 2024-07-16: https://github.com/ursacomputing/crossbow/actions/runs/9953458018/job/27502447467
This was not happen at 2024-07-15: https://github.com/ursacomputing/crossbow/actions/runs/9936214033/job/27449403626

We may be able to find a cause of this by diffing these logs.

@vibhatha
Copy link
Collaborator Author

@kou I looked into the history of merged PRs and sort of tracked from where it started occurring. It seems like we haven't made significant changes to the build or C++ components from Java PRs.

At this point #43109 (comment) the java-jars failed at merge for a different reason not an issue with MacOS related builds. But when I re-ran the crossbow on the merged PR, I get the current issue we are experiencing. Also this failing CI is only related to Java as it seems, and existing C++ CIs have not been reported failing AFAIK. Could this be an environment related issue?

@vibhatha
Copy link
Collaborator Author

@github-actions crossbow submit -g cpp

@vibhatha
Copy link
Collaborator Author

Just saw this filed #43400, this is the same issue.

Copy link

Revision: 4b467bd

Submitted crossbow builds: ursacomputing/crossbow @ actions-214fbb71e3

Task Status
test-alpine-linux-cpp GitHub Actions
test-build-cpp-fuzz GitHub Actions
test-conda-cpp GitHub Actions
test-conda-cpp-valgrind GitHub Actions
test-cuda-cpp GitHub Actions
test-debian-12-cpp-amd64 GitHub Actions
test-debian-12-cpp-i386 GitHub Actions
test-fedora-39-cpp GitHub Actions
test-ubuntu-20.04-cpp GitHub Actions
test-ubuntu-20.04-cpp-bundled GitHub Actions
test-ubuntu-20.04-cpp-minimal-with-formats GitHub Actions
test-ubuntu-20.04-cpp-thread-sanitizer GitHub Actions
test-ubuntu-22.04-cpp GitHub Actions
test-ubuntu-22.04-cpp-20 GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions
test-ubuntu-22.04-cpp-no-threading GitHub Actions
test-ubuntu-24.04-cpp GitHub Actions
test-ubuntu-24.04-cpp-gcc-14 GitHub Actions

@vibhatha
Copy link
Collaborator Author

@github-actions crossbow submit -g java

Copy link

Revision: 5879052

Submitted crossbow builds: ursacomputing/crossbow @ actions-0883833aa3

Task Status
java-jars GitHub Actions
test-conda-python-3.11-spark-master GitHub Actions
verify-rc-source-java-linux-almalinux-8-amd64 GitHub Actions
verify-rc-source-java-linux-conda-latest-amd64 GitHub Actions
verify-rc-source-java-linux-ubuntu-20.04-amd64 GitHub Actions
verify-rc-source-java-linux-ubuntu-22.04-amd64 GitHub Actions
verify-rc-source-java-macos-amd64 GitHub Actions

@vibhatha
Copy link
Collaborator Author

@github-actions crossbow submit java-jars

Copy link

Revision: 51f0764

Submitted crossbow builds: ursacomputing/crossbow @ actions-04d5e09e65

Task Status
java-jars GitHub Actions

@vibhatha
Copy link
Collaborator Author

@github-actions crossbow submit java-jars

Copy link

Revision: 85c1244

Submitted crossbow builds: ursacomputing/crossbow @ actions-6f3ab99e36

Task Status
java-jars GitHub Actions

@vibhatha
Copy link
Collaborator Author

@github-actions crossbow submit -g java

@vibhatha vibhatha marked this pull request as ready for review July 26, 2024 00:01
Copy link

Revision: 10c59a8

Submitted crossbow builds: ursacomputing/crossbow @ actions-96d6d76c00

Task Status
java-jars GitHub Actions
test-conda-python-3.11-spark-master GitHub Actions
verify-rc-source-java-linux-almalinux-8-amd64 GitHub Actions
verify-rc-source-java-linux-conda-latest-amd64 GitHub Actions
verify-rc-source-java-linux-ubuntu-20.04-amd64 GitHub Actions
verify-rc-source-java-linux-ubuntu-22.04-amd64 GitHub Actions
verify-rc-source-java-macos-amd64 GitHub Actions

Copy link
Member

@danepitkin danepitkin left a comment

Choose a reason for hiding this comment

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

LGTM, amazing work! I have always used bundled GTest when developing on MacOS, so I think this is good to include in our CI.

@danepitkin danepitkin merged commit 9174bb7 into apache:main Jul 26, 2024
9 checks passed
@danepitkin danepitkin removed the awaiting committer review Awaiting committer review label Jul 26, 2024
Copy link

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 9174bb7.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 4 possible false positives for unstable benchmarks that are known to sometimes produce them.

@@ -83,7 +83,7 @@ jobs:
- { runs_on: ["macos-13"], arch: "x86_64"}
- { runs_on: ["macos-14"], arch: "aarch_64" }
env:
MACOSX_DEPLOYMENT_TARGET: "10.15"
MACOSX_DEPLOYMENT_TARGET: "14.0"
Copy link
Member

@assignUser assignUser Jul 27, 2024

Choose a reason for hiding this comment

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

@vibhatha That's quite the bump, I am pretty sure we also want to support less recent macos.

Specify the minimum version of the target platform (e.g. macOS or iOS) on which the target binaries are to be deployed.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, my bad for merging this quickly. I was too eager to get java-jars working again. Let's revert that part of the diff since it's not necessary.

Copy link
Member

Choose a reason for hiding this comment

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

I was too eager to get java-jars working again.

No worry, it's a good goal^^ We can likely bump it to 11 or even 12 (as 11 is also eol... but we don't have a support policy so...)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@assignUser this was an artifact from my previous failed attempt to fix this issue. I have not reverted that. But I will revert it shortly.

@github-actions github-actions bot added the awaiting committer review Awaiting committer review label Jul 27, 2024
Comment on lines +143 to +148

# We want to use the bundled googletest for static linking. Since
# both BUNDLED and brew options are enabled, it could cause a conflict
# when there is a version mismatch.
# We uninstall googletest to ensure using the bundled googletest.
brew uninstall googletest
Copy link
Member

Choose a reason for hiding this comment

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

Could you move this part before brew bundle --file=arrow/java/Brewfile?
Because googletest is in cpp/Brewfile not java/Brewfile.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure @kou I will make a follow up PR shortly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@kou PR is here: #43462

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting changes Awaiting changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants