Re: AtomicFileWriterTest fails

2018-04-25 Thread Jonathan Bergh
Hi @Baptiste,

No not at all - i realised i had misread your reply (that you were closing 
your pull request and not merging it) so i pulled by reply! I may try look 
at migrating that stuff out of the core, but that depends on time and 
whether that is pressing for our setup at work. 

Best regards
Jonathan

On Friday, 20 April 2018 14:40:25 UTC+2, Baptiste Mathus wrote:
>
> @Jonathan:
>
> Yes, but if you already cloned the repo, that's not necessary anymore.
>
> You basically need to run that test, possibly with your IDE, or on the 
> CLI, for instance using 
>
> mvn clean verify -Dtest=AtomicFileWriterTest -DfailIfNoTests=false
>
> As said before, I think you should follow James' direction in 
> https://github.com/jenkinsci/jenkins/pull/3397#pullrequestreview-112752900 
> => try and refactor the existing (test, mostly) codebase to have a central 
> method in the Functions class to be finer than Functions.isWindows(), 
> something like Functions.isSymlinkSupported(Path).
>
> Feel free to play with the idea and file a WIP PR so that we can provide 
> feedback and help directly on actual code. It will be easier and more 
> concrete for everyone.
>
> Thanks a lot Jonathan, and again don't be shy to ask questions. We all 
> started from scratch and learned by twiddling sometimes cluelessly for 
> hours ;-), and there is *no* stupid questions, contributions of all kind 
> are greatly welcome!
> If needed, and depending on your TZ we can most likely organize a quick 
> Hangout session to help you move forward (I'm on UTC+2, and available more 
> easily starting next Monday). Just tell me.
>
> Thanks again!
>
> Baptiste
>
> 2018-04-19 17:08 GMT+02:00 Jonathan Bergh  >:
>
>> @Baptiste I am happy to do that. 
>>
>> Basically we are looking at a clone and build? 
>>
>> Best regards
>> Jonathan
>> (Github @trijonb)
>>
>> On Thursday, 19 April 2018 15:51:54 UTC+2, Baptiste Mathus wrote:
>>>
>>> Quick heads-up: I've finally closed my small PR and explained the 
>>> rationale there: 
>>> https://github.com/jenkinsci/jenkins/pull/3397#issuecomment-382705447
>>>
>>> TL;DR: @Jonathan or anyone using Windows, you're very welcome to improve 
>>> this. James proposed an interesting path forward in 
>>> https://github.com/jenkinsci/jenkins/pull/3397#discussion_r182026333
>>> But as I'm personally not using Windows, doing/testing this myself would 
>>> take me something like hours, when 1) it should take much less on someone 
>>> using Windows able to easily change registry key values and 2) it's not 
>>> even failing in our Windows CI and I believe not very often on Windows 
>>> boxes.
>>>
>>> Note: I'm happy to help Jonathan or anyone willing to tackle this. I 
>>> think this is a nice improvement to work on for anyone who would like to 
>>> play with Jenkins codebase.
>>>
>>> Cheers
>>>
>>> 2018-04-17 12:29 GMT+02:00 James Nord :
>>>
 Symlinks do not need a reg change to be enabled on windows 10 (recent 
 updates).

 They are enabled by default for administrative users, and for non admin 
 users you can enable them via the UI.

 Either set the "developer Mode" for the user (untested but was reported 
 to work) or via the local security policy (see screenshot).

 /James


 On Tuesday, April 17, 2018 at 10:33:36 AM UTC+1, Jonathan Bergh wrote:
