fix: use tmp folder for user data dir for each concurrent chromium process#19
Merged
hengfeiyang merged 1 commit intomainfrom Jun 23, 2025
Merged
fix: use tmp folder for user data dir for each concurrent chromium process#19hengfeiyang merged 1 commit intomainfrom
hengfeiyang merged 1 commit intomainfrom
Conversation
hengfeiyang
approved these changes
Jun 23, 2025
Subhra264
added a commit
to openobserve/openobserve
that referenced
this pull request
Jun 26, 2025
…nstances (#7322) ### **User description** Ref: openobserve/o2_report_server#19 concurrent chromium instances tries to create singletonock file in the `tmp/chromiumoxide-runner/SingletonLock` which throws error because only one instance can create that at a particular time. This pr fixes this by creating temporary user directories for chromium. ___ ### **PR Type** Bug fix, Enhancement ___ ### **Description** - Use `tempfile::tempdir` for isolated browser dirs - Change launcher options to return builder - Build browser config with `user_data_dir` - Ensure tempdir cleaned up with error logging ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Bug fix</strong></td><td><table> <tr> <td> <details> <summary><strong>report.rs</strong><dd><code>Add tempdir-based user_data_dir and builder config</code> </dd></summary> <hr> src/report_server/src/report.rs <li>Switch <code>CHROME_LAUNCHER_OPTIONS</code> to <code>BrowserConfigBuilder</code><br> <li> Modify <code>init_chrome_launch_options</code> to return builder<br> <li> Introduce <code>tempfile::tempdir()</code> for per-run user data<br> <li> Build browser config with <code>user_data_dir</code> and map errors<br> <li> Add tempdir cleanup in error and success paths </details> </td> <td><a href="https://github.com/openobserve/openobserve/pull/7322/files#diff-a8d5d0e0fc56e67b38a20a46b91cc2e6bf76ade360a37ad29fce51cc4661a9a6">+24/-7</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > <details> <summary> Need help?</summary><li>Type <code>/help how to ...</code> in the comments thread for any questions about PR-Agent usage.</li><li>Check out the <a href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a> for more information.</li></details>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.