You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[JENKINS-47324] FilePath API in Jenkins should propagate errors #22356
krishbhasin yes. marykomar has taken the issue, but so far there is no progress on it AFAICT. There may be other issues around of such kind. Actually you can look for any obsolete Java 6 File API usage (File#mkdirs() & Co) in the core and create patches for that
krishbhasin yes. marykomar has taken the issue, but so far there is no progress on it AFAICT. There may be other issues around of such kind. Actually you can look for any obsolete Java 6 File API usage (File#mkdirs() & Co) in the core and create patches for that
I've assigned krishbhasin to clarify. Thanks a lot to you both to try and help! If you need any help, please do not hesitate to come ask questions and discuss on the jenkins-developers mailing list!
I've assigned krishbhasin to clarify. Thanks a lot to you both to try and help! If you need any help, please do not hesitate to come ask questions and discuss on the jenkins-developers mailing list!
I've had some fun getting the Messages wired into my IDE, it still complains that it doesn't know what to do with the fields...
With the actual code changes, I'm not sure how far 'up the chain' it needs to go. There seem to be utility methods (like filterNonNull) that are used a bit, that return a 'SoloFilePathFilter', defined further up in the project. Should I also start modifying that class to make this work?
I've had some fun getting the Messages wired into my IDE, it still complains that it doesn't know what to do with the fields...
With the actual code changes, I'm not sure how far 'up the chain' it needs to go. There seem to be utility methods (like filterNonNull) that are used a bit, that return a 'SoloFilePathFilter', defined further up in the project. Should I also start modifying that class to make this work?
krishbhasin IMHO I probably wouldn't go that far just yet. I'd focus on replacing the calls to methods like File#renameTo and File#mkdirs with calls to Files.move and Files.createDirectories. I believe many of the methods that take File as argument can't be converted to take Path because they are being sent over remoting channels and Path isn't serializable. File#toPath is your friend!
I was working on some things related to this before I realized there was an existing ticket being worked on by someone else, so feel free to look at the changes in my branch in case they are useful to you. I'll stop working on that branch and leave the ticket in your hands for now
krishbhasin IMHO I probably wouldn't go that far just yet. I'd focus on replacing the calls to methods like File#renameTo and File#mkdirs with calls to Files.move and Files.createDirectories. I believe many of the methods that take File as argument can't be converted to take Path because they are being sent over remoting channels and Path isn't serializable. File#toPath is your friend!
I was working on some things related to this before I realized there was an existing ticket being worked on by someone else, so feel free to look at the changes in my branch in case they are useful to you. I'll stop working on that branch and leave the ticket in your hands for now
I've had a look at your changes, and they make sense, but I feel a bit out of my depth trying to migrate any further methods over to the Java 7 API... I'll give it a go and put what I have in a PR, and maybe someone can help give me pointers from there?
I've had a look at your changes, and they make sense, but I feel a bit out of my depth trying to migrate any further methods over to the Java 7 API... I'll give it a go and put what I have in a PR, and maybe someone can help give me pointers from there?
krishbhasin That sounds like a good plan to me, any improvement will be welcome, and there's no need to do everything at once. Feel free to mention @dwnusbaum on the PR and I'll take a look at it.
krishbhasin That sounds like a good plan to me, any improvement will be welcome, and there's no need to do everything at once. Feel free to mention @dwnusbaum on the PR and I'll take a look at it.
dnusbaum Yeah sorry it's been a busy few weeks (holiday then knocked out with flu). I will get to this before the end of the year, I'm still recovering from the illness.
dnusbaum Yeah sorry it's been a busy few weeks (holiday then knocked out with flu). I will get to this before the end of the year, I'm still recovering from the illness.
oleg_nenashev given you filed this, *when you have time* could you possibly add acceptance criteria so it's easily assessable by anyone if/when this would be done?
Spassiba!
I feel like the acceptance criteria are slightly unclear, then it makes it hard to be sure this is done or not. I see at least the PR from krishbhasin and dnusbaum in #3135
oleg_nenashev given you filed this, *when you have time* could you possibly add acceptance criteria so it's easily assessable by anyone if/when this would be done?
krishbhasin would you be BTW be available/willing to handle the possible remainder of this task, if any? We're happy to provide any guidance for this. Thanks!
krishbhasin would you be BTW be available/willing to handle the possible remainder of this task, if any? We're happy to provide any guidance for this. Thanks!
Krishan submitted #3173, #3135 from me was more related to JENKINS-36088. There are likely other things that could be addressed, but I think we got most of the lowest-hanging fruit looking at the related issues and glancing quickly through FilePath.java.
OK, then let's consider this fixed until proven otherwise. Like I wrote above anyway, it can be reopened anytime once we know about left things to be still fixed. Thanks for the feedback Devin.
OK, then let's consider this fixed until proven otherwise. Like I wrote above anyway, it can be reopened anytime once we know about left things to be still fixed. Thanks for the feedback Devin.
Activity
jenkins-infra-bot commentedon Oct 6, 2017
Remote links associated with this issue:
jenkins-infra-bot commentedon Oct 16, 2017
Raw content of original comment:
Is this issue taken? I'd like to have a crack at it if not
jenkins-infra-bot commentedon Oct 16, 2017
Raw content of original comment:
krishbhasin yes. marykomar has taken the issue, but so far there is no progress on it AFAICT. There may be other issues around of such kind. Actually you can look for any obsolete Java 6 File API usage (File#mkdirs() & Co) in the core and create patches for that
jenkins-infra-bot commentedon Oct 17, 2017
Raw content of original comment:
Yes, I'm working on it.
jenkins-infra-bot commentedon Oct 18, 2017
Raw content of original comment:
krishbhasin my plans have changed, and I, unfortunately, can't work on this issue, so if you want you can take it.
jenkins-infra-bot commentedon Oct 19, 2017
Raw content of original comment:
I've assigned krishbhasin to clarify. Thanks a lot to you both to try and help! If you need any help, please do not hesitate to come ask questions and discuss on the jenkins-developers mailing list!
jenkins-infra-bot commentedon Nov 6, 2017
Raw content of original comment:
I've had some fun getting the Messages wired into my IDE, it still complains that it doesn't know what to do with the fields...
With the actual code changes, I'm not sure how far 'up the chain' it needs to go. There seem to be utility methods (like filterNonNull) that are used a bit, that return a 'SoloFilePathFilter', defined further up in the project. Should I also start modifying that class to make this work?
jenkins-infra-bot commentedon Nov 6, 2017
Raw content of original comment:
I should say, I'm using this to help with the code changes.
jenkins-infra-bot commentedon Nov 10, 2017
Raw content of original comment:
krishbhasin IMHO I probably wouldn't go that far just yet. I'd focus on replacing the calls to methods like File#renameTo and File#mkdirs with calls to Files.move and Files.createDirectories. I believe many of the methods that take File as argument can't be converted to take Path because they are being sent over remoting channels and Path isn't serializable. File#toPath is your friend!
I was working on some things related to this before I realized there was an existing ticket being worked on by someone else, so feel free to look at the changes in my branch in case they are useful to you. I'll stop working on that branch and leave the ticket in your hands for now
jenkins-infra-bot commentedon Nov 11, 2017
Raw content of original comment:
I've had a look at your changes, and they make sense, but I feel a bit out of my depth trying to migrate any further methods over to the Java 7 API... I'll give it a go and put what I have in a PR, and maybe someone can help give me pointers from there?
jenkins-infra-bot commentedon Nov 14, 2017
Raw content of original comment:
krishbhasin That sounds like a good plan to me, any improvement will be welcome, and there's no need to do everything at once. Feel free to mention @dwnusbaum on the PR and I'll take a look at it.
jenkins-infra-bot commentedon Nov 29, 2017
Raw content of original comment:
krishbhasin Do you still plan on filing a PR for this?
jenkins-infra-bot commentedon Nov 29, 2017
Raw content of original comment:
dnusbaum Yeah sorry it's been a busy few weeks (holiday then knocked out with flu). I will get to this before the end of the year, I'm still recovering from the illness.
jenkins-infra-bot commentedon Nov 29, 2017
Raw content of original comment:
krishbhasin Ok that sounds good. I hope you're feeling better soon.
jenkins-infra-bot commentedon Dec 14, 2017
Raw content of original comment:
Code changed in jenkins
User: Krishan Bhasin
Path:
core/src/main/java/hudson/FilePath.java
core/src/main/java/hudson/util/IOUtils.java
http://jenkins-ci.org/commit/jenkins/09bcc5d6538b3cfffbf71228ebd1679e3e20d8b2
Log:
JENKINS-47324- Reduce usage of File.mkdirs() in FilePath and IOUtils (#3173)Replace mkdir() with Files.createTempDirectory()
move mkdirs() to using FilePath method instead of File method.
jenkins-infra-bot commentedon Dec 17, 2017
Raw content of original comment:
oleg_nenashev Is this issue fixed towards 2.96 or still WIP?
jenkins-infra-bot commentedon Dec 17, 2017
Raw content of original comment:
danielbeck IIUC there are still some changes to be done in this ticket
jenkins-infra-bot commentedon Jan 10, 2019
Raw content of original comment:
I feel like the acceptance criteria are slightly unclear, then it makes it hard to be sure this is done or not. I see at least the PR from krishbhasin and dnusbaum in #3135
oleg_nenashev given you filed this, *when you have time* could you possibly add acceptance criteria so it's easily assessable by anyone if/when this would be done?
Spassiba!
jenkins-infra-bot commentedon Jan 10, 2019
Raw content of original comment:
krishbhasin would you be BTW be available/willing to handle the possible remainder of this task, if any? We're happy to provide any guidance for this. Thanks!
jenkins-infra-bot commentedon Jan 10, 2019
Raw content of original comment:
Krishan submitted #3173, #3135 from me was more related to
JENKINS-36088. There are likely other things that could be addressed, but I think we got most of the lowest-hanging fruit looking at the related issues and glancing quickly through FilePath.java.jenkins-infra-bot commentedon Jan 11, 2019
Raw content of original comment:
OK, then let's consider this fixed until proven otherwise. Like I wrote above anyway, it can be reopened anytime once we know about left things to be still fixed. Thanks for the feedback Devin.