Skip to content
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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JakobEdding
Copy link
Member

No description provided.

@@ -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"
Copy link
Member

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}?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly!

Copy link
Member

@disrupted disrupted Jan 13, 2025

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

Copy link
Member Author

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?

Copy link
Member Author

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.

Copy link
Member

@disrupted disrupted Jan 13, 2025

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.

Copy link
Member Author

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.

Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants