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

1024 Playwright protocol implementation, fixes #1024 #1228

Merged
merged 2 commits into from
May 17, 2024
Merged

Conversation

jnioche
Copy link
Contributor

@jnioche jnioche commented May 17, 2024

Thank you for contributing to Apache StormCrawler.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

For all changes:

  • [ x] Is there a issue associated with this PR? Is it referenced in the commit message?

  • [x ] Does your PR title start with #XXXX where XXXX is the issue number you are trying to resolve?

  • [x ] Has your PR been rebased against the latest commit within the target branch (typically main)?

  • [ x] Is your initial contribution a single, squashed commit?

  • [ x] Is the code properly formatted with mvn git-code-format:format-code -Dgcf.globPattern="**/*" -Dskip.format.code=false?

For code changes:

  • [ x] Have you ensured that the full suite of tests is executed via mvn clean verify?
  • [ x] Have you written or updated unit tests to verify your changes?
  • [ x] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • [x ] If applicable, have you updated the LICENSE file, including the main LICENSE file?
  • [ x] If applicable, have you updated the NOTICE file, including the main NOTICE file?

Note:

Please ensure that once the PR is submitted, you check GitHub Actions for build issues and submit an update to your PR as soon as possible.

Signed-off-by: Julien Nioche <julien@digitalpebble.com>
@jnioche jnioche added this to the 3.1.0 milestone May 17, 2024
@rzo1 rzo1 self-requested a review May 17, 2024 10:25
@@ -136,6 +136,7 @@ List of third-party dependencies grouped by their license type.
* FindBugs-jsr305 (com.google.code.findbugs:jsr305:3.0.2 - http://findbugs.sourceforge.net/)
* Google Android Annotations Library (com.google.android:annotations:4.1.1.4 - http://source.android.com/)
* Graphite Integration for Metrics (io.dropwizard.metrics:metrics-graphite:3.2.6 - http://metrics.dropwizard.io/metrics-graphite/)
* Gson (com.google.code.gson:gson:2.8.9 - https://github.com/google/gson/gson)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think, that something is leaking gson here. Maybe we can fix to 2.9.0 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what generates it.

mvn dependency:tree

[INFO] org.apache.stormcrawler:stormcrawler-playwright:jar:3.1.0-SNAPSHOT
[INFO] +- com.microsoft.playwright:playwright:jar:1.43.0:compile
[INFO] |  +- com.google.code.gson:gson:jar:2.10.1:compile
[INFO] |  +- org.opentest4j:opentest4j:jar:1.3.0:compile

Maybe it came from using an older version of playwright but then it would be removed from THIRD PARTY when calling mvn clean install ?

THIRD-PARTY.txt Show resolved Hide resolved
external/playwright/pom.xml Show resolved Hide resolved
@rzo1
Copy link
Contributor

rzo1 commented May 17, 2024

A great addition to SC!

Copy link
Contributor

@rzo1 rzo1 left a comment

Choose a reason for hiding this comment

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

I will do a PR against this branch shortly with a real-world test case. I think, that the current PDF-based scenario fooled us ;-)

Here it is: #1229

* Implements a unit test to actually test that playwright is rendering HTML/JS content correctly.
Adds an option to specify wait until state to ensure JS is executed properly
Removes PDF test, which was a "false friend" because it was returned by the mock server with an HTML mimetype and the actual returned PDF object was corrupted.

* Skip playwright tests in CI as GH action cannot execute them due to missing libs

* Fix formatting
@jnioche jnioche merged commit 2eafa0a into main May 17, 2024
7 checks passed
@jnioche jnioche deleted the playwright branch May 17, 2024 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants