Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 420078

Summary: Avoid creating "Dirt" during the CBI build
Product: [Eclipse Project] Platform Reporter: Lars Vogel <Lars.Vogel>
Component: RelengAssignee: Platform-Releng-Inbox <platform-releng-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: akurtakov, daniel_megert, david_williams, fabian.pfaff, Lars.Vogel, loskutov, mat.booth, thanh.ha
Version: 4.3   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 419503, 419506, 419508, 419510, 419522, 419524, 419527, 419528, 419531, 459323, 459584, 461002, 463150, 481710, 487723, 488935, 490410, 490412, 490413, 498988, 498992    
Bug Blocks: 434596, 480588    
Attachments:
Description Flags
post build clean status after I20131023-2000
none
post build clean status after I20131030-0800
none
dirty repo after M5 build (I20140123-1600)
none
statis of build tree after RC2
none
result of "git status" after I20150210-0800 build
none
dirt "report" after 20150224 I-build none

Description Lars Vogel CLA 2013-10-22 09:48:12 EDT
Tycho 0.19 added a check that makes the CBI build fail is the git repo is dirty after the build.

The eclipse build create real dirt and needs some work to either move build output into .gitignored output folders or to add the output files to .gitignore.
Comment 1 David Williams CLA 2013-10-22 10:09:13 EDT
There's already specific bugs open for these against each component, search eclipse bugs for subject "Dirty working tree".

https://bugs.eclipse.org/bugs/buglist.cgi?list_id=7249258&short_desc=Dirty%20working%20tree&classification=Eclipse&query_format=advanced&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&short_desc_type=allwordssubstr


