https://dagster.io/ logo
#announcements
Title
# announcements
j

Jake Smart

11/19/2020, 2:55 AM
Is there a way to access the repository name from a run context/solid handle?
a

alex

11/19/2020, 3:34 PM
I don’t believe so - we allow executing pipelines that did not come from a repository. What is your use case?
j

Jake Smart

11/19/2020, 4:10 PM
The use case is for writing to files that will move around the org outside of dagster. I’d like to be able to store the origin/organize the origin of these files in a case where there will be many repositories running at once. something like
Copy code
key_path = f"{mode}/{prefix}/{contex.repository_name}/{model_name}/logs/{run_date}/{git_hash}:{context.run_id}.json"
where
contex.repository_name
would be the runtime repository
a

alex

11/19/2020, 4:14 PM
is pipeline name a usable replacement? or do you want multiple pipelines going to the same place?
using
tags
might be a workaround
@pipeline(tags={'the_name': 'foo'})
context.pipeline_def.tags['the_name']
j

Jake Smart

11/19/2020, 4:45 PM
yeah i think tags could work, though it’ll force my users to maintain that where as having the writing resource reflect the current repo wouldn’t. The reason this comes up is because we will have many different repositories each representing a different execution environment, each containing many pipelines
j

Jake Smart

11/19/2020, 4:57 PM
oh perfect