Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321054 - (automatic) updates of configuration can cause loss of attribute options
Summary: (automatic) updates of configuration can cause loss of attribute options
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: 3.4.2   Edit
Assignee: Frank Becker CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 321060
Blocks:
  Show dependency tree
 
Reported: 2010-07-27 13:45 EDT by Ankur Sharma CLA
Modified: 2010-09-02 15:01 EDT (History)
4 users (show)

See Also:


Attachments
comitted patch (5.54 KB, patch)
2010-08-15 15:10 EDT, Frank Becker CLA
eclipse: review?
Details | Diff
mylyn/context/zip (14.57 KB, application/octet-stream)
2010-08-15 15:10 EDT, Frank Becker CLA
no flags Details
backported patch (10.49 KB, patch)
2010-09-01 15:53 EDT, Steffen Pingel CLA
no flags Details | Diff
forward port patch (2.92 KB, patch)
2010-09-02 14:58 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (5.35 KB, application/octet-stream)
2010-09-02 14:58 EDT, Frank Becker CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ankur Sharma CLA 2010-07-27 13:45:41 EDT
Configuration: Eclipse Integration build with Mylyn 3.4 (3.4.0.v20100608-0100-e3x to be specific). 
Repository: bugs.eclipse.org

I update Eclipse to latest I-build using Help -> Check for updates

This would cause Mylyn to forget the values 3.7 and 3.7 Mx. It shows 4.0 entry directly after  3.6.x entries for the "Milestone" attribute.


What generally fixes it?
1. Revalidating credentials on Task Repository view
2. Hitting "Update Attributes from Repository" couple of times.
3. Restart Eclipse

Running Step 1 to 3 in random order fixes the problem.


I am not sure problem is with p2 or Mylyn. But usecase-wise Mylyn is what fails.
Comment 1 Steffen Pingel CLA 2010-07-27 14:23:43 EDT
Let's track this on bug 320978. It boils down to the same problem that you ended with a stale repository configuration. I don't think this is related to the p2 update but coincidence.

*** This bug has been marked as a duplicate of bug 320978 ***
Comment 2 Ankur Sharma CLA 2010-07-27 14:34:23 EDT
I would like to reopen this one as it is quite different from bug 320978 (which is about blocked UI).

Adding Prakash who faced similar problem - vanishing attributes post I-build update. So I doubt its just coincidence. Also, I have been facing problem at least since Eclipse 3.6 M3 (thats around when I started using Mylyn more regularly).
Comment 3 Steffen Pingel CLA 2010-07-27 14:40:00 EDT
Fair enough, then let's track the Bugzilla related problem here. From bug 320978 comment 3:

The repository configuration attributes are regularly refreshed in the background. If you want to manually trigger a refresh in the background you can use the popup menu in the Task Repositories view.

Note that bugs.eclipse.org mirrors the configuration which can sometimes cause a delay when new values are added to the configuration: http://wiki.eclipse.org/index.php/Mylyn_FAQ#Why_are_my_updated_repository_attributes_not_showing_up.3F . In your case it sounds like you keep getting a stale configuration which causes values to get lost.

bug 320978 comment 4:

The link https://bugs.eclipse.org/bugs/config.cgi redirects me to
http://d2u376ub0heus3.cloudfront.net/arch/config.xml

I do not have any extension installed. Only these two features
Mylyn Connector: Bugzilla 3.4.0.v20100608-0100-e3x 
org.eclipse.mylyn.bugzilla_feature.feature.group
Mylyn Task List (Required) 3.4.0.v20100608-0100-e3x 
org.eclipse.mylyn_feature.feature.group
Comment 4 Steffen Pingel CLA 2010-07-27 14:55:50 EDT
The problem is two fold: 

1) As suspected, the configuration on the mirror that you are being redirected to is stale. I have filed bug 321060 to address that.

2) Even if you happen to get a current copy from download.eclipse.org the next (automatic) update might still replace it with a stale one. The update mechanism only verifies that the ETag is different but does not check the last modified time stamp.

Since there is a good chance that a mirrored config.xml files gets stale I think it's worth checking the Last-Modified header and to only proceed with an automatic update if the requested copy is actually newer. A manual update should always force an update like it does now. 

Rob, do you have time to look into this for 3.4.1?
Comment 5 Ankur Sharma CLA 2010-07-27 15:07:53 EDT
Thanks for a prompt investigation.
Comment 6 Frank Becker CLA 2010-08-15 15:10:10 EDT
Created attachment 176637 [details]
comitted patch

Please verify
Comment 7 Frank Becker CLA 2010-08-15 15:10:13 EDT
Created attachment 176638 [details]
mylyn/context/zip
Comment 8 Frank Becker CLA 2010-08-15 15:13:45 EDT
Please reopen if you find any problem.
Comment 9 Frank Becker CLA 2010-08-15 23:47:03 EDT
Sorry I did not see that the TargetMilestone is 3.4.2. My patch is only in HEAD.

Steffen, can you do the backport?
Comment 10 Steffen Pingel CLA 2010-09-01 15:53:04 EDT
Created attachment 178001 [details]
backported patch
Comment 11 Steffen Pingel CLA 2010-09-01 17:06:34 EDT
I have backported the changes. I changed the way the dates are parsed to use the DateUtil class from HttpClient. Can you forward port that to head so we have same implementation in both branches?
Comment 12 Frank Becker CLA 2010-09-02 14:58:47 EDT
Created attachment 178088 [details]
forward port patch
Comment 13 Frank Becker CLA 2010-09-02 14:58:49 EDT
Created attachment 178089 [details]
mylyn/context/zip
Comment 14 Frank Becker CLA 2010-09-02 15:01:40 EDT
I think we can close this now.