ganga-devs / ganga

Ganga is an easy-to-use frontend for job definition and management
GNU General Public License v3.0
100 stars 159 forks source link

Wrong default value assigned to DiracFile object #2322

Closed tjharris1 closed 7 months ago

tjharris1 commented 7 months ago

There appears to be a discrepancy in my credential_requirements for DiracFile. Running config.defaults_DiracFile['credential_requirements'] returns 'DiracProxy' but running DiracFile().credential_requirements returns AfsToken(). I was alerted to this when attempting to access DiracFile objects only to be asked for a Kerberos passowrd.

mesmith75 commented 7 months ago

I cannot reproduce this:

[10:16:13]
Ganga In [7]: DiracFile().credential_requirements
Ganga Out [7]: 
 DiracProxy (
   group = lhcb_user,
   encodeDefaultProxyFileName = False,
   dirac_env = None,
   validTime = None
 )

Is there anything in your ~/.gangarc that may be changing the default?

egede commented 7 months ago

I have debugged this with @tjharris1 and it is really odd. There seems in his session to be a discrepancy between what the config object says is the default value, and the value the object then is created with. For me on the same machine, it works as expected. We tried playing with the .gangarc file, but it makes no difference.

egede commented 7 months ago

OK, so I did some more debugging related to this. The cause is related to an earlier job in the gangadir. I don't know how, but reading previous jobs from the gangadir is causing the default value of the credential_requirement in the DiracFile object to change.

Starting with a fresh gangadir solves the problem for Tom (but doesn't identify the bug).

I suspect the problem is related to how the config system works for a ComponentItem but I have failed to reproduce the problem ...