Confused by part of userguide build process

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Confused by part of userguide build process

KARR, DAVID
In my revisions of the userguide, I ended up changing a sample command line, and some lines in the associated "build.gradle" and "gradle.properties" files.  I expected that when I rebuilt the userguide, it would rerun the command line and regenerate the output.  For some reason this isn't happening.  I searched in the tree for a file containing the output I'm getting, and I found "subprojects/docs/src/samples/userguideOutput", which appears to contain the output files from the sample build scripts.  These are checked in, not generated at build time, so perhaps this build process isn't as automated as I thought.  Am I going to have to manually rerun the command line and replace the output file?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Confused by part of userguide build process

Daz DeBoer-2
Yes, you need to update the expected output in 'userguideOutput'.

- In automated testing, the userguideOutput is compared against the actual output of executing the gradle command
- When generating the userguide, the userguideOutput is included as-is (no tests are run at this time).


On Tue, Jul 8, 2014 at 2:17 PM, KARR, DAVID <[hidden email]> wrote:
In my revisions of the userguide, I ended up changing a sample command line, and some lines in the associated "build.gradle" and "gradle.properties" files.  I expected that when I rebuilt the userguide, it would rerun the command line and regenerate the output.  For some reason this isn't happening.  I searched in the tree for a file containing the output I'm getting, and I found "subprojects/docs/src/samples/userguideOutput", which appears to contain the output files from the sample build scripts.  These are checked in, not generated at build time, so perhaps this build process isn't as automated as I thought.  Am I going to have to manually rerun the command line and replace the output file?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





--
Darrell (Daz) DeBoer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Confused by part of userguide build process

KARR, DAVID

 

 

From: Daz DeBoer [mailto:[hidden email]]
Sent: Tuesday, July 08, 2014 3:54 PM
To: [hidden email]
Subject: Re: [gradle-dev] Confused by part of userguide build process

 

Yes, you need to update the expected output in 'userguideOutput'.

 

- In automated testing, the userguideOutput is compared against the actual output of executing the gradle command

 

If I run “gradle docs:userguide”, will that generate the user guide and run the tests?  I’m guessing not, as I would have seen errors because of this, if they were running.

 

- When generating the userguide, the userguideOutput is included as-is (no tests are run at this time).

 

On Tue, Jul 8, 2014 at 2:17 PM, KARR, DAVID <[hidden email]> wrote:

In my revisions of the userguide, I ended up changing a sample command line, and some lines in the associated "build.gradle" and "gradle.properties" files.  I expected that when I rebuilt the userguide, it would rerun the command line and regenerate the output.  For some reason this isn't happening.  I searched in the tree for a file containing the output I'm getting, and I found "subprojects/docs/src/samples/userguideOutput", which appears to contain the output files from the sample build scripts.  These are checked in, not generated at build time, so perhaps this build process isn't as automated as I thought.  Am I going to have to manually rerun the command line and replace the output file?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



 

--

Darrell (Daz) DeBoer

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Confused by part of userguide build process

Daz DeBoer-2



On Tue, Jul 8, 2014 at 5:13 PM, KARR, DAVID <[hidden email]> wrote:

 

 

From: Daz DeBoer [mailto:[hidden email]]
Sent: Tuesday, July 08, 2014 3:54 PM
To: [hidden email]
Subject: Re: [gradle-dev] Confused by part of userguide build process

 

Yes, you need to update the expected output in 'userguideOutput'.

 

- In automated testing, the userguideOutput is compared against the actual output of executing the gradle command

 

If I run “gradle docs:userguide”, will that generate the user guide and run the tests?  I’m guessing not, as I would have seen errors because of this, if they were running.


Correct. These test that exercises the user guide samples is org.gradle.integtests.samples.UserGuideSamplesIntegrationTest. This will be run by:
'gradle :integTest:check', and you can probably use --tests to run just that test. 


--
Darrell (Daz) DeBoer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Confused by part of userguide build process

KARR, DAVID

 

 

From: Daz DeBoer [mailto:[hidden email]]
Sent: Wednesday, July 09, 2014 11:05 AM
To: [hidden email]
Subject: Re: [gradle-dev] Confused by part of userguide build process

 

