Skip to content

Conversation

@vringar
Copy link
Contributor

@vringar vringar commented Aug 7, 2024

No description provided.

@vringar vringar force-pushed the delete_tmpdir branch 4 times, most recently from 150d0da to aa60700 Compare August 7, 2024 17:01
@vringar vringar changed the title Delete tmpdir feat(browser_manager): enable full XPI cleanup Aug 7, 2024
@codecov
Copy link

codecov bot commented Aug 7, 2024

Codecov Report

Attention: Patch coverage is 57.14286% with 9 lines in your changes missing coverage. Please review.

Project coverage is 38.55%. Comparing base (dedc84b) to head (295eaa8).
Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
openwpm/browser_manager.py 58.82% 7 Missing ⚠️
openwpm/deploy_browsers/deploy_firefox.py 0.00% 2 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (dedc84b) and HEAD (295eaa8). Click for more details.

HEAD has 15 uploads less than BASE
Flag BASE (dedc84b) HEAD (295eaa8)
17 2
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1104      +/-   ##
==========================================
- Coverage   45.64%   38.55%   -7.09%     
==========================================
  Files          35       35              
  Lines        3475     3496      +21     
==========================================
- Hits         1586     1348     -238     
- Misses       1889     2148     +259     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ndanner-wesleyancs
Copy link

Do you need me to do anything more on this? I'm not well versed in CI/Codecov/etc., so I'm not sure where things stand based on what I see here.

@vringar
Copy link
Contributor Author

vringar commented Aug 10, 2024

I haven't fully figured out what is causing these but I've also been focusing on #1103
I don't think you need to do anything else here

Set TMPDIR in the environment to a unique directory for each browser
instance and delete it when the browser quits.

This is a workaround for an issue with geckodriver.  When the OpenWPM
extension is installed via `WebDriver.install_addon()`, geckodriver
makes a copy of the XPI file in TMPDIR.  However, geckodriver never
deletes that file.  So on a stateless crawl, you end up with one copy of
the XPI file for each site visited.

This workaround sets TMPDIR in the environment before creating the
geckodriver service, and then deletes the directory after
`driver.quit()` returns in `BrowserManager.run()`.  We use this
indirection because we don't have access to the name of the temporary
file, and it doesn't seem safe to just delete XPI files in /tmp.
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.

3 participants