-
Notifications
You must be signed in to change notification settings - Fork 70
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
api: Preserve environment variables when calling a command #784
Conversation
When calling a command with `_call` and `env` parameter is not `None`, create and modify a copy of caller process environment variables and call the command with the copy in order to preserve them. Jira ref: OAMG-7203
Thank you for contributing to the Leapp project!Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergable.
To launch regression testing public members of oamg organization can leave the following comment:
Please open ticket in case you experience technical problem with the CI. (RH internal only) Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please consider rerunning the CI by commenting leapp-ci build (might require several comments). If the problem persists, contact leapp-infra. |
Can one of the admins verify this patch? |
This PR has been linked in issue tracker (#OAMG-7209). |
Very nice, thanks a lot! |
## Packaging - bumped leapp-framework to 3.1 (oamg#677) ## Framework ### Fixes - Fixed a problem where passing environment variables to an executed child process modified the environment variables of the parent process (oamg#784) - Ignore invalid FQDNs (oamg#790) ### Enhancements - Deprecate `reporting.(Tags|Flags)`, replaced by `reporting.Groups` (oamg#677, oamg#781, oamg#788) - Introduce `is_inhibitor` function (oamg#677) - Introduce a `Blob` model field (oamg#789) - Introduce new report JSON schema v1.2.0 (default: 1.1.0) (oamg#677) ## Leapp (tool) ### Fixes - Handle missing CLI commands gracefully (oamg#785) - Requires to be executed by root only (oamg#775)
## Packaging - bumped leapp-framework to 3.1 (oamg#677) ## Framework ### Fixes - Fixed a problem where passing environment variables to an executed child process modified the environment variables of the parent process (oamg#784) - Ignore invalid FQDNs (oamg#790) ### Enhancements - Deprecate `reporting.(Tags|Flags)`, replaced by `reporting.Groups` (oamg#677, oamg#781, oamg#788) - Introduce `is_inhibitor` function (oamg#677) - Introduce a `Blob` model field (oamg#789) - Introduce new report JSON schema v1.2.0 (default: 1.1.0) (oamg#677) ## Leapp (tool) ### Fixes - Handle missing CLI commands gracefully (oamg#785) - Requires to be executed by root only (oamg#775) Signed-off-by: Petr Stodulka <pstodulk@redhat.com>
## Packaging - bumped leapp-framework to 3.1 (#677) ## Framework ### Fixes - Fixed a problem where passing environment variables to an executed child process modified the environment variables of the parent process (#784) - Ignore invalid FQDNs (#790) ### Enhancements - Deprecate `reporting.(Tags|Flags)`, replaced by `reporting.Groups` (#677, #781, #788) - Introduce `is_inhibitor` function (#677) - Introduce a `Blob` model field (#789) - Introduce new report JSON schema v1.2.0 (default: 1.1.0) (#677) ## Leapp (tool) ### Fixes - Handle missing CLI commands gracefully (#785) - Requires to be executed by root only (#775) Signed-off-by: Petr Stodulka <pstodulk@redhat.com> Signed-off-by: Petr Stodulka <pstodulk@redhat.com>
When calling a command with
_call
andenv
parameter is notNone
,create and modify a copy of caller process environment variables and
call the command with the copy in order to preserve them.
Jira ref: OAMG-7203