On Tue, Jul 8, 2014 at 5:13 PM, KARR, DAVID <[hidden email]> wrote:

From: Daz DeBoer [mailto:[hidden email]]
Sent: Tuesday, July 08, 2014 3:54 PM
To: [hidden email]
Subject: Re: [gradle-dev] Confused by part of userguide build process

Yes, you need to update the expected output in 'userguideOutput'.

- In automated testing, the userguideOutput is compared against the actual output of executing the gradle command

If I run “gradle docs:userguide”, will that generate the user guide and run the tests?  I’m guessing not, as I would have seen errors because of this, if they were running.

Correct. These test that exercises the user guide samples is org.gradle.integtests.samples.UserGuideSamplesIntegrationTest. This will be run by:

'gradle :integTest:check', and you can probably use --tests to run just that test. 


I can’t get this to work.  I tried several variations of “—tests”, but it’s saying “Unknown command-line option '--tests'”.  This is odd, because I verified with “gradle –v” that I’m using Gradle 2.0.  I also tried a couple of variations on “-Dtest.single=...”, but that just seemed to be ignored.  This would execute all of the integration tests, and it appears that most or all of those are failing.

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Confused by part of userguide build process

Luke Daley-2


On 17 July 2014 at 9:34:59 am, KARR, DAVID ([hidden email]) wrote:

 

 

From: Daz DeBoer [mailto:[hidden email]]
Sent: Wednesday, July 09, 2014 11:05 AM
To: [hidden email]
Subject: Re: [gradle-dev] Confused by part of userguide build process

 

On Tue, Jul 8, 2014 at 5:13 PM, KARR, DAVID <[hidden email]> wrote:

From: Daz DeBoer [mailto:[hidden email]]
Sent: Tuesday, July 08, 2014 3:54 PM
To: [hidden email]
Subject: Re: [gradle-dev] Confused by part of userguide build process

Yes, you need to update the expected output in 'userguideOutput'.

- In automated testing, the userguideOutput is compared against the actual output of executing the gradle command

If I run “gradle docs:userguide”, will that generate the user guide and run the tests?  I’m guessing not, as I would have seen errors because of this, if they were running.

Correct. These test that exercises the user guide samples is org.gradle.integtests.samples.UserGuideSamplesIntegrationTest. This will be run by:

'gradle :integTest:check', and you can probably use --tests to run just that test. 


I can’t get this to work.  I tried several variations of “—tests”, but it’s saying “Unknown command-line option '--tests'”.  This is odd, because I verified with “gradle –v” that I’m using Gradle 2.0.  I also tried a couple of variations on “-Dtest.single=...”, but that just seemed to be ignored.  This would execute all of the integration tests, and it appears that most or all of those are failing

What’s the exact command line you are using?


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Confused by part of userguide build process

KARR, DAVID

 

 

From: Luke Daley [mailto:[hidden email]]
Sent: Wednesday, July 16, 2014 4:58 PM
To: KARR, DAVID; [hidden email]
Subject: RE: [gradle-dev] Confused by part of userguide build process

 

 

 

On 17 July 2014 at 9:34:59 am, KARR, DAVID ([hidden email]) wrote:

 

 

From: Daz DeBoer [[hidden email]]
Sent: Wednesday, July 09, 2014 11:05 AM
To: [hidden email]
Subject: Re: [gradle-dev] Confused by part of userguide build process

 

On Tue, Jul 8, 2014 at 5:13 PM, KARR, DAVID <[hidden email]> wrote:

From: Daz DeBoer [mailto:[hidden email]]
Sent: Tuesday, July 08, 2014 3:54 PM
To: [hidden email]
Subject: Re: [gradle-dev] Confused by part of userguide build process

Yes, you need to update the expected output in 'userguideOutput'.

- In automated testing, the userguideOutput is compared against the actual output of executing the gradle command

If I run “gradle docs:userguide”, will that generate the user guide and run the tests?  I’m guessing not, as I would have seen errors because of this, if they were running.

Correct. These test that exercises the user guide samples is org.gradle.integtests.samples.UserGuideSamplesIntegrationTest. This will be run by:

