joseluisll opened a new pull request, #8757:
URL: https://github.com/apache/hadoop/pull/8757

   ### Description of PR
   
   PhantomJS 2.1.1 (downloaded by phantomjs-maven-plugin for the 
`hadoop-yarn-applications-catalog-webapp` Jasmine specs) bundles OpenSSL 1.x. 
On OpenSSL 3 systems, such as the ubuntu-noble precommit image, 
`/etc/ssl/openssl.cnf` declares `providers = provider_sect`. OpenSSL 1.x fails 
to load `libproviders.so`, prints "Auto configuration failed" and exits before 
opening its WebDriver port. jasmine-maven-plugin then fails with 
`UnreachableBrowserException`, the reactor stops, and the unit vote is -1 on 
every PR.
   
   Fix: a Unix-only profile (`phantomjs-openssl-conf`) in the catalog-webapp 
pom starts PhantomJS through `/bin/sh -c 'OPENSSL_CONF=/dev/null exec "$0" 
"$@"' <phantomjs> ...`, using the `phantomjs.binary.path` and 
`phantomjs.cli.args` capabilities.
   
   - Same approach as RANGER-4791 (apache/ranger@de2fa77): `OPENSSL_CONF` is 
set only for the process that starts PhantomJS. Ranger used 
frontend-maven-plugin's `environmentVariables`. jasmine-maven-plugin / 
`PhantomJSDriverService` cannot set the browser's environment (it logs 
`environment: {}`), hence the `sh -c` wrapper.
   - Fixes developers' local builds on any OpenSSL 3 distro, not only CI. No 
image-wide `OPENSSL_CONF` change, which would affect every tool in the 
container.
   - The specs still run; nothing is skipped. Windows keeps launching PhantomJS 
directly.
   - `/dev/null` is an empty, valid config on every system.
   - Durable follow-up: replace PhantomJS (unmaintained) with headless Chromium.
   
   ### How was this patch tested?
   
   Ubuntu 24.04, OpenSSL 3.0.13 (same `openssl.cnf` as the precommit image):
   `mvn test -pl 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp`
   
   Before:
       Auto configuration failed
       ...filename(libproviders.so): libproviders.so: cannot open shared object 
file
       ...MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=providers, 
path=providers
       [ERROR] Failed to execute goal 
com.github.searls:jasmine-maven-plugin:2.1:test ... UnreachableBrowserException
       BUILD FAILURE
   
   After:
       INFO: executable: /bin/sh
       Results: 15 specs, 0 failures, 0 pending
       BUILD SUCCESS
   
   Checked with `help:effective-pom` that with the profile deactivated (as on 
Windows), the jasmine configuration is unchanged.
   
   ### For code changes:
   
   - [x] Does the title of this PR start with the corresponding JIRA issue id 
(e.g. 'HADOOP-17799. Your PR title ...')?
   - [ ] Object storage: Have the integration tests been executed and the 
endpoint declared according to the connector-specific documentation? (N/A)
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under ASF 2.0? (N/A, no new 
dependencies)
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, 
`NOTICE-binary` files? (N/A)
   
   ### AI Tooling
   
   - [x] The PR includes the phrase "Contains content generated by Claude Code".
   - [x] My use of AI contributions follows the ASF legal policy 
https://www.apache.org/legal/generative-tooling.html
   
   Contains content generated by Claude Code.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to