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

Exiting container when Standalone or Node exits #1504

Merged
merged 4 commits into from
Feb 7, 2022
Merged

Conversation

diemol
Copy link
Member

@diemol diemol commented Feb 6, 2022

Thanks for contributing to the Docker-Selenium project!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines, applied for this repository.
Avoid large PRs, help reviewers by making them as simple and short as possible.

This will exit the NodeChrome/NodeFirefox/NodeEdge/StandaloneChrome/StandaloneFirefox/StandaloneEdge container(s) when the Selenium Server process exits.

Description

The behaviour we have always had is one where supervisor controls all processes and keeps the container running. This is great because it has improved maintainability and readability. However, when the most important process, the Selenium Server, exits... the container has no purpose anymore. Users need to stop/kill the container themselves.

This change will make the container exit when the Selenium Server process exits.

Motivation and Context

In some environments like Kubernetes, it is useful to know when the Selenium Server is not running anymore to stop the pod. This was not possible because the container was still running. Now, since the container exits, the pod can be removed as well.

Used the solution proposed here Supervisor/supervisor#712 (comment)

Fixes #1435

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

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.

[🚀 Feature]: Exit browser node docker container after the node server is killed using drain api.
1 participant