'gradle :integTest:check', and you can probably use --tests to run just that test. 


I can’t get this to work.  I tried several variations of “—tests”, but it’s saying “Unknown command-line option '--tests'”.  This is odd, because I verified with “gradle –v” that I’m using Gradle 2.0.  I also tried a couple of variations on “-Dtest.single=...”, but that just seemed to be ignored.  This would execute all of the integration tests, and it appears that most or all of those are failing

What’s the exact command line you are using?

 

gradle :integTest:check --tests org.gradle.integtests.samples.UserGuideSamplesIntegrationTest

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Confused by part of userguide build process

Luke Daley-2


On 17 July 2014 at 12:59:06 pm, KARR, DAVID ([hidden email]) wrote:

 

 

From: Luke Daley [mailto:[hidden email]]
Sent: Wednesday, July 16, 2014 4:58 PM
To: KARR, DAVID; [hidden email]
Subject: RE: [gradle-dev] Confused by part of userguide build process

 

 

 

On 17 July 2014 at 9:34:59 am, KARR, DAVID ([hidden email]) wrote:

 

 

From: Daz DeBoer [[hidden email]]
Sent: Wednesday, July 09, 2014 11:05 AM
To: [hidden email]
Subject: Re: [gradle-dev] Confused by part of userguide build process

 

On Tue, Jul 8, 2014 at 5:13 PM, KARR, DAVID <[hidden email]> wrote:

From: Daz DeBoer [mailto:[hidden email]]
Sent: Tuesday, July 08, 2014 3:54 PM
To: [hidden email]
Subject: Re: [gradle-dev] Confused by part of userguide build process

Yes, you need to update the expected output in 'userguideOutput'.

- In automated testing, the userguideOutput is compared against the actual output of executing the gradle command

If I run “gradle docs:userguide”, will that generate the user guide and run the tests?  I’m guessing not, as I would have seen errors because of this, if they were running.

Correct. These test that exercises the user guide samples is org.gradle.integtests.samples.UserGuideSamplesIntegrationTest. This will be run by:

'gradle :integTest:check', and you can probably use --tests to run just that test. 


I can’t get this to work.  I tried several variations of “—tests”, but it’s saying “Unknown command-line option '--tests'”.  This is odd, because I verified with “gradle –v” that I’m using Gradle 2.0.  I also tried a couple of variations on “-Dtest.single=...”, but that just seemed to be ignored.  This would execute all of the integration tests, and it appears that most or all of those are failing

What’s the exact command line you are using?

 

gradle :integTest:check --tests org.gradle.integtests.samples.UserGuideSamplesIntegrationTest

—tests has to be directly after a test task, so it would be:

gradle :integTest:integTest --tests org.gradle.integtests.samples.UserGuideSamplesIntegrationTest



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Confused by part of userguide build process

KARR, DAVID

 

 

From: Luke Daley [mailto:[hidden email]]
Sent: Wednesday, July 16, 2014 8:39 PM
To: KARR, DAVID; [hidden email]
Subject: RE: [gradle-dev] Confused by part of userguide build process

On 17 July 2014 at 12:59:06 pm, KARR, DAVID ([hidden email]) wrote:

From: Luke Daley [[hidden email]]
Sent: Wednesday, July 16, 2014 4:58 PM
To: KARR, DAVID; [hidden email]
Subject: RE: [gradle-dev] Confused by part of userguide build process

On 17 July 2014 at 9:34:59 am, KARR, DAVID ([hidden email]) wrote:

From: Daz DeBoer [[hidden email]]
Sent: Wednesday, July 09, 2014 11:05 AM
To: [hidden email]
Subject: Re: [gradle-dev] Confused by part of userguide build process

On Tue, Jul 8, 2014 at 5:13 PM, KARR, DAVID <[hidden email]> wrote:

From: Daz DeBoer [mailto:[hidden email]]
Sent: Tuesday, July 08, 2014 3:54 PM
To: [hidden email]
Subject: Re: [gradle-dev] Confused by part of userguide build process

Yes, you need to update the expected output in 'userguideOutput'.

- In automated testing, the userguideOutput is compared against the actual output of executing the gradle command

