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

FEAT: Add new parser Env #4196

Closed
wants to merge 2 commits into from
Closed

FEAT: Add new parser Env #4196

wants to merge 2 commits into from

Conversation

TZ3070
Copy link
Contributor

@TZ3070 TZ3070 commented Aug 21, 2024

All Pull Requests:

Check all that apply:

  • Have you followed the guidelines in our Contributing document, including the instructions about commit messages?
  • Is this PR to correct an issue?
  • Is this PR an enhancement?

Complete Description of Additions/Changes:

Add new parser Env

Xintli and others added 2 commits August 21, 2024 12:15
@@ -214,6 +214,7 @@ class DefaultSpecs(Specs):
duplicate_machine_id = machine_ids.dup_machine_id_info
eap_json_reports = foreach_collect(eap_reports.eap_report_files, "%s")
engine_log = simple_file("/var/log/ovirt-engine/engine.log")
env = simple_command("/usr/bin/env")
Copy link
Contributor

@xiangce xiangce Aug 21, 2024

Choose a reason for hiding this comment

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

The insights core doesn't inherit the ENV variables set by default, you need to use the inherit_env explicitly to make the collect process get the specific ENV var being passed from os.environ to the subprocess.

env = simple_command("/usr/bin/env", inherit_env=["LD_LIBRARY_PATH"])



@parser(Specs.env)
class Env(CommandParser, list):
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use dict?

@xiangce xiangce requested a review from JoySnow August 21, 2024 06:01
@TZ3070
Copy link
Contributor Author

TZ3070 commented Aug 21, 2024

@xiangce ACK
@JoySnow Please hold the review because the card may abandon.

@xiangce xiangce marked this pull request as draft August 22, 2024 05:43
@TZ3070
Copy link
Contributor Author

TZ3070 commented Sep 3, 2024

Close the PR because the card is abandoned.

@TZ3070 TZ3070 closed this Sep 3, 2024
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