-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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
[SPARK-31765][WEBUI][test-maven] Upgrade HtmlUnit >= 2.37.0 #28585
Conversation
// QueuedThreadPoolExecutor#setIdleTimeout is changed and IllegalStateException | ||
// will be thrown if we try to set idle timeout after the server has started. | ||
// But this workaround works for Jetty 9.4.28 by ignoring the exception. | ||
Try(pool.setIdleTimeout(0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that as of Jetty 9.4.21, the implementation of QueuedThreadPool
.
When QueuedThreadPool#setIdleTimeout
is called, QueuedThreadPool#_idleTimeout
is set to the new timeout as well as ReservedThreadExecutor#_idleTimeout
.
If ReservedThreadExecutor#_idleTImeout
is tried to be set after Jetty has started, IllegalStateException
will be thrown.
But QueuedThreadPool#_idleTimeout
will be set so this workaround will still work by ignoring the exception.
Test build #122866 has finished for PR 28585 at commit
|
Ah, I remember that some tests will fail because the latest HtmlUnit can't properly interpret JavaScript code used in those tests. |
Looks OK pending tests |
cc @gengliangwang too FYI. seems okay to me too |
@@ -784,6 +784,7 @@ class UISeleniumSuite extends SparkFunSuite with WebBrowser with Matchers with B | |||
|
|||
eventually(timeout(10.seconds), interval(50.milliseconds)) { | |||
goToUi(sc, "/jobs") | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This extra empty line is wrong change but after #28578 is merged, this testcase will be moved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the work!
merging to master |
@gengliangwang This PR doesn't pass test. |
@sarutak sorry about that, let me do the revert |
Test build #122950 has finished for PR 28585 at commit
|
I merged #28578 ; this may need a rebase |
Test build #123015 has finished for PR 28585 at commit
|
According to the last failure, I noticed that real headless browser support is needed for HistoryServer tests too. |
…ver tests ### What changes were proposed in this pull request? This PR adds two things. Real headless browser support for HistoryServer tests. A test suite using headless Chrome as one instance of those browsers. ### Why are the changes needed? The motivation is same as #28578 . In the current master, there is a testcase for HistoryServer which uses Ajax so we need the support for HistoryServer tests. Also this change is necessary to upgrade HtmlUnit (See #28585) ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? I tested with following patterns. Both Chrome and Chrome driver should be installed to test. 1. sbt / with default excluded tags (ChromeUIHistoryServerSuite is expected to be skipped and SQLQueryTestSuite is expected to succeed) `build/sbt -Dspark.test.webdriver.chrome.driver=/path/to/chromedriver "testOnly org.apache.spark.deploy.history.ChromeUIHistoryServerSuite org.apache.spark.sql.SQLQueryTestSuite" 2. sbt / overwrite default excluded tags as empty string (Both suites are expected to succeed) `build/sbt -Dtest.default.exclude.tags= -Dspark.test.webdriver.chrome.driver=/path/to/chromedriver "testOnly org.apache.spark.deploy.history.ChromeUIHistoryServerSuite org.apache.spark.sql.SQLQueryTestSuite" 3. sbt / set `test.exclude.tags` to `org.apache.spark.tags.ExtendedSQLTest` (Both suites are expected to be skipped) `build/sbt -Dtest.exclude.tags=org.apache.spark.tags.ExtendedSQLTest -Dspark.test.webdriver.chrome.driver=/path/to/chromedriver "testOnly org.apache.spark.deploy.history.ChromeUIHistoryServerSuite org.apache.spark.sql.SQLQueryTestSuite" 4. Maven / with default excluded tags (ChromeUIHistoryServerSuite is expected to be skipped and SQLQueryTestSuite is expected to succeed) `build/mvn -Dspark.test.webdriver.chrome.driver=/path/to/chromedriver -Dtest=none -DwildcardSuites=org.apache.spark.deploy.history.ChromeUIHistoryServerSuite,org.apache.spark.sql.SQLQueryTestSuite test` 5. Maven / overwrite default excluded tags as empty string (Both suites are expected to succeed) `build/mvn -Dtest.default.exclude.tags= -Dspark.test.webdriver.chrome.driver=/path/to/chromedriver -Dtest=none -DwildcardSuites=org.apache.spark.deploy.history.ChromeUIHistoryServerSuite,org.apache.spark.sql.SQLQueryTestSuite test` 6. Maven / set `test.exclude.tags` to `org.apache.spark.tags.ExtendedSQLTest` (Both suites are expected to be skipped) `build/mvn -Dtest.exclude.tags=org.apache.spark.tags.ExtendedSQLTest -Dspark.test.webdriver.chrome.driver=/path/to/chromedriver -Dtest=none -DwildcardSuites=org.apache.spark.deploy.history.ChromeUIHistoryServerSuite,org.apache.spark.sql.SQLQueryTestSuite test` Closes #28622 from sarutak/headless-browser-support-for-historyserver. Authored-by: Kousuke Saruta <sarutak@oss.nttdata.com> Signed-off-by: Sean Owen <srowen@gmail.com>
Thanks @dongjoon-hyun for monitoring this. |
Thanks @dongjoon-hyun , @HyukjinKwon . |
Thanks, @sarutak . |
Test build #123462 has finished for PR 28585 at commit
|
Test build #123469 has started for PR 28585 at commit |
@dongjoon-hyun @HyukjinKwon The reason of the failure seems that |
Sounds reasonable. Thanks! |
retest this please. |
Test build #123501 has started for PR 28585 at commit |
retest this please. |
Test build #123518 has finished for PR 28585 at commit
|
retest this please. |
Test build #123522 has finished for PR 28585 at commit
|
By excluding old version of |
Heh, do we think it's safe to merge again? |
The errors were reproduced in PR builder and they are fixed by excluding the old |
I'll merge today if there are no objections |
Trying again - merged to master |
According to @sarutak , this broke |
Shoot. If this is non-essential, I think we can just revert it. |
Thanks, @srowen ~ |
What changes were proposed in this pull request?
This PR upgrades HtmlUnit.
Selenium and Jetty also upgraded because of dependency.
Why are the changes needed?
Recently, a security issue which affects HtmlUnit is reported.
https://nvd.nist.gov/vuln/detail/CVE-2020-5529
According to the report, arbitrary code can be run by malicious users.
HtmlUnit is used for test so the impact might not be large but it's better to upgrade it just in case.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Existing testcases.