If I run “gradle docs:userguide”, will that generate the user guide and run the tests?  I’m guessing not, as I would have seen errors because of this, if they were running.

Correct. These test that exercises the user guide samples is org.gradle.integtests.samples.UserGuideSamplesIntegrationTest. This will be run by:

'gradle :integTest:check', and you can probably use --tests to run just that test. 


I can’t get this to work.  I tried several variations of “—tests”, but it’s saying “Unknown command-line option '--tests'”.  This is odd, because I verified with “gradle –v” that I’m using Gradle 2.0.  I also tried a couple of variations on “-Dtest.single=...”, but that just seemed to be ignored.  This would execute all of the integration tests, and it appears that most or all of those are failing

What’s the exact command line you are using?

 

gradle :integTest:check --tests org.gradle.integtests.samples.UserGuideSamplesIntegrationTest

—tests has to be directly after a test task, so it would be:

gradle :integTest:integTest --tests org.gradle.integtests.samples.UserGuideSamplesIntegrationTest

 

Ok. This is working better.  This particular test is a “mutant” in that it’s exercising all of the build script samples in the user guide.  When one fails, it prints out the name of the “id” for that sample, so that helps a bit.  Do you know if there’s some way to make it ONLY execute a single sample excerpt?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Confused by part of userguide build process

Luke Daley-2


On 18 July 2014 at 8:16:13 am, KARR, DAVID ([hidden email]) wrote:

 

 

From: Luke Daley [mailto:[hidden email]]
Sent: Wednesday, July 16, 2014 8:39 PM
To: KARR, DAVID; [hidden email]
Subject: RE: [gradle-dev] Confused by part of userguide build process

On 17 July 2014 at 12:59:06 pm, KARR, DAVID ([hidden email]) wrote:

From: Luke Daley [[hidden email]]
Sent: Wednesday, July 16, 2014 4:58 PM
To: KARR, DAVID; [hidden email]
Subject: RE: [gradle-dev] Confused by part of userguide build process

On 17 July 2014 at 9:34:59 am, KARR, DAVID ([hidden email]) wrote:

From: Daz DeBoer [[hidden email]]
Sent: Wednesday, July 09, 2014 11:05 AM
To: [hidden email]
Subject: Re: [gradle-dev] Confused by part of userguide build process

On Tue, Jul 8, 2014 at 5:13 PM, KARR, DAVID <[hidden email]> wrote:

From: Daz DeBoer [mailto:[hidden email]]
Sent: Tuesday, July 08, 2014 3:54 PM
To: [hidden email]
Subject: Re: [gradle-dev] Confused by part of userguide build process

Yes, you need to update the expected output in 'userguideOutput'.

- In automated testing, the userguideOutput is compared against the actual output of executing the gradle command

If I run “gradle docs:userguide”, will that generate the user guide and run the tests?  I’m guessing not, as I would have seen errors because of this, if they were running.

Correct. These test that exercises the user guide samples is org.gradle.integtests.samples.UserGuideSamplesIntegrationTest. This will be run by:

'gradle :integTest:check', and you can probably use --tests to run just that test. 


I can’t get this to work.  I tried several variations of “—tests”, but it’s saying “Unknown command-line option '--tests'”.  This is odd, because I verified with “gradle –v” that I’m using Gradle 2.0.  I also tried a couple of variations on “-Dtest.single=...”, but that just seemed to be ignored.  This would execute all of the integration tests, and it appears that most or all of those are failing

What’s the exact command line you are using?

 

gradle :integTest:check --tests org.gradle.integtests.samples.UserGuideSamplesIntegrationTest

—tests has to be directly after a test task, so it would be:

gradle :integTest:integTest --tests org.gradle.integtests.samples.UserGuideSamplesIntegrationTest

 

Ok. This is working better.  This particular test is a “mutant” in that it’s exercising all of the build script samples in the user guide.  When one fails, it prints out the name of the “id” for that sample, so that helps a bit.  Do you know if there’s some way to make it ONLY execute a single sample excerpt?

Some details here: https://github.com/gradle/gradle/blob/master/subprojects/integ-test/integ-test.gradle#L24-24



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Confused by part of userguide build process