>
> @Baptiste - yes, sorry about that - i need to be properly configured 
> on JIRA as well. Just busy with a release coming up next week and trying 
> to 
> get up and running with the project in between. 
>
> best
> jonathan
>
> On Tuesday, 17 April 2018 11:19:40 UTC+2, Baptiste Mathus wrote:
>>
>> Filed as https://github.com/jenkinsci/jenkins/pull/3397
>>
>> @Jonathan, I would have requested your review there too, but didn't 
>> have your GitHub handle.
>>
>> thanks
>>
>> 2018-04-17 10:57 GMT+02:00 Baptiste Mathus :
>>
>>> Fine by me. 
>>>
>>> But then my only question left is: should we request INFRA to change 
>>> our Windows agents on ci.jenkins.io so that they are configured 
>>> differently/more like a target environment and less like a dev machine? 
>>> Since, again, those tests did run correctly there and I guess we 
>>> would like them to have failed to catch mistakes (?).
>>>
>>> 2018-04-16 22:31 GMT+02:00 Jesse Glick :
>>>
 On Mon, Apr 16, 2018 at 4:14 PM, Devin Nusbaum <
 dnus...@cloudbees.com> wrote:
 > I would just
 > ignore it on Windows unconditionally.

 Yes, especially given JENKINS-37862.

 -- 
 You received this message because you are subscribed to the Google 
 Groups "Jenkins Developers" group.
 To unsubscribe from this group and stop receiving emails from it, 
 send an email to jenkinsci-de...@googlegroups.com.

Re: AtomicFileWriterTest fails

2018-04-20 Thread Baptiste Mathus
@Jonathan:

Yes, but if you already cloned the repo, that's not necessary anymore.

You basically need to run that test, possibly with your IDE, or on the CLI,
for instance using

mvn clean verify -Dtest=AtomicFileWriterTest -DfailIfNoTests=false

As said before, I think you should follow James' direction in
https://github.com/jenkinsci/jenkins/pull/3397#pullrequestreview-112752900
=> try and refactor the existing (test, mostly) codebase to have a central
method in the Functions class to be finer than Functions.isWindows(),
something like Functions.isSymlinkSupported(Path).

Feel free to play with the idea and file a WIP PR so that we can provide
feedback and help directly on actual code. It will be easier and more
concrete for everyone.

Thanks a lot Jonathan, and again don't be shy to ask questions. We all
started from scratch and learned by twiddling sometimes cluelessly for
hours ;-), and there is *no* stupid questions, contributions of all kind
are greatly welcome!
If needed, and depending on your TZ we can most likely organize a quick
Hangout session to help you move forward (I'm on UTC+2, and available more
easily starting next Monday). Just tell me.

Thanks again!

Baptiste

2018-04-19 17:08 GMT+02:00 Jonathan Bergh :

> @Baptiste I am happy to do that.
>
> Basically we are looking at a clone and build?
>
> Best regards
> Jonathan
> (Github @trijonb)
>
> On Thursday, 19 April 2018 15:51:54 UTC+2, Baptiste Mathus wrote:
>>
>> Quick heads-up: I've finally closed my small PR and explained the
>> rationale there: https://github.com/jenkinsci/jenkins/pull/3397#issuec
>> omment-382705447
>>
>> TL;DR: @Jonathan or anyone using Windows, you're very welcome to improve
>> this. James proposed an interesting path forward in
>> https://github.com/jenkinsci/jenkins/pull/3397#discussion_r182026333
>> But as I'm personally not using Windows, doing/testing this myself would
>> take me something like hours, when 1) it should take much less on someone
>> using Windows able to easily change registry key values and 2) it's not
>> even failing in our Windows CI and I believe not very often on Windows
>> boxes.
>>
>> Note: I'm happy to help Jonathan or anyone willing to tackle this. I
>> think this is a nice improvement to work on for anyone who would like to
>> play with Jenkins codebase.
>>
>> Cheers
>>
>> 2018-04-17 12:29 GMT+02:00 James Nord :
>>
>>> Symlinks do not need a reg change to be enabled on windows 10 (recent
>>> updates).
>>>
>>> They are enabled by default for administrative users, and for non admin
>>> users you can enable them via the UI.
>>>
>>> Either set the "developer Mode" for the user (untested but was reported
>>> to work) or via the local security policy (see screenshot).
>>>
>>> /James
>>>
>>>
>>> On Tuesday, April 17, 2018 at 10:33:36 AM UTC+1, Jonathan Bergh wrote:

 @Baptiste - yes, sorry about that - i need to be properly configured on
 JIRA as well. Just busy with a release coming up next week and trying to
 get up and running with the project in between.

 best
 jonathan

 On Tuesday, 17 April 2018 11:19:40 UTC+2, Baptiste Mathus wrote:
