fermitools / jobsub_lite

jobsub_lite is a wrapper for HTCondor job submission
Apache License 2.0
1 stars 7 forks source link

When --global-pool flag is passed, make sure we save the BEARER_TOKEN_FILE and X509_USER_PROXY into the restored environment post-submission #568

Closed shreyb closed 6 months ago

shreyb commented 6 months ago

This fixes a bug that was introduced with the combination of #565 and #551. Namely, for the --global-pool case, we were saving the environment before modifying the collector host, and then directly before submission, restoring it with packages.orig_env().

In this bug, since the original environment is saved during argument parsing, the credentials have not yet been gotten, and thus the BEARER_TOKEN_FILE and X509_USER_PROXY environment settings were wiped when packages.orig_env() is called in condor.submit().

This PR fixes that bug, revealed in the testing of the 1.8-rc1 release.

shreyb commented 6 months ago

Note: With this fix, all unit tests now pass in AL9.