ncbi / elastic-blast

ElasticBLAST is a cloud-based tool to perform your BLAST searches faster and make you more effective
https://blast.ncbi.nlm.nih.gov/doc/elastic-blast
Other
46 stars 15 forks source link

Owner / User login name breaks AWS Batch's jobDefinitionName #7

Closed snamburi3 closed 2 years ago

snamburi3 commented 2 years ago

If the user's login name has dot(".") in it, it breaks the AWS Batch's jobDefinitionName. AWS jobDefinitionName can contain only uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).

Error message: image

My username for job submission is firstname.lastname. I suggest replacing below with getpass.getuser().replace(".","-")

https://github.com/ncbi/elastic-blast/blob/7f5b2108afe7c9fa802f77426058ff4fd2df2546/src/elastic_blast/aws.py#L142

christiam commented 2 years ago

Hi @snamburi3 , Thanks for the report. The fixed source code will be made available shortly.

christiam commented 2 years ago

This issue has been addressed in https://github.com/ncbi/elastic-blast/releases/tag/0.2.0

@snamburi3 - please let us know if you run into any issues or have any feedback.

snamburi3 commented 2 years ago

@christiam I believe this bug is not fixed. I am still getting the same error with latest versin.

when I test the regular expression from below, it does not sanitize the string.

https://github.com/ncbi/elastic-blast/blob/master/src/elastic_blast/util.py#L405

example:

>>> input_label="test.test"
>>> re.sub(r'[^\w_\.:/+@]', '-', input_label.strip())
'test.test'
christiam commented 2 years ago

@snamburi3 - thanks for the heads up, we will address this in the next release.

christiam commented 2 years ago

@snamburi3 - we have just released ElasticBLAST 0.2.1 (https://github.com/ncbi/elastic-blast/releases/tag/0.2.1), which should address the issue reported here. Could you please let us know if you run into any issues or have any feedback? Thanks!

sean-bam commented 2 years ago

Hi Christian, former NCBI'er here. Really looking forward to using elastic-blast, but I'm running into a similar issue with the user name. My username contains a "_", which I think causes the following error: ERROR: "elasticblast-example_name-eevf9b7gd" is not a valid GKE cluster name. The string must be less than 40 characters and can only contain lowercase letters, digits, and dashes. I'm using elastic-blast v. 0.2.2 on GCP cloud shell

christiam commented 2 years ago

Hi @sean-bam , I'm sorry you ran into trouble, but many thanks for the heads up. We are working on a fix and will cut a release soon.

sean-bam commented 2 years ago

Thanks for getting to this so quickly! I don't have any issues with the GKE cluster name now, using v. 0.2.3. However, I ran into another problem unrelated to this one (I think), so I'll open up a different issue

christiam commented 2 years ago

Thanks for the feedback, I'll close this issue since it seems to have been addressed.