-
Notifications
You must be signed in to change notification settings - Fork 38
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
restcache, download sandbox - check username present if not upload #7892
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
182d680
to
a389d29
Compare
Jenkins results:
|
I will not fix the warning about CRABServer/src/python/CRABInterface/RESTCache.py Lines 189 to 190 in 84ea9f2
I am not sure if the content of the file is really text and not binary, and i am not sure it is worth checking |
shouldn't we rather catch such problems in the REST args validation step
|
about #7892 (comment) (which I agree with) |
I replicated the error [1] using downloadFromS3(crabserver=self.crabserver,
filepath=localSandboxPath,
objecttype='sandbox', logger=self.logger,
tarballname=sandboxFilename,
# username=username
) Indeed it is strange that [1]
|
Ok, found it. when calling without passing a username [1], the line validate_str('username', param, safe, RX_USERNAME, optional=True) Adds This is why i think we need to add additional checks to make sure that the username is properly set when we actually need it. [1] both downloadFromS3(crabserver=self.crabserver,
filepath=localSandboxPath,
objecttype='sandbox', logger=self.logger,
tarballname=sandboxFilename,
# username=username
username=""
) and downloadFromS3(crabserver=self.crabserver,
filepath=localSandboxPath,
objecttype='sandbox', logger=self.logger,
tarballname=sandboxFilename,
# username=username
) give the same result, because if CRABServer/src/python/ServerUtilities.py Lines 761 to 762 in 84ea9f2
do no set the username argument and the query to the server is same as the username has not been set. [2]
|
does |
I was picky w/o having looked properly at the code. Sorry. |
yeah, because as mentioned in the details under [1] in #7892 (comment) , when we use Moreover i do not think we can simply set In any case, thanks for checking, I will merge this [1]
|
Related to #6540
While developing the command
crab getsandbox
, I made by mistake a call that made the crabserver fail with an http error 500. I do not think that our production code ever makes suche a request, but it would be better to make the crabserver fail properly.Basically, it is possible that
ownerName
is empty and that the lineobjectPath = ownerName + '/sandboxes/' + tarballname
fails with "can append string to None".