>
> Filed as https://github.com/jenkinsci/jenkins/pull/3397
>
> @Jonathan, I would have requested your review there too, but didn't
> have your GitHub handle.
>
> thanks
>
> 2018-04-17 10:57 GMT+02:00 Baptiste Mathus :
>
>> Fine by me.
>>
>> But then my only question left is: should we request INFRA to change
>> our Windows agents on ci.jenkins.io so that they are configured
>> differently/more like a target environment and less like a dev machine?
>> Since, again, those tests did run correctly there and I guess we
>> would like them to have failed to catch mistakes (?).
>>
>> 2018-04-16 22:31 GMT+02:00 Jesse Glick :
>>
>>> On Mon, Apr 16, 2018 at 4:14 PM, Devin Nusbaum <
>>> dnus...@cloudbees.com> wrote:
>>> > I would just
>>> > ignore it on Windows unconditionally.
>>>
>>> Yes, especially given JENKINS-37862.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Developers" group.
>>> To unsubscribe from this group and stop receiving emails from it,
>>> send an email to jenkinsci-de...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2f58K
>>> oC10HUYMB_ZfZauaUQOJNW2y34brzvDzr3vS1PA%40mail.gmail.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to jenkinsci-de...@googlegroups.com.
>>> To view this discussion on the web visit 

Re: AtomicFileWriterTest fails

2018-04-19 Thread Jonathan Bergh
@Baptiste I am happy to do that. 

Basically we are looking at a clone and build? 

Best regards
Jonathan
(Github @trijonb)

On Thursday, 19 April 2018 15:51:54 UTC+2, Baptiste Mathus wrote:
>
> Quick heads-up: I've finally closed my small PR and explained the 
> rationale there: 
> https://github.com/jenkinsci/jenkins/pull/3397#issuecomment-382705447
>
> TL;DR: @Jonathan or anyone using Windows, you're very welcome to improve 
> this. James proposed an interesting path forward in 
> https://github.com/jenkinsci/jenkins/pull/3397#discussion_r182026333
> But as I'm personally not using Windows, doing/testing this myself would 
> take me something like hours, when 1) it should take much less on someone 
> using Windows able to easily change registry key values and 2) it's not 
> even failing in our Windows CI and I believe not very often on Windows 
> boxes.
>
> Note: I'm happy to help Jonathan or anyone willing to tackle this. I think 
> this is a nice improvement to work on for anyone who would like to play 
> with Jenkins codebase.
>
> Cheers
>
> 2018-04-17 12:29 GMT+02:00 James Nord :
>
>> Symlinks do not need a reg change to be enabled on windows 10 (recent 
>> updates).
>>
>> They are enabled by default for administrative users, and for non admin 
>> users you can enable them via the UI.
>>
>> Either set the "developer Mode" for the user (untested but was reported 
>> to work) or via the local security policy (see screenshot).
>>
>> /James
>>
>>
>> On Tuesday, April 17, 2018 at 10:33:36 AM UTC+1, Jonathan Bergh wrote:
>>>
>>> @Baptiste - yes, sorry about that - i need to be properly configured on 
>>> JIRA as well. Just busy with a release coming up next week and trying to 
>>> get up and running with the project in between. 
>>>
>>> best
>>> jonathan
>>>
>>> On Tuesday, 17 April 2018 11:19:40 UTC+2, Baptiste Mathus wrote:

 Filed as https://github.com/jenkinsci/jenkins/pull/3397

 @Jonathan, I would have requested your review there too, but didn't 
 have your GitHub handle.

 thanks

 2018-04-17 10:57 GMT+02:00 Baptiste Mathus :

