-
Notifications
You must be signed in to change notification settings - Fork 732
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
fix: prevent page reload on run trigger to open remote browser #389
Open
amhsirak
wants to merge
17
commits into
develop
Choose a base branch
from
reload-fix
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 14 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
fa11a93
feat: check if robot is running
amhsirak 7328ec3
feat: route to check if robot is running
amhsirak 0093340
feat: notify on robot run after page reload
amhsirak 31840c8
feat: update status as true on run creation
amhsirak 3fe2033
feat: emit run completed socket event
amhsirak 5d636ad
feat: execute robot run as a seperate job
RohitR311 1a55090
feat: add support to execute manual run
RohitR311 f957a7c
feat: rm readyRunHandler
RohitR311 058d512
Merge pull request #391 from RohitR311/reload-fix
amhsirak 9d3c55b
feat: rm local storage run info
RohitR311 302ccd1
feat: revert browser id changes
RohitR311 de2d828
feat: modify worker to handle manual run
RohitR311 279612d
feat: handle robot run for workers
RohitR311 13d52a4
feat: emit socket event to display run status
RohitR311 8c0a832
feat: notify on page reload
RohitR311 e077306
Merge branch 'develop' into reload-fix
RohitR311 8bb2ed3
feat: add robot met id in local storage
RohitR311 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
💡 Codebase verification
Race condition risk confirmed in browser pool management
The current implementation of
BrowserPool
lacks proper synchronization mechanisms. Multiple concurrent requests could potentially pass thehasActiveRobotRun
check before any of them sets the robot run state, as the operations are not atomic. While Node.js's event loop provides some protection, it's not guaranteed to be safe in high-concurrency scenarios.Suggested improvements:
🔗 Analysis chain
Preventing parallel sessions on robot runs.
Blocking new browser sessions when
hasActiveRobotRun
is true is a solid approach. For high-traffic scenarios, consider if multiple requests might pass this check simultaneously (race condition) before the run is registered. If needed, use a lock or queue to serialize these events and avoid edge cases.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 878
Script:
Length of output: 3944
Script:
Length of output: 14625