KARR, DAVID

 

From: Luke Daley [mailto:[hidden email]]
Sent: Thursday, July 17, 2014 3:49 PM
To: [hidden email]
Subject: RE: [gradle-dev] Confused by part of userguide build process

On 18 July 2014 at 8:16:13 am, KARR, DAVID ([hidden email]) wrote:

From: Luke Daley [[hidden email]]
Sent: Wednesday, July 16, 2014 8:39 PM
To: KARR, DAVID; [hidden email]
Subject: RE: [gradle-dev] Confused by part of userguide build process

On 17 July 2014 at 12:59:06 pm, KARR, DAVID ([hidden email]) wrote:

From: Luke Daley [[hidden email]]
Sent: Wednesday, July 16, 2014 4:58 PM
To: KARR, DAVID; [hidden email]
Subject: RE: [gradle-dev] Confused by part of userguide build process

On 17 July 2014 at 9:34:59 am, KARR, DAVID ([hidden email]) wrote:

From: Daz DeBoer [[hidden email]]
Sent: Wednesday, July 09, 2014 11:05 AM
To: [hidden email]
Subject: Re: [gradle-dev] Confused by part of userguide build process

On Tue, Jul 8, 2014 at 5:13 PM, KARR, DAVID <[hidden email]> wrote:

From: Daz DeBoer [mailto:[hidden email]]
Sent: Tuesday, July 08, 2014 3:54 PM
To: [hidden email]
Subject: Re: [gradle-dev] Confused by part of userguide build process

Yes, you need to update the expected output in 'userguideOutput'.

- In automated testing, the userguideOutput is compared against the actual output of executing the gradle command

If I run “gradle docs:userguide”, will that generate the user guide and run the tests?  I’m guessing not, as I would have seen errors because of this, if they were running.

Correct. These test that exercises the user guide samples is org.gradle.integtests.samples.UserGuideSamplesIntegrationTest. This will be run by:

'gradle :integTest:check', and you can probably use --tests to run just that test. 


I can’t get this to work.  I tried several variations of “—tests”, but it’s saying “Unknown command-line option '--tests'”.  This is odd, because I verified with “gradle –v” that I’m using Gradle 2.0.  I also tried a couple of variations on “-Dtest.single=...”, but that just seemed to be ignored.  This would execute all of the integration tests, and it appears that most or all of those are failing

What’s the exact command line you are using?

 

gradle :integTest:check --tests org.gradle.integtests.samples.UserGuideSamplesIntegrationTest

—tests has to be directly after a test task, so it would be:

gradle :integTest:integTest --tests org.gradle.integtests.samples.UserGuideSamplesIntegrationTest

 

Ok. This is working better.  This particular test is a “mutant” in that it’s exercising all of the build script samples in the user guide.  When one fails, it prints out the name of the “id” for that sample, so that helps a bit.  Do you know if there’s some way to make it ONLY execute a single sample excerpt?

Some details here: https://github.com/gradle/gradle/blob/master/subprojects/integ-test/integ-test.gradle#L24-24

I’m seeing a new failure symptom this morning.  This is what I’m running:

gradle :integTest:integTest --tests org.gradle.integtests.samples.UserGuideSamplesIntegrationTest info

This is failing with:

org.gradle.integtests.samples.UserGuideSamplesIntegrationTest > initializationError FAILED

    java.lang.AssertionError: Couldn't find any samples. Most likely, samples.xml was not generated.

    Please run 'gradle docs:userguideDocbook' first. Expression: assertion. Values: assertion = false

I’ve tried running both “gradle docs:userguide” and “gradle docs:userguideDocbook” before this, but it makes no difference.  I even tried the latter with “rerun-tasks”.  I also looked for a “samples.xml” and found this:

% ls -lt ./subprojects/docs/build/src/samples.xml

-rwxr-xr-x+ 1 dk068x Domain Users 68 Jul 18 07:32 ./subprojects/docs/build/src/samples.xml*

 

However, this file is essentially empty:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<samples/>

