Open forsyth2 opened 2 months ago
I've tried to do a preliminary code change here to address #338 and #339. However, the code in this pull request unfortunately results in python -u -m unittest tests/test_globus.py
just hanging after prompting for one auth code. I will continue looking into this. In the meantime:
fair_research_login.NativeClient
rather than the globus_sdk.NativeAppAuthClient
?To @golaz's point in #339, the Globus authentication process has really impacted zstash's usability. We should address it before the next E3SM Unified release. Examples of impacts:
The two biggest problems at the moment seem to be:
My main recommendation is completely getting rid of fair_research_login; also, the test tests/test_globus.py seems to be independent of zstash/globus.py, which means changing one isn't necessarily going to be reflected in the other. I am misreading this? If my understanding is correct, the test has to be updated, right?
The fair_research_login stuff seems to still be in use here:
Additionally, once you get rid of fair_research_login, be sure to relax the constraint on the globus sdk:
the test tests/test_globus.py seems to be independent of zstash/globus.py
Yes, the test function preactivate_globus
replaces the production-use function globus_activate
.
Details, going through the test code:
testLs
calls helperLsGlobus
helperLsGlobus
calls self.preactivate_globus()
helperLsGlobus
then sets up the HPSS path, the cache, and the directory setupDir
to archive.
helperLsGlobus
then calls self.create()
which will run zstash create
. This will trigger Globus because hpss_path
was set as f"globus://{hpss_globus_endpoint}/~/zstash_test/"
in testLs
. That is, it will ultimately call globus.py globus_transfer
. Now, globus_activate("globus://" + remote_ep)
will not be called because test_globus.py preactivate_globus
already set self.transfer_client = TransferClient(authorizer=transfer_authorizer)
.
Issue resolution
Select one: This pull request is...
1. Does this do what we want it to do?
Objectives:
Required:
If applicable:
2. Are the implementation details accurate & efficient?
Required:
If applicable:
zstash/conda
, not just animport
statement.3. Is this well documented?
Required:
4. Is this code clean?
Required:
If applicable: