-
Notifications
You must be signed in to change notification settings - Fork 947
Let users disable datasets renaming for namespaced pipelines #4700
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
Conversation
Signed-off-by: Ankita Katiyar <[email protected]>
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.
The suggested solution looks good to me!
I think one important thing not mentioned here is what will be the API for users to enable/disable this behaviour.
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.
Thank you for adding extra explanation!
For me rename
flag seems a big confusing. Maybe we can consider some other names like namespace_entries
/ namespace_datasets
. Not a blocker as solution itself looks good.
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.
Thanks for the PR, @ankatiyar!
I fully support the solution - adding an option to avoid prefixing of inputs, outputs, parameters and confirms when creating a new pipeline with a namespace makes perfect sense.
A few concerns to consider in the current PR:
-
Naming of the option ("rename")
The current name does not seem clear enough. Imagine seeingPipeline(..., rename=False)
— it is not obvious what is not being renamed. Is it the pipeline itself, the nodes, the datasets?
Given that this is a niche option, the name should be more descriptive and self-explanatory. -
Placement of the logic in
_rename()
Currently, the logic to conditionally skip renaming is embedded in the_rename()
function. However, based on the name, this function should only be responsible for renaming. It is confusing to pass an option to a renaming function that effectively tells it not to rename.
A cleaner approach would be to make this decision at a higher level, such as in_process_dataset_names()
. That function can decide:- If renaming is needed → call
_rename()
- If renaming is not needed → skip
_rename()
entirely.
- If renaming is needed → call
I like the idea of adding this argument, but similar to what @ElenaKhaustova and @DimedS have mentioned, it's not clear to me what "rename" actually means. If
While the way this is implemented is a non-breaking change, I'd suggest adding it to |
Signed-off-by: Ankita Katiyar <[email protected]>
Instead of |
Signed-off-by: Ankita Katiyar <[email protected]>
I changed the name to
|
thanks @ankatiyar , I like |
Initially I thought After testing, the namespace is still applied to the node name itself, so when running viz the suggestions to run a node show something like And running
|
@merelcht The idea for this feature is to not have the users rename entries in the catalog with prefixes or have to define a mapping dictionary for the inputs/outputs. I think prefixing the name of the node is still valuable because we're still namespacing the pipeline and it should show on viz that way |
I agree! But that's why I think Dmitry's suggestion for the argument name is the better option. |
@merelcht oh yeah, I agree! Will update the PR with the suggestion! |
Signed-off-by: Ankita Katiyar <[email protected]>
Signed-off-by: Ankita Katiyar <[email protected]>
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.
great work, @ankatiyar !
@DimedS I think the placement is not ideal but the argument goes in too deep and I think |
|
Signed-off-by: Ankita Katiyar <[email protected]>
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.
Thanks @ankatiyar this looks great 👍
Makes sense to do the docs separately. That way you can also make sure they are done with the new formatting etc. (cc: @Huongg )
Description
Fix #4566 This PR is a prototype to demo the solution
Development notes
prefix_namespace
argument topipeline()
which defaults toTrue
but can be set toFalse
instead of automatic renaming of the datasetsWhat it would look like for users:
TODOs if we decide to go for this solution:
main
ordevelop
Developer Certificate of Origin
We need all contributions to comply with the Developer Certificate of Origin (DCO). All commits must be signed off by including a
Signed-off-by
line in the commit message. See our wiki for guidance.If your PR is blocked due to unsigned commits, then you must follow the instructions under "Rebase the branch" on the GitHub Checks page for your PR. This will retroactively add the sign-off to all unsigned commits and allow the DCO check to pass.
Checklist
RELEASE.md
file