At this point, I did a “gradle clean” and then verified that the “samples.xml” file was gone.  I then reran “docs:userguide” and then inspected the resulting “samples.xml” file.  It was over 60k bytes, but I didn’t inspect the file.  I then reran my integTest run.  It failed in the same way.  I then reinspected the “samples.xml” file, and it appears that the integTest run actually changed that file back to the almost empty version.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Confused by part of userguide build process

Daz DeBoer-2

On Fri, Jul 18, 2014 at 10:28 AM, KARR, DAVID <[hidden email]> wrote:


I’m seeing a new failure symptom this morning.  This is what I’m running:

gradle :integTest:integTest --tests org.gradle.integtests.samples.UserGuideSamplesIntegrationTesinfo

This is failing with:

org.gradle.integtests.samples.UserGuideSamplesIntegrationTest > initializationError FAILED

    java.lang.AssertionError: Couldn't find any samples. Most likely, samples.xml was not generated.

    Please run 'gradle docs:userguideDocbook' first. Expression: assertion. Values: assertion = false

I’ve tried running both “gradle docs:userguide” and “gradle docs:userguideDocbook” before this, but it makes no difference.  I even tried the latter with “rerun-tasks”.  I also looked for a “samples.xml” and found this:

% ls -lt ./subprojects/docs/build/src/samples.xml

-rwxr-xr-x+ 1 dk068x Domain Users 68 Jul 18 07:32 ./subprojects/docs/build/src/samples.xml*

 

However, this file is essentially empty:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<samples/>

At this point, I did a “gradle clean” and then verified that the “samples.xml” file was gone.  I then reran “docs:userguide” and then inspected the resulting “samples.xml” file.  It was over 60k bytes, but I didn’t inspect the file.  I then reran my integTest run.  It failed in the same way.  I then reinspected the “samples.xml” file, and it appears that the integTest run actually changed that file back to the almost empty version.


I seem to recall hitting something similar at one stage, but I didn't investigate further. IIRC there was a bug in our build logic that meant the order that tasks were run in was important. 

Following your lead, I can confirm this is an issue. To reproduce run:
./gradlew clean 
./gradlew :docs:userguide
./gradlew :integTest:integTest --tests org.gradle.integtests.samples.UserGuideSamplesIntegrationTest

It seems like something is clearing the samples.xml file early in the integTest run, but the :docs:userguideDocbook task is considered UP-TO-DATE so it doesn't regenerate it.If you wanted to dig deeper to see exactly which tasks are causing this problem, it would be most appreciated. Even to just know the minimal set of tasks that trigger this condition would help.

Thanks
--
Darrell (Daz) DeBoer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Confused by part of userguide build process

KARR, DAVID

From: Daz DeBoer [mailto:[hidden email]]
Sent: Friday, July 18, 2014 10:41 AM
To: [hidden email]
Subject: Re: [gradle-dev] Confused by part of userguide build process

 

 

On Fri, Jul 18, 2014 at 10:28 AM, KARR, DAVID <[hidden email]> wrote:


I’m seeing a new failure symptom this morning.  This is what I’m running:

gradle :integTest:integTest --tests org.gradle.integtests.samples.UserGuideSamplesIntegrationTest info

This is failing with:

org.gradle.integtests.samples.UserGuideSamplesIntegrationTest > initializationError FAILED

    java.lang.AssertionError: Couldn't find any samples. Most likely, samples.xml was not generated.

    Please run 'gradle docs:userguideDocbook' first. Expression: assertion. Values: assertion = false

I’ve tried running both “gradle docs:userguide” and “gradle docs:userguideDocbook” before this, but it makes no difference.  I even tried the latter with “rerun-tasks”.  I also looked for a “samples.xml” and found this:

% ls -lt ./subprojects/docs/build/src/samples.xml

-rwxr-xr-x+ 1 dk068x Domain Users 68 Jul 18 07:32 ./subprojects/docs/build/src/samples.xml*

 

However, this file is essentially empty:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<samples/>

At this point, I did a “gradle clean” and then verified that the “samples.xml” file was gone.  I then reran “docs:userguide” and then inspected the resulting “samples.xml” file.  It was over 60k bytes, but I didn’t inspect the file.  I then reran my integTest run.  It failed in the same way.  I then reinspected the “samples.xml” file, and it appears that the integTest run actually changed that file back to the almost empty version.


