grailbio / reflow

A language and runtime for distributed, incremental data processing in the cloud
Apache License 2.0
965 stars 52 forks source link

-user not working as expected #50

Closed olgabot closed 6 years ago

olgabot commented 6 years ago

Running reflow on ec2, this creates jobs that are called ubuntu@localhost (reflow) and I want it to instead say my username, e.g. olgabot@localhost (reflow) so that I can see which jobs are mine vs someone else's. Is there a way to do e.g. reflow -user $AWS_USERNAME or some equivalent? Here I use my AWS username but I don't understand what a "provider" is here.

 Fri 29 Jun - 19:50  ~/kmer-hashing/sourmash/maca/facs_v5_1000cell_dna-only_scaled_trim_comparison   origin ☊ master 4☀ 2‒ 
 ubuntu@ip-172-31-42-179  reflow -user olgabot runbatch -reset -retry -gc
provider olgabot not defined for key user
mariusae commented 6 years ago

Try reflow -user=local,olgabot@localhost.

Reflow has a unified configuration system: values provided in Reflow's config may be overridden by flags. It's also self documenting: here is how I found the answer for the above:

$ reflow config -help
...
user: local,username
    provide a local username

This tells me that the "user" key has a provider called "local" which takes a username argument. Thus I can either specify a user as above, via the command line flag, or include it in $HOME/.reflow/config.yaml, which may be more convenient (no need to specify the flag each time). In that case, just add the following to this file:

user: local,olgabot@localhost
olgabot commented 6 years ago

Ohhh I see, both left and right sides of the comma need to be specified. I read it as either left or right is specified. Thanks!