> Fine by me. 
>
> But then my only question left is: should we request INFRA to change 
> our Windows agents on ci.jenkins.io so that they are configured 
> differently/more like a target environment and less like a dev machine? 
> Since, again, those tests did run correctly there and I guess we would 
> like them to have failed to catch mistakes (?).
>
> 2018-04-16 22:31 GMT+02:00 Jesse Glick :
>
>> On Mon, Apr 16, 2018 at 4:14 PM, Devin Nusbaum  
>> wrote:
>> > I would just
>> > ignore it on Windows unconditionally.
>>
>> Yes, especially given JENKINS-37862.
>>
>> -- 
>> You received this message because you are subscribed to the Google 
>> Groups "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, 
>> send an email to jenkinsci-de...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2f58KoC10HUYMB_ZfZauaUQOJNW2y34brzvDzr3vS1PA%40mail.gmail.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
 -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jenkinsci-de...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-dev/1ed495c6-c427-403f-bafa-ad8a45580942%40googlegroups.com
>>  
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/72d42c3c-b82e-4a87-af0c-f8c55c3b2b5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AtomicFileWriterTest fails

2018-04-19 Thread Baptiste Mathus
Quick heads-up: I've finally closed my small PR and explained the rationale
there: https://github.com/jenkinsci/jenkins/pull/3397#issuecomment-382705447

TL;DR: @Jonathan or anyone using Windows, you're very welcome to improve
this. James proposed an interesting path forward in
https://github.com/jenkinsci/jenkins/pull/3397#discussion_r182026333
But as I'm personally not using Windows, doing/testing this myself would
take me something like hours, when 1) it should take much less on someone
using Windows able to easily change registry key values and 2) it's not
even failing in our Windows CI and I believe not very often on Windows
boxes.

Note: I'm happy to help Jonathan or anyone willing to tackle this. I think
this is a nice improvement to work on for anyone who would like to play
with Jenkins codebase.

Cheers

2018-04-17 12:29 GMT+02:00 James Nord :

> Symlinks do not need a reg change to be enabled on windows 10 (recent
> updates).
>
> They are enabled by default for administrative users, and for non admin
> users you can enable them via the UI.
>
> Either set the "developer Mode" for the user (untested but was reported to
> work) or via the local security policy (see screenshot).
>
> /James
>
>
> On Tuesday, April 17, 2018 at 10:33:36 AM UTC+1, Jonathan Bergh wrote:
>>
>> @Baptiste - yes, sorry about that - i need to be properly configured on
>> JIRA as well. Just busy with a release coming up next week and trying to
>> get up and running with the project in between.
>>
>> best
>> jonathan
>>
>> On Tuesday, 17 April 2018 11:19:40 UTC+2, Baptiste Mathus wrote:
>>>
>>> Filed as https://github.com/jenkinsci/jenkins/pull/3397
>>>
>>> @Jonathan, I would have requested your review there too, but didn't have
>>> your GitHub handle.
>>>
>>> thanks
>>>
>>> 2018-04-17 10:57 GMT+02:00 Baptiste Mathus :
>>>
 Fine by me.

 But then my only question left is: should we request INFRA to change
 our Windows agents on ci.jenkins.io so that they are configured
 differently/more like a target environment and less like a dev machine?
 Since, again, those tests did run correctly there and I guess we would
 like them to have failed to catch mistakes (?).

 2018-04-16 22:31 GMT+02:00 Jesse Glick :

> On Mon, Apr 16, 2018 at 4:14 PM, Devin Nusbaum 
> wrote:
> > I would just
> > ignore it on Windows unconditionally.
>
> Yes, especially given JENKINS-37862.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jenkinsci-de...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2f58K
> oC10HUYMB_ZfZauaUQOJNW2y34brzvDzr3vS1PA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