The issue you are hitting now, based on your post to CBI mailing list is actually a case of "over cleaning" :) See bug 419811.
Comment 2 Lars Vogel CLA 2013-10-22 10:14:47 EDT
Thanks David. Maybe a "Master Bug" which depends on all the component bugs for the dirty issue would be helpful?
Comment 3 David Williams CLA 2013-10-22 10:48:05 EDT
(In reply to Lars Vogel from comment #2)
> Thanks David. Maybe a "Master Bug" which depends on all the component bugs
> for the dirty issue would be helpful?

You are welcome to re-open this one and use for that purpose, if you'd like. (Be sure to include the fixed ones :) (which were not in my query above).
Comment 4 Lars Vogel CLA 2013-10-22 10:56:03 EDT
Reopening the bug to track the detailed dirty bugs. 

David, adding &bug_status=RESOLVED and and &bug_status=CLOSED to your query did not show me more bugs.
Comment 5 Lars Vogel CLA 2013-10-23 10:54:15 EDT
Is the assumption correct that after all these "dirt" bugs are fixed, the reset of the submodule via Git (see below) is not required anymore?

git submodule foreach git clean -f -d -x
git submodule foreach git reset --hard HEAD
git clean -f -d -x
git reset --hard HEAD
Comment 6 Thanh Ha CLA 2013-10-23 11:22:04 EDT
(In reply to Lars Vogel from comment #5)
> Is the assumption correct that after all these "dirt" bugs are fixed, the
> reset of the submodule via Git (see below) is not required anymore?
> 
> git submodule foreach git clean -f -d -x
> git submodule foreach git reset --hard HEAD
> git clean -f -d -x
> git reset --hard HEAD


In theory yes.
Comment 7 David Williams CLA 2013-10-23 23:39:36 EDT
Created attachment 236823 [details]
post build clean status after I20131023-2000

shows that all "about.mappings" are now no longer dirt (bug 419503). 

(I'll periodically attach "git status" listings here, after one of our production builds ... but I'm not expecting this to be fixed "real quick" ... but we'll make progress!)
Comment 8 David Williams CLA 2013-10-30 11:42:34 EDT
Created attachment 237072 [details]
post build clean status after I20131030-0800

While not quite final build for M3 ... close enough to say this is the state of things at M3. 

Some progress made ... much still to go.
Comment 9 David Williams CLA 2013-11-26 12:53:40 EST
(In reply to David Williams from comment #8)
> Created attachment 237072 [details]
> post build clean status after I20131030-0800
> 
> While not quite final build for M3 ... close enough to say this is the state
> of things at M3. 
> 
> Some progress made ... much still to go.

Thought I'd check today, after I20131126-0800 build, and there has been no change since last attachment.
Comment 10 Dani Megert CLA 2014-01-21 08:48:35 EST
Looks like the "dirt" is produced by the builder by placing temp files into the root of bundles. In that case the builder should actually remove those files. The source providers can't and don't want to know what a certain build system puts into their source tree.

If the builder is not capable deleting that temp stuff or use a temp directory outside the source tree, then it remains to clients to call git clean.

Having said that, most of the "dirt" could be avoided by changing the packaging of those bundles to get rid of nested JARs.
Comment 11 David Williams CLA 2014-01-24 01:43:40 EST
Created attachment 239293 [details]
dirty repo after M5 build (I20140123-1600)

I think there as been progress.
Comment 12 David Williams CLA 2014-05-23 17:27:30 EDT
Created attachment 243454 [details]
statis of build tree after RC2

This file shows things about the same as they were in previous check ... 
maybe progress during Mars?
Comment 13 David Williams CLA 2015-02-10 12:18:11 EST
Created attachment 250689 [details]
result of "git status" after I20150210-0800 build

I have attached a check of dirt in working tree, taken after today's "production I-build". 

Seems some improvement (though, I've lost track) and did notice there is a new one .. I've opened bug 459584 to track it.
Comment 14 Alexander Kurtakov CLA 2015-02-25 06:43:32 EST
(In reply to David Williams from comment #13)
> Created attachment 250689 [details]
> result of "git status" after I20150210-0800 build
> 
> I have attached a check of dirt in working tree, taken after today's
> "production I-build". 
> 
> Seems some improvement (though, I've lost track) and did notice there is a
> new one .. I've opened bug 459584 to track it.

Would you please share the state after latest I-build? I have my own builds and check against them but would rather have eclipse.org results for comparison too.
Comment 15 David Williams CLA 2015-02-25 09:29:46 EST
Created attachment 251096 [details]
dirt "report" after 20150224 I-build

(In reply to Alexander Kurtakov from comment #14)

> Would you please share the state after latest I-build? I have my own builds
> and check against them but would rather have eclipse.org results for
> comparison too.

Sure. I've added attachment. Does it match what you see? 

I "get" these by running, in the "build area" (under 
/shared/eclipse/builds/4I/gitCache/eclipse.platform.releng.aggregator) 
the following sort of commands: 

git status > ~/temp/dirt<date>.txt
git submodule foreach git status >> ~/temp/dirt<date>.txt

If you agree that is "the right way", I will make a "dirt report" part of every build. Eventually, we'd want a "releng tests" to make sure we don't regress.
Comment 16 Alexander Kurtakov CLA 2015-02-25 09:52:14 EST
(In reply to David Williams from comment #15)
> Created attachment 251096 [details]
> dirt "report" after 20150224 I-build
> 
> (In reply to Alexander Kurtakov from comment #14)
> 
> > Would you please share the state after latest I-build? I have my own builds
> > and check against them but would rather have eclipse.org results for
> > comparison too.
> 
> Sure. I've added attachment. Does it match what you see? 

Yes, it's exactly the same with mine.

> 
> I "get" these by running, in the "build area" (under 
> /shared/eclipse/builds/4I/gitCache/eclipse.platform.releng.aggregator) 
> the following sort of commands: 
> 
> git status > ~/temp/dirt<date>.txt
> git submodule foreach git status >> ~/temp/dirt<date>.txt
> 
> If you agree that is "the right way", I will make a "dirt report" part of
> every build. Eventually, we'd want a "releng tests" to make sure we don't
> regress.

Having such a report would be nice. When you say releng test you mean only when we have all the dirt gone? Or one comparing against current status?
Comment 17 David Williams CLA 2015-02-25 10:03:32 EST
(In reply to Alexander Kurtakov from comment #16)

> Having such a report would be nice. When you say releng test you mean only
> when we have all the dirt gone? Or one comparing against current status?

Either. I've not really thought it through, but for such tests, we often simply look at "file size" of the report to be sure it has not "grown". And then as improvements are made, we reduce the hard coded "checked file size".
Comment 18 David Williams CLA 2015-03-23 02:50:45 EDT
Did I ever document the "dirty report". Created every build. 

For example, for M6, the report is at 

http://download.eclipse.org/eclipse/downloads/drops4/S-4.5M6-201503200800/buildlogs/dirtReport.txt

To navigate there, from DL page, there is a link to 
logs for the current build
and from that page, there is a link to 
Release engineering build logs
and on that page, there is a link to 
dirtReport.txt

There is also a "releng test" that fails with "regression" if the file get's larger ... and every now and then, I'll have to change the constant in the test on what the "maximum file size" should be. Currently set as 37179 bytes.
Comment 19 David Williams CLA 2015-03-23 02:53:55 EDT
I also wanted to point out one solution to "cleaning" mentioned in bug 461837 and in gerrit at https://git.eclipse.org/r/#/c/43539/1

In short, the idea being to do more "cleaning" from the pom ... less that ideal, I think ... but ... perhaps a tactical solution? (If anyone had time to work on it).
Comment 20 David Williams CLA 2016-03-24 18:33:34 EDT
All the "depends on" bugs show "fixed", but the "dirt report" shows we are not clean. Did we miss opening some initially? Or have things changed? 

Entering 'eclipse.jdt'
Entering 'eclipse.jdt.core'
?? org.eclipse.jdt.core/jdtCompilerAdapter.jar
Entering 'eclipse.jdt.core.binaries'
Entering 'eclipse.jdt.debug'
?? org.eclipse.jdt.debug.tests/javadebugtests.jar
?? org.eclipse.jdt.debug/jdi.jar
?? org.eclipse.jdt.debug/jdimodel.jar
Entering 'eclipse.jdt.ui'
Entering 'eclipse.pde'
Entering 'eclipse.pde.build'
Entering 'eclipse.pde.ui'
Entering 'eclipse.platform'
Entering 'eclipse.platform.common'
?? bundles/org.eclipse.jdt.doc.isv/index/
?? bundles/org.eclipse.jdt.doc.user/index/
?? bundles/org.eclipse.pde.doc.user/index/
?? bundles/org.eclipse.platform.doc.isv/index/
?? bundles/org.eclipse.platform.doc.isv/samples/org.eclipse.compare.examples.xml/
?? bundles/org.eclipse.platform.doc.isv/samples/org.eclipse.compare.examples/
?? bundles/org.eclipse.platform.doc.isv/samples/org.eclipse.swt.examples.launcher/
?? bundles/org.eclipse.platform.doc.isv/samples/org.eclipse.swt.examples.ole.win32/
?? bundles/org.eclipse.platform.doc.isv/samples/org.eclipse.swt.examples.views/
?? bundles/org.eclipse.platform.doc.isv/samples/org.eclipse.swt.examples/
?? bundles/org.eclipse.platform.doc.isv/samples/org.eclipse.team.examples.filesystem/
?? bundles/org.eclipse.platform.doc.isv/samples/org.eclipse.ui.examples.fieldassist/
?? bundles/org.eclipse.platform.doc.isv/samples/org.eclipse.ui.examples.javaeditor/
?? bundles/org.eclipse.platform.doc.isv/samples/org.eclipse.ui.examples.multipageeditor/
?? bundles/org.eclipse.platform.doc.isv/samples/org.eclipse.ui.examples.propertysheet/
?? bundles/org.eclipse.platform.doc.isv/samples/org.eclipse.ui.examples.readmetool/
?? bundles/org.eclipse.platform.doc.isv/samples/org.eclipse.ui.examples.undo/
?? bundles/org.eclipse.platform.doc.user/index/
Entering 'eclipse.platform.debug'
Entering 'eclipse.platform.releng'
Entering 'eclipse.platform.resources'
Entering 'eclipse.platform.runtime'
Entering 'eclipse.platform.swt'
Entering 'eclipse.platform.swt.binaries'
Entering 'eclipse.platform.team'
Entering 'eclipse.platform.text'
Entering 'eclipse.platform.ua'
Entering 'eclipse.platform.ui'
Entering 'eclipse.platform.ui.tools'
Entering 'rt.equinox.binaries'
Entering 'rt.equinox.bundles'
Entering 'rt.equinox.framework'
?? features/org.eclipse.equinox.executable.feature/bin/cocoa/macosx/x86_64/Eclipse.app/Contents/MacOS/
?? features/org.eclipse.equinox.executable.feature/bin/gtk/
?? features/org.eclipse.equinox.executable.feature/bin/win32/
Entering 'rt.equinox.p2'
Comment 21 Dani Megert CLA 2016-03-25 08:47:25 EDT
(In reply to David Williams from comment #20)
> All the "depends on" bugs show "fixed", but the "dirt report" shows we are
> not clean. Did we miss opening some initially? Or have things changed? 

I'm not aware of any change.
Comment 22 Andrey Loskutov CLA 2016-08-01 10:20:27 EDT
> (In reply to David Williams from comment #20)
> All the "depends on" bugs show "fixed"

I've opened 3 new bugs (and attached possible patches for .gitignore files) for the "dirt" I saw in my broken build:
Bug 498986 - [releng] Dirty git status after build in eclipse.jdt.core
Bug 498988 - [releng] Dirty git status after build in eclipse.jdt.debug
Bug 498992 - [releng] Dirty git status after build in eclipse.platform.common
Comment 23 Alexander Kurtakov CLA 2017-01-04 04:50:36 EST
*** Bug 498992 has been marked as a duplicate of this bug. ***
Comment 24 Lars Vogel CLA 2020-06-24 07:52:38 EDT
Only Bug 490411 and Bug 498986 left, lets close this tracking bug and work on these directly.