Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328405 - Caching fetch factories are broken
Summary: Caching fetch factories are broken
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.7 M3   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 328462
  Show dependency tree
 
Reported: 2010-10-21 16:18 EDT by Andrew Niefer CLA
Modified: 2010-10-22 17:19 EDT (History)
1 user (show)

See Also:


Attachments
patch (5.05 KB, patch)
2010-10-22 14:29 EDT, Andrew Niefer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Niefer CLA 2010-10-21 16:18:52 EDT
bug 327607 introduced changes to call IFetchFactory#addTargets when generating a retrieve.xml script to fetch a single feature.
This breaks fetch factories that cached information for optimization purposes, in particular the p2 fetch factory.

Events go like this:

1) Generate script fetch the entire feature (this is cached)
2)   generate a retrieve.xml
           1) generate fetch to get feature.xml
           2) print targets (clears cache)
           3) run script 
3) generate fetch for plugins (adds to cache)
4) print targets

because the nested retrieve.xml call prints the targets, any cache kept by the fetch factory generally will be cleared here.  Then when the main fetch script is continued, the cache is missing the feature and we end up only actually fetching the plugins.

The solution is probably to use a separate instance of the fetch factory when generating the nested retrieve.xml
Comment 1 Andrew Niefer CLA 2010-10-21 16:19:10 EDT
Try to fix this for m3 to avoid the regression
Comment 2 Gunnar Wagenknecht CLA 2010-10-22 02:04:10 EDT
Good catch. It does make sense to use a separate instance for retrieve.xml. Are you working on this or should I create a patch?
Comment 3 Andrew Niefer CLA 2010-10-22 11:20:26 EDT
I'll do this, it turned into a problem for our e4 git based build
Comment 4 Andrew Niefer CLA 2010-10-22 14:29:52 EDT
Created attachment 181527 [details]
patch

This is my patch.  One thing I noticed is that the javadoc comment on FetchTaskFactoriesRegsitry#getFactory was wrong, the factories were cached.
Comment 5 Andrew Niefer CLA 2010-10-22 17:19:04 EDT
released