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

remote: add session support for reservations and acquired places #4

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

luke-hackwell
Copy link
Collaborator

@luke-hackwell luke-hackwell commented Dec 17, 2024

Description
Adds a --session option to the labgrid-client monitor, reserve and acquire commands.
Enables the user to setup a monitor session. Reservations and place acquisitions which are registered to the same monitor sessions will be released if the monitor session ends.

This is useful for reservations and places acquired under a CI job which may be killed without warning.

Example usage:

labgrid-client monitor --session $$ &
MONITOR_PID="$!"
eval $(labgrid-client reserve  --session $$ --shell tag=value)
labgrid-client -p + lock --session $$
kill "${MONITOR_PID}"

Checklist

  • Documentation for the feature
  • Tests for the feature
  • The arguments and description in doc/configuration.rst have been updated
  • Add a section on how to use the feature to doc/usage.rst
  • Add a section on how to use the feature to doc/development.rst
  • PR has been tested
  • Man pages have been regenerated

@luke-hackwell
Copy link
Collaborator Author

luke-hackwell commented Dec 17, 2024

I need to check if documentation is required and add if so

@luke-hackwell
Copy link
Collaborator Author

Code has been formatted by ruff and isort

@luke-hackwell luke-hackwell force-pushed the persist-client-connection-2 branch 2 times, most recently from 91a1f24 to c7a790b Compare December 18, 2024 11:20
Copy link

@alextercete alextercete left a comment

Choose a reason for hiding this comment

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

Good job! Just a few suggestions.

doc/usage.rst Outdated Show resolved Hide resolved
labgrid/remote/client.py Outdated Show resolved Hide resolved
labgrid/remote/coordinator.py Show resolved Hide resolved
labgrid/remote/coordinator.py Outdated Show resolved Hide resolved
labgrid/remote/coordinator.py Outdated Show resolved Hide resolved
labgrid/remote/coordinator.py Outdated Show resolved Hide resolved
labgrid/remote/coordinator.py Outdated Show resolved Hide resolved
tests/coordinator/test_coordinator.py Outdated Show resolved Hide resolved
tests/coordinator/test_sessions.py Outdated Show resolved Hide resolved
@luke-hackwell luke-hackwell force-pushed the persist-client-connection-2 branch from c7a790b to b17e17a Compare December 19, 2024 16:22
@luke-hackwell luke-hackwell self-assigned this Dec 19, 2024
Adds a --session option to the labgrid-client monitor, reserve and acquire commands.
Enables the user to setup a monitor session. Reservations and place acquisitions which are registered to the same monitor sessions will be released if the monitor session ends.

Signed-off-by: Luke Hackwell <[email protected]>
@luke-hackwell luke-hackwell force-pushed the persist-client-connection-2 branch from b17e17a to 718edd8 Compare January 6, 2025 11:15
@alextercete alextercete merged commit bfb7a93 into master Jan 6, 2025
@alextercete alextercete deleted the persist-client-connection-2 branch January 6, 2025 11:54
@luke-hackwell luke-hackwell restored the persist-client-connection-2 branch January 6, 2025 15:53
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.

2 participants