>>> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-dev/1ed495c6-c427-403f-bafa-ad8a45580942%
> 40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANWgJS77vjz8y4hHmFmem5sNL7sxyOP-ScoOG_SCswKY1pJu_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: AtomicFileWriterTest fails

2018-04-17 Thread Jonathan Bergh
@Baptiste - yes, sorry about that - i need to be properly configured on 
JIRA as well. Just busy with a release coming up next week and trying to 
get up and running with the project in between. 

best
jonathan

On Tuesday, 17 April 2018 11:19:40 UTC+2, Baptiste Mathus wrote:
>
> Filed as https://github.com/jenkinsci/jenkins/pull/3397
>
> @Jonathan, I would have requested your review there too, but didn't have 
> your GitHub handle.
>
> thanks
>
> 2018-04-17 10:57 GMT+02:00 Baptiste Mathus 
> :
>
>> Fine by me. 
>>
>> But then my only question left is: should we request INFRA to change our 
>> Windows agents on ci.jenkins.io so that they are configured 
>> differently/more like a target environment and less like a dev machine? 
>> Since, again, those tests did run correctly there and I guess we would 
>> like them to have failed to catch mistakes (?).
>>
>> 2018-04-16 22:31 GMT+02:00 Jesse Glick > >:
>>
>>> On Mon, Apr 16, 2018 at 4:14 PM, Devin Nusbaum >> > wrote:
>>> > I would just
>>> > ignore it on Windows unconditionally.
>>>
>>> Yes, especially given JENKINS-37862.
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Jenkins Developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to jenkinsci-de...@googlegroups.com .
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2f58KoC10HUYMB_ZfZauaUQOJNW2y34brzvDzr3vS1PA%40mail.gmail.com
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/ac7a8379-5977-4149-b856-adfbcf3c0be7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AtomicFileWriterTest fails

2018-04-17 Thread Baptiste Mathus
Filed as https://github.com/jenkinsci/jenkins/pull/3397

@Jonathan, I would have requested your review there too, but didn't have
your GitHub handle.

thanks

2018-04-17 10:57 GMT+02:00 Baptiste Mathus :

> Fine by me.
>
> But then my only question left is: should we request INFRA to change our
> Windows agents on ci.jenkins.io so that they are configured
> differently/more like a target environment and less like a dev machine?
> Since, again, those tests did run correctly there and I guess we would
> like them to have failed to catch mistakes (?).
>
> 2018-04-16 22:31 GMT+02:00 Jesse Glick :
>
>> On Mon, Apr 16, 2018 at 4:14 PM, Devin Nusbaum 
>> wrote:
>> > I would just
>> > ignore it on Windows unconditionally.
>>
>> Yes, especially given JENKINS-37862.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to jenkinsci-dev+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/jenkinsci-dev/CANfRfr2f58KoC10HUYMB_ZfZauaUQOJNW2y34brzv
>> Dzr3vS1PA%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANWgJS7yiGOLXZ6PRyxT9dvwOKrozGKe22HNPspr-D3%3DwS9HQQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: AtomicFileWriterTest fails

2018-04-17 Thread Baptiste Mathus
Fine by me.

But then my only question left is: should we request INFRA to change our
Windows agents on ci.jenkins.io so that they are configured
differently/more like a target environment and less like a dev machine?
Since, again, those tests did run correctly there and I guess we would like
them to have failed to catch mistakes (?).

2018-04-16 22:31 GMT+02:00 Jesse Glick :

> On Mon, Apr 16, 2018 at 4:14 PM, Devin Nusbaum 
> wrote:
> > I would just
> > ignore it on Windows unconditionally.
>
> Yes, especially given JENKINS-37862.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-dev/CANfRfr2f58KoC10HUYMB_ZfZauaUQOJNW2y34brzvDzr3vS1PA%
> 40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANWgJS7mAoAPkwhUKd8fk%3DJ8fDftLFMpLXxU-DiBJzb1vsOK6w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: AtomicFileWriterTest fails

