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

Remove environment mangling #2132

Closed
wants to merge 13 commits into from
Closed

Remove environment mangling #2132

wants to merge 13 commits into from

Conversation

mesmith75
Copy link
Contributor

@mesmith75 mesmith75 commented Mar 15, 2023

Fixes #2104

We should leave the environments as os._Environ objects. It stop the mangling of the environment that causes #2104

@mesmith75 mesmith75 changed the title Remove environment mangling WIP: Remove environment mangling Mar 15, 2023
@mesmith75 mesmith75 changed the title WIP: Remove environment mangling Remove environment mangling Mar 15, 2023
Copy link
Contributor

@alexanderrichards alexanderrichards left a comment

Choose a reason for hiding this comment

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

This is interesting as on the face of it we seem to simply be copying the os.environ so I wouldn't have expected any difference between this and the new code where we use the os.environ directly. I imagine the reason this was do was to create a copy of the environment to avoid polluting it.

execute('source {0} {1}'.format(setup, " ".join(setup_args)), shell=True, env=self.env, update_env=True)

else:
# bug #44334: Ganga/Utility/Shell.py does not save environ
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume that the bug #44334 is a reference to something very old that we don't care about.

Copy link
Member

@egede egede left a comment

Choose a reason for hiding this comment

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

Both GangaDirac and GangaLHCb tests are failing. The GangaDirac failures seems directly caused by the changes here. The GangaLHCb ones are hard to understand but might just be caused by the Dirac failures.

@mesmith75 mesmith75 closed this Dec 9, 2023
@mesmith75 mesmith75 deleted the fix_envs branch December 9, 2023 17:52
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.

subprocess.Popen does not work with the centos 8 environment
3 participants