-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add convenience environment variable for name of parent pipeline #582
base: main
Are you sure you want to change the base?
Conversation
@@ -23,6 +23,8 @@ def test_should_set_pipeline_name_with_default_base_dir(): | |||
assert ENV["pipeline.name_3"] == "for" | |||
assert ENV["pipeline.name_4"] == "testing" | |||
|
|||
assert ENV["pipeline.parent_name"] == "some-random-path-for" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this is essentially equivalent to ${pipeline.name_0}-${pipeline.name_1}-${pipeline.name_2}-${pipeline.name_3}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while I am generally fine with adding this for convenience, it raises the question whether we will need the rest of those in the future. essentially we could do pipeline.parent.parent.<...>.name
for each higher level
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, I was thinking about this too. Does this information perhaps already exist in the networkx graph that we're creating somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the variables available in the scope of this method should be enough to create env vars like you proposed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please also check for overlap with the existing ${pipeline.path}
environment variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wdym by overlap? As far as I can tell, ${pipeline.path}
is the absolute path to the pipeline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to me the meaning gets a little muddy here. I guess pipeline.parent
doesn't mean parent pipeline but directory name of the parent path. We should decide which namespace fits better or how we can make this easy to understand and extend. e.g. pipeline.parent_name
like you suggested or something like pipeline.path.parent.name
No description provided.