I seem to recall hitting something similar at one stage, but I didn't investigate further. IIRC there was a bug in our build logic that meant the order that tasks were run in was important. 

 

Following your lead, I can confirm this is an issue. To reproduce run:

./gradlew clean 

./gradlew :docs:userguide
./gradlew :integTest:integTest --tests org.gradle.integtests.samples.UserGuideSamplesIntegrationTest

 

It seems like something is clearing the samples.xml file early in the integTest run, but the :docs:userguideDocbook task is considered UP-TO-DATE so it doesn't regenerate it.If you wanted to dig deeper to see exactly which tasks are causing this problem, it would be most appreciated. Even to just know the minimal set of tasks that trigger this condition would help.

 

Ok.  I would assume that adding “debug” to that last command will be a good starting point.  I don’t know how many times I’ve wished I could set a breakpoint on file i/o for a particular file.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Confused by part of userguide build process

Daz DeBoer-2



On Fri, Jul 18, 2014 at 11:49 AM, KARR, DAVID <[hidden email]> wrote:

From: Daz DeBoer [mailto:[hidden email]]
Sent: Friday, July 18, 2014 10:41 AM


To: [hidden email]
Subject: Re: [gradle-dev] Confused by part of userguide build process

 

 

On Fri, Jul 18, 2014 at 10:28 AM, KARR, DAVID <[hidden email]> wrote:


I’m seeing a new failure symptom this morning.  This is what I’m running:

gradle :integTest:integTest --tests org.gradle.integtests.samples.UserGuideSamplesIntegrationTest info

This is failing with:

org.gradle.integtests.samples.UserGuideSamplesIntegrationTest > initializationError FAILED

    java.lang.AssertionError: Couldn't find any samples. Most likely, samples.xml was not generated.

    Please run 'gradle docs:userguideDocbook' first. Expression: assertion. Values: assertion = false

I’ve tried running both “gradle docs:userguide” and “gradle docs:userguideDocbook” before this, but it makes no difference.  I even tried the latter with “rerun-tasks”.  I also looked for a “samples.xml” and found this:

% ls -lt ./subprojects/docs/build/src/samples.xml

-rwxr-xr-x+ 1 dk068x Domain Users 68 Jul 18 07:32 ./subprojects/docs/build/src/samples.xml*

 

However, this file is essentially empty:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<samples/>

At this point, I did a “gradle clean” and then verified that the “samples.xml” file was gone.  I then reran “docs:userguide” and then inspected the resulting “samples.xml” file.  It was over 60k bytes, but I didn’t inspect the file.  I then reran my integTest run.  It failed in the same way.  I then reinspected the “samples.xml” file, and it appears that the integTest run actually changed that file back to the almost empty version.


I seem to recall hitting something similar at one stage, but I didn't investigate further. IIRC there was a bug in our build logic that meant the order that tasks were run in was important. 

 

Following your lead, I can confirm this is an issue. To reproduce run:

./gradlew clean 

./gradlew :docs:userguide
./gradlew :integTest:integTest --tests org.gradle.integtests.samples.UserGuideSamplesIntegrationTest

 

It seems like something is clearing the samples.xml file early in the integTest run, but the :docs:userguideDocbook task is considered UP-TO-DATE so it doesn't regenerate it.If you wanted to dig deeper to see exactly which tasks are causing this problem, it would be most appreciated. Even to just know the minimal set of tasks that trigger this condition would help.

 

Ok.  I would assume that adding “debug” to that last command will be a good starting point.  I don’t know how many times I’ve wished I could set a breakpoint on file i/o for a particular file.


Possibly. I sat there 'cat'ing the samples.xml file, and it looked like it was :docs:userguideFragmentSrc or :docs:distDocs that was doing the purging. Just getting a minimal reproducible example would be useful.

--
Darrell (Daz) DeBoer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Confused by part of userguide build process

KARR, DAVID
In reply to this post by Daz DeBoer-2

 

