Skip to content

remote/client: let -p restrict env-wide acquire/release - #1943

Open
Sanjays2402 wants to merge 1 commit into
labgrid-project:masterfrom
Sanjays2402:fix/place-restricts-env-acquire
Open

remote/client: let -p restrict env-wide acquire/release#1943
Sanjays2402 wants to merge 1 commit into
labgrid-project:masterfrom
Sanjays2402:fix/place-restricts-env-acquire

Conversation

@Sanjays2402

Copy link
Copy Markdown

Description

Since acquire/release started operating on all RemotePlaces in the environment config, passing both -c env.yaml and -p NAME silently ignored -p and acquired every place in the env — contending with other users and CI jobs that historically used that combination to manage one device at a time.

An explicitly requested place (-p/--place, LG_PLACE, or the legacy PLACE variable) now restricts acquire/release to that single place. Without one, the env-wide behaviour is unchanged.

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

Tested locally: the new test_place_acquire_with_env_and_place fails on master (both places acquired) and passes with the fix; test_place_acquire, test_place_acquire_multiple and test_place_acquire_enforce still pass.

Fixes #1868

Since acquire/release started operating on all RemotePlaces in the
environment config, passing both -c env.yaml and -p NAME silently
ignored -p and acquired every place in the env, contending with other
users and CI jobs.

An explicitly requested place (-p/--place, LG_PLACE or the legacy PLACE
variable) now restricts acquire/release to that single place; without
one the env-wide behaviour is unchanged.

Adds a regression test covering -c env.yaml combined with -p.
@Emantor

Emantor commented Jul 25, 2026

Copy link
Copy Markdown
Member

I don't think we want to support this case. Environment files describe the complete testing environment, if only a subset of places is required for the test run, this should be done in a new separate environment file.

@Sanjays2402

Copy link
Copy Markdown
Author

Fair enough, that's a reasonable line to hold. I read -p as already being a filter in the client, so extending it to acquire/release felt consistent, but if environment files are meant to describe the complete environment then a separate file is the cleaner answer.

Happy to close this. #1942 is unrelated and stands on its own.

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.

-p/--place is silently ignored by acquire/release when -c env.yaml is also given

2 participants