-
Notifications
You must be signed in to change notification settings - Fork 343
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
fix a issue as file or dirortry which is part of data_dir will retrun absolute file path #5930
base: master
Are you sure you want to change the base?
Conversation
Sample run from misc test :
after fix
|
@richtja can you please review this PR |
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.
Hi @PraveenPenguin even tho I understand that this will solve issue on misc test side I am not sure If we can make this change. The get_data
is part of the avocado-instrumented core API and this change will affect all of our users, therefore we try to avoid such changes.
Is there a possibility to solve this on misc test side? And if it is not, I would propose to change the API in a less influencing way like this: get_data(self, filename, source=None, must_exist=True, abs_path=False)
@clebergnu what do you think?
@richtja thanks for input ,yes make more sense to add abs_path as argument and misc test side we can overwrite this having asigining to True |
bd5458e
to
1847489
Compare
… absolute file path As in misc test repo apply patch is failing which part of data dir as utility return relative path this patch address as it return absolute file path (file or dir) Reported-by: Geetika <[email protected]> Signed-off-by: Praveen K Pandey <[email protected]>
@richtja pushed changes , but CI is failing as
that nothing to do with this patch i feel , looking to fix it but meanwhile can please review this patch and if looks good merge it as this is blocker to misc-test |
Hi @PraveenPenguin yes this looks like an issue of the CI, I will look at that. And about the review, thank you for your changes, I just would like to get opinion from @clebergnu |
@clebergnu can you please put your thought on this, as we are blocked on misc test side |
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.
Hi @PraveenPenguin ,
I tried to approach this "Test API" change with an open mind, but I'm still not convinced that the change makes sense. The use case, clearly does make sense, but I can not see why it should be part of that API.
If you look at the other parameters, they are not things that can be done outside of the responsibility of the method. In the case of converting non-absolute paths to absolute paths, that can be easily done outside of it.
For instance, what would happen if that API had the behavior of returning absolute paths, and one user wanted relative paths instead? IMO, it would be natural to simply use os.path.relpath() instead of changing the API.
If you have some other reasons or points I'm missing, please let me know.
@clebergnu Sure, it looks ok but why this sudden change even though I am not able to get commit which yields this as earlier it was working |
As in misc test repo apply patch is failing which part of data dir as utility return relative path this patch address as it return absolute file path (file or dir)