From: Daz DeBoer [mailto:[hidden email]]
Sent: Friday, July 18, 2014 10:41 AM
To: [hidden email]
Subject: Re: [gradle-dev] Confused by part of userguide build process

 

 

On Fri, Jul 18, 2014 at 10:28 AM, KARR, DAVID <[hidden email]> wrote:


I’m seeing a new failure symptom this morning.  This is what I’m running:

gradle :integTest:integTest --tests org.gradle.integtests.samples.UserGuideSamplesIntegrationTest info

This is failing with:

org.gradle.integtests.samples.UserGuideSamplesIntegrationTest > initializationError FAILED

    java.lang.AssertionError: Couldn't find any samples. Most likely, samples.xml was not generated.

    Please run 'gradle docs:userguideDocbook' first. Expression: assertion. Values: assertion = false

I’ve tried running both “gradle docs:userguide” and “gradle docs:userguideDocbook” before this, but it makes no difference.  I even tried the latter with “rerun-tasks”.  I also looked for a “samples.xml” and found this:

% ls -lt ./subprojects/docs/build/src/samples.xml

-rwxr-xr-x+ 1 dk068x Domain Users 68 Jul 18 07:32 ./subprojects/docs/build/src/samples.xml*

 

However, this file is essentially empty:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<samples/>

At this point, I did a “gradle clean” and then verified that the “samples.xml” file was gone.  I then reran “docs:userguide” and then inspected the resulting “samples.xml” file.  It was over 60k bytes, but I didn’t inspect the file.  I then reran my integTest run.  It failed in the same way.  I then reinspected the “samples.xml” file, and it appears that the integTest run actually changed that file back to the almost empty version.


I seem to recall hitting something similar at one stage, but I didn't investigate further. IIRC there was a bug in our build logic that meant the order that tasks were run in was important. 

 

Following your lead, I can confirm this is an issue. To reproduce run:

./gradlew clean 

./gradlew :docs:userguide
./gradlew :integTest:integTest --tests org.gradle.integtests.samples.UserGuideSamplesIntegrationTest

 

It seems like something is clearing the samples.xml file early in the integTest run, but the :docs:userguideDocbook task is considered UP-TO-DATE so it doesn't regenerate it.If you wanted to dig deeper to see exactly which tasks are causing this problem, it would be most appreciated. Even to just know the minimal set of tasks that trigger this condition would help.

 

I tried to set “org.gradle.userguide.samples.filter” to a pattern that won’t (likely) match anything, so I could check what happens when it doesn’t execute any sample tests.  Unfortunately, that didn’t work.  It seemed to ignore that property.

 

I then simply tried refreshing the view of the “samples.xml” file, watching when it hit the bad state, and just refreshing my output file, so I get a rough idea of what point is just past when it did something wrong.  This is an excerpt from the log that shows what the last line was in the log right after refreshing when I saw the bad file state (I then refreshed again to get more of the file):

Skipping task ':core:processTestFixturesResources' as it has no source files.

:core:processTestFixturesResources UP-TO-DATE

:core:processTestFixturesResources (Thread[Daemon Thread 13,5,main]) completed. Took 0.002 secs.

:core:testFixturesClasses (Thread[Daemon Thread 13,5,main]) started.

:core:testFixturesClasses

Skipping task ':core:testFixturesClasses' as it has no actions.

:core:testFixturesClasses (Thread[Daemon Thread 13,5,main]) completed. Took 0.0 secs.

:docs:samplesDocbook (Thread[Daemon Thread 13,5,main]) started.

:docs:samplesDocbook

Skipping task ':docs:samplesDocbook' as it is up-to-date (took 0.371 secs).

:docs:samplesDocbook UP-TO-DATE

:docs:samplesDocbook (Thread[Daemon Thread 13,5,main]) completed. Took 0.38 secs.

:docs:userguideDocbook (Thread[Daemon Thread 13,5,main]) started.

:docs:userguideDocbook // This was the last line.

Skipping task ':docs:userguideDocbook' as it is up-to-date (took 0.484 secs).

:docs:userguideDocbook UP-TO-DATE

 

How could I modify the test so that I can put code that shows the size of the “samples.xml” file after every sample is processed?

Loading...