Skip to content

fix: handle when FileSystem already exists #1140

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

Merged
merged 11 commits into from
Jan 6, 2023

Conversation

AriaMoradi
Copy link
Contributor

Fixes #1138

We verified this works with fat jars with our own.

Reference: Suwayomi/Suwayomi-Server#462

Copy link
Member

@yury-s yury-s left a comment

Choose a reason for hiding this comment

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

The implementation looks good, can you add a test where the jar file system already exists and playwright would throw without the fix?

I believe you can do something like ./tools/test-cli-version and in the main test file create jar file system before calling playwright, something like

    URI uri = new URI("jar:file:/home/user/.m2/repository/com/microsoft/playwright/driver-bundle/1.28.0/driver-bundle-1.28.0.jar!/driver/linux");
    FileSystem fs = FileSystems.newFileSystem(uri, Collections.emptyMap());
    assertNotNull(fs);
    try (Playwright playwright = Playwright.create()) {
      Browser browser = playwright.chromium().launch();
      Page page = browser.newPage();
    }

@AriaMoradi
Copy link
Contributor Author

@microsoft-github-policy-service agree

@AriaMoradi AriaMoradi requested a review from yury-s January 5, 2023 20:58
@Syer10
Copy link

Syer10 commented Jan 5, 2023

@microsoft-github-policy-service agree

@AriaMoradi AriaMoradi requested a review from yury-s January 5, 2023 22:39
@AriaMoradi AriaMoradi requested a review from yury-s January 6, 2023 00:03
@Syer10
Copy link

Syer10 commented Jan 6, 2023

Looks like the Test CLI action ran successfully this time around 🎉

@Syer10 Syer10 force-pushed the AriaMoradi-patch-1 branch from ce504e2 to 07daf9e Compare January 6, 2023 20:19
@AriaMoradi
Copy link
Contributor Author

Is this ready to merge?

@yury-s
Copy link
Member

yury-s commented Jan 6, 2023

Yes, it's ready to be merged, you can do that or I can merge later once the tests complete. Thanks for addressing all the comments!

@yury-s yury-s merged commit 8c0231b into microsoft:main Jan 6, 2023
@AriaMoradi AriaMoradi deleted the AriaMoradi-patch-1 branch January 7, 2023 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] failed to create driver when running from a jar artifact
3 participants