2018-04-16 Thread Jesse Glick
On Mon, Apr 16, 2018 at 4:14 PM, Devin Nusbaum  wrote:
> I would just
> ignore it on Windows unconditionally.

Yes, especially given JENKINS-37862.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2f58KoC10HUYMB_ZfZauaUQOJNW2y34brzvDzr3vS1PA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: AtomicFileWriterTest fails

2018-04-16 Thread Devin Nusbaum
AIUI creating symlinks in Windows 10+ requires running as administrator unless 
developer mode is enabled. Blog post from Microsoft on the changes: 
https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/ 
. I’m 
not sure if there is an easy way to check that setting from Java. UtilTest 
currently ignores all symlink tests on Windows. (It does have one test for 
junctions, which are a little different.)

Since this test is unrelated to posix file permissions so I would just ignore 
it on Windows unconditionally. If you really wanted it to run when symlinks are 
supported then I guess you could run `cmd.exe /C mklink /d link target` using 
ProcessBuilder and if that exits successfully and the symlink exists then 
creating a symlink via NIO should also work.

Devin

> On Apr 16, 2018, at 15:58, Baptiste Mathus  wrote:
> 
> Yeah, introduced in https://github.com/jenkinsci/jenkins/commit/4f2e2615055 
>  / 
> https://github.com/jenkinsci/jenkins/pull/2548 
> 
> 
> Just checked, and though the PR history is now deleted, I'm pretty sure the 
> CI did run on Windows for this too. 
> 
> 
> 
> So there must be a reason why this works or not under some circumstances I 
> suspect.
> 
> I think I will file something tomorrow for this if nobody beats me to it. 
> Though I'd like to understand why it succeeds sometimes or not, maybe just 
> when running under cygwin or not indeed.
> Or maybe I should just try to be smart... Ever.
> And use Functions.isWindows() to disable this globally on Windows, and not 
> just when that new isPosixSupported() method I added returns true or false.
> 
> -- Baptiste
> 
> 
> 2018-04-16 20:55 GMT+02:00 Jesse Glick  >:
> On Sat, Apr 14, 2018 at 1:13 PM, Jonathan Bergh
> > wrote:
> > This helper function in the test led me to
> > believe this test should not be running on the Windows platform
> 
> The `checkPermissionsRespectUmask` test is skipped on Windows. (Well,
> at least potentially—not sure about Cygwin.) `symlinkToDirectory` is
> not skipped on Windows. Probably it should start with:
> 
> assumeFalse(Functions.isWindows());
> 
> Feel free to add that and file a PR claiming to follow up
> 
> https://github.com/jenkinsci/jenkins/pull/2548 
> 
> https://github.com/jenkinsci/jenkins/pull/3233 
> 
> https://github.com/jenkinsci/jenkins/pull/3275 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-dev+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2YVN2s7D5QLaKZFzgHXUxBs7j1QZbWaHYzyvQAzju%2BJQ%40mail.gmail.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-dev+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-dev/CANWgJS6%3DxQCVqvjJbz95NTcs62mwy90C5jH0fbwCd1cWDL9exQ%40mail.gmail.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/8BCC4947-291B-4FD3-837A-98FAA0395780%40cloudbees.com.
For more options, visit https://groups.google.com/d/optout.


Re: AtomicFileWriterTest fails

2018-04-16 Thread Baptiste Mathus
Yeah, introduced in https://github.com/jenkinsci/jenkins/commit/4f2e2615055
/ https://github.com/jenkinsci/jenkins/pull/2548

Just checked, and though the PR history is now deleted, I'm pretty sure the
CI did run on Windows for this too.


So there must be a reason why this works or not under some circumstances I
suspect.

I think I will file something tomorrow for this if nobody beats me to it.
Though I'd like to understand why it succeeds sometimes or not, maybe just
when running under cygwin or not indeed.
Or maybe I should just try to be smart... Ever.
And use Functions.isWindows() to disable this globally on Windows, and not
just when that new isPosixSupported() method I added returns true or false.

-- Baptiste


2018-04-16 20:55 GMT+02:00 Jesse Glick :

> On Sat, Apr 14, 2018 at 1:13 PM, Jonathan Bergh
>  wrote:
> > This helper function in the test led me to
> > believe this test should not be running on the Windows platform
>
> The `checkPermissionsRespectUmask` test is skipped on Windows. (Well,
> at least potentially—not sure about Cygwin.) `symlinkToDirectory` is
> not skipped on Windows. Probably it should start with:
>
> assumeFalse(Functions.isWindows());
>
> Feel free to add that and file a PR claiming to follow up
>
> https://github.com/jenkinsci/jenkins/pull/2548
> https://github.com/jenkinsci/jenkins/pull/3233
> https://github.com/jenkinsci/jenkins/pull/3275
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-dev/CANfRfr2YVN2s7D5QLaKZFzgHXUxBs7j1QZbWaHYzyvQAzju%2BJQ%
> 40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANWgJS6%3DxQCVqvjJbz95NTcs62mwy90C5jH0fbwCd1cWDL9exQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: AtomicFileWriterTest fails

2018-04-16 Thread Jesse Glick
On Sat, Apr 14, 2018 at 1:13 PM, Jonathan Bergh
 wrote:
> This helper function in the test led me to
> believe this test should not be running on the Windows platform

The `checkPermissionsRespectUmask` test is skipped on Windows. (Well,
at least potentially—not sure about Cygwin.) `symlinkToDirectory` is
not skipped on Windows. Probably it should start with:

assumeFalse(Functions.isWindows());

Feel free to add that and file a PR claiming to follow up

https://github.com/jenkinsci/jenkins/pull/2548
https://github.com/jenkinsci/jenkins/pull/3233
https://github.com/jenkinsci/jenkins/pull/3275

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2YVN2s7D5QLaKZFzgHXUxBs7j1QZbWaHYzyvQAzju%2BJQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: AtomicFileWriterTest fails

2018-04-14 Thread Jonathan Bergh
hi Mark,

Thanks for coming back to me. This helper function in the test led me to 
believe this test should not be running on the Windows platform (












*private static boolean isPosixSupported(File newFile) throws 
IOException {// Check Posix calls are supported (to avoid running 
this test on Windows for instance)boolean posixSupported = 
true;try {
Files.getPosixFilePermissions(newFile.toPath());} catch 
(UnsupportedOperationException e) {posixSupported = 
false;}return posixSupported;}*however when i check 
using gpedit.msc, i see that symlinks are allowed for Admin group users (of 
which i am one on the machine). So running the IDE as an Admin user allows 
me to pass the test.

Perhaps the comment in the unit test above is old, pre-symlinks on Windows 
...

Thanks again, 
regards
Jonathan


On Saturday, 14 April 2018 11:36:10 UTC+2, Jonathan Bergh wrote:
>
> hi all,
>
> i have just cloned and tried to test build all the Jenkins modules, 
> including core, and i am getting a test failure for AtomicFileWriter 
> complaining about permissions to generate a symlink.
>
> I am getting this on Win10 so am a little confused? 
> 1) Should this test even be running (do we have symlinks on Windows? I am 
> not a everyday Windows user)
> 2) Where is it trying to link to? various test files in '/target/'?
> 3) How can i solve? Since '/target' is compile time generated, i wonder 
> why there are any permission issues?
>
> many thanks and regards
> jonathan
>
>
>
>
>
>
>
>
>
> *Tests run: 8, Failures: 0, Errors: 1, Skipped: 1, Time elapsed: 0.064 s 
> <<< FAILURE! - in 
> hudson.util.AtomicFileWriterTestsymlinkToDirectory(hudson.util.AtomicFileWriterTest)
>   
> Time elapsed: 0.009 s  <<< ERROR!java.nio.file.FileSystemException: 
> C:\Users\User1\Documents\NetBeansProjects\jenkins\core\target\junit4546323911809935589\junit2633652506541301542\ze_symlink:
>  
> A required privilege is not held by the client.at 
> sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)  
>   
> at 
> sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
> at 
> sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)   
>  
> at 
> sun.nio.fs.WindowsFileSystemProvider.createSymbolicLink(WindowsFileSystemProvider.java:585)*
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/93022f46-1139-44aa-90e0-141d3f69aadc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AtomicFileWriterTest fails

2018-04-14 Thread Mark Waite
Windows allows symbolic links as an optional behavior that must be enabled
with a registry change. Does the test pass if you enable symbolic links in
the windows registry?

On Sat, Apr 14, 2018, 3:36 AM Jonathan Bergh 
wrote:

> hi all,
>
> i have just cloned and tried to test build all the Jenkins modules,
> including core, and i am getting a test failure for AtomicFileWriter
> complaining about permissions to generate a symlink.
>
> I am getting this on Win10 so am a little confused?
> 1) Should this test even be running (do we have symlinks on Windows? I am
> not a everyday Windows user)
> 2) Where is it trying to link to? various test files in '/target/'?
> 3) How can i solve? Since '/target' is compile time generated, i wonder
> why there are any permission issues?
>
> many thanks and regards
> jonathan
>
>
>
>
>
>
>
>
>
> *Tests run: 8, Failures: 0, Errors: 1, Skipped: 1, Time elapsed: 0.064 s
> <<< FAILURE! - in
> hudson.util.AtomicFileWriterTestsymlinkToDirectory(hudson.util.AtomicFileWriterTest)
> Time elapsed: 0.009 s  <<< ERROR!java.nio.file.FileSystemException:
> C:\Users\User1\Documents\NetBeansProjects\jenkins\core\target\junit4546323911809935589\junit2633652506541301542\ze_symlink:
> A required privilege is not held by the client.at
> sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
> at
> sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
> at
> sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
> at
> sun.nio.fs.WindowsFileSystemProvider.createSymbolicLink(WindowsFileSystemProvider.java:585)*
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/4580b705-bfa3-4e4e-9672-b21424ec0dbc%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAO49JtGhiXksxgZkrLkPi5zxj0aC6coV5tCTG3qCE-wAiM3jJQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


AtomicFileWriterTest fails

2018-04-14 Thread Jonathan Bergh
hi all,

i have just cloned and tried to test build all the Jenkins modules, 
including core, and i am getting a test failure for AtomicFileWriter 
complaining about permissions to generate a symlink.

I am getting this on Win10 so am a little confused? 
1) Should this test even be running (do we have symlinks on Windows? I am 
not a everyday Windows user)
2) Where is it trying to link to? various test files in '/target/'?
3) How can i solve? Since '/target' is compile time generated, i wonder why 
there are any permission issues?

many thanks and regards
jonathan









*Tests run: 8, Failures: 0, Errors: 1, Skipped: 1, Time elapsed: 0.064 s 
<<< FAILURE! - in 
hudson.util.AtomicFileWriterTestsymlinkToDirectory(hudson.util.AtomicFileWriterTest)
  
Time elapsed: 0.009 s  <<< ERROR!java.nio.file.FileSystemException: 
C:\Users\User1\Documents\NetBeansProjects\jenkins\core\target\junit4546323911809935589\junit2633652506541301542\ze_symlink:
 
A required privilege is not held by the client.at 
sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
at 
sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at 
sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
at 
sun.nio.fs.WindowsFileSystemProvider.createSymbolicLink(WindowsFileSystemProvider.java:585)*

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/4580b705-bfa3-4e4e-9672-b21424ec0dbc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.