Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333075 - Updating of repo configuration failed
Summary: Updating of repo configuration failed
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5   Edit
Assignee: Frank Becker CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-22 06:29 EST by Tomasz Zarna CLA
Modified: 2011-03-05 02:51 EST (History)
5 users (show)

See Also:


Attachments
mylyn/context/zip (2.65 KB, application/octet-stream)
2010-12-26 15:16 EST, Frank Becker CLA
no flags Details
commited patch (3.21 KB, patch)
2011-01-08 15:18 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (16.49 KB, application/octet-stream)
2011-01-08 15:18 EST, Frank Becker CLA
no flags Details
disable throw new CoreException (1.31 KB, patch)
2011-01-12 15:15 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (23.04 KB, application/octet-stream)
2011-01-12 15:15 EST, Frank Becker CLA
no flags Details
patch V4 (5.79 KB, patch)
2011-02-20 14:09 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (11.80 KB, application/octet-stream)
2011-02-20 14:10 EST, Frank Becker CLA
no flags Details
patch V5 (3.99 KB, patch)
2011-02-25 15:34 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (73.88 KB, application/octet-stream)
2011-02-25 15:34 EST, Frank Becker CLA
no flags Details
patch V6 (3.23 KB, patch)
2011-02-25 16:31 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (28.91 KB, application/octet-stream)
2011-02-25 16:31 EST, Frank Becker CLA
no flags Details
mylyn/context/zip (29.36 KB, application/octet-stream)
2011-02-27 14:17 EST, Frank Becker CLA
no flags Details
patch V7 (1.38 KB, patch)
2011-03-02 14:28 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (32.85 KB, application/octet-stream)
2011-03-02 14:28 EST, Frank Becker CLA
no flags Details
mylyn/context/zip (51.57 KB, application/octet-stream)
2011-03-04 17:02 EST, Frank Becker CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Zarna CLA 2010-12-22 06:29:22 EST
Eclipse: I20101221-1019
Mylyn: 3.5.0.I20101215-2000-e3x
Bugzilla: bugs.eclipse.org

After trying to refresh attributes in the Task Editor I was presented with an error message saying:

Error parsing xmlrpc response.
Unexpected exception>java.lang.String incompatible with java.lang.Integer
Comment 1 Tomasz Zarna CLA 2010-12-22 06:45:23 EST
What's interesting, setting a target milestone to a value the Task Editor doesn't know about (couldn't fetch it from the repo) results in displaying "" in the Target Milestone combo in the editor.
Comment 2 Steffen Pingel CLA 2010-12-26 07:26:29 EST
Did you see that with a public Bugzilla instance? Frank, if a task has an unknown milestone, can we add the value to the list of options instead of showing a blank field?
Comment 3 Frank Becker CLA 2010-12-26 15:16:04 EST
When you disable "Use xmlrpc.cgi" under the Additional Settings the problem is solved.

I did not know if bugs.eclipse.org is enabled for xmlrpc. But I think that here can be a problem in the Bugzilla instzallation on bugs.eclipse.org.
Comment 4 Frank Becker CLA 2010-12-26 15:16:06 EST
Created attachment 185820 [details]
mylyn/context/zip
Comment 5 Frank Becker CLA 2010-12-26 15:23:06 EST
(In reply to comment #1)
> What's interesting, setting a target milestone to a value the Task Editor
> doesn't know about (couldn't fetch it from the repo) results in displaying "" in
> the Target Milestone combo in the editor.

How did you set the target milestone to a value that is not in the Task Editor. I see no way!
Comment 6 Steffen Pingel CLA 2010-12-27 14:44:28 EST
This is a common scenario if a new milestone is added in Bugzilla and set on a bug through the web interface.
Comment 7 Tomasz Zarna CLA 2011-01-03 05:08:44 EST
(In reply to comment #6)
> This is a common scenario if a new milestone is added in Bugzilla and set on a
> bug through the web interface.

That is correct. I was forced to leave the Task Editor, update the bug in a browser and when I switched back to the editor I saw comment 1.
Comment 8 Frank Becker CLA 2011-01-08 15:18:06 EST
Created attachment 186334 [details]
commited patch

This patch includes 

* test if all values of an attribute are in the options if exists
* fire an update configuration job if we found one value not in the options
Comment 9 Frank Becker CLA 2011-01-08 15:18:09 EST
Created attachment 186335 [details]
mylyn/context/zip
Comment 10 Steffen Pingel CLA 2011-01-11 14:10:09 EST
I am not fully understanding the proposed change. Where is the the "Update Config" exception is actually thrown? Retrieving the configuration is a potentially expensive operation and we have to be very careful when to allow that. I would prefer if we reverted this change and discussed alternatives first, e.g. automatically adding the missing option if an unknown milestone/component/version is retrieved.
Comment 11 Frank Becker CLA 2011-01-12 15:15:47 EST
Created attachment 186666 [details]
disable throw new CoreException

(In reply to comment #10)
> I am not fully understanding the proposed change. Where is the the "Update
> Config" exception is actually thrown?
BugzillaTaskDataHandler.initializeTaskData. Now this is disabled
> Retrieving the configuration is a
> potentially expensive operation and we have to be very careful when to allow
> that. I would prefer if we reverted this change and discussed alternatives
> first, e.g. automatically adding the missing option if an unknown
> milestone/component/version is retrieved.

The missing option is already added in the BugzillaTaskDataHandler.initializeTaskData
Comment 12 Frank Becker CLA 2011-01-12 15:15:49 EST
Created attachment 186667 [details]
mylyn/context/zip
Comment 13 Frank Becker CLA 2011-02-20 14:09:59 EST
Created attachment 189373 [details]
patch V4

Steffen,

I change the update of the configuration to now use TaskJob and no longer direct client.getRepositoryConfiguration. With this we have an async way for the update. 

Do you think we can now activate the disabled "Update Config" exception?
Comment 14 Frank Becker CLA 2011-02-20 14:10:03 EST
Created attachment 189374 [details]
mylyn/context/zip
Comment 15 Steffen Pingel CLA 2011-02-21 23:15:20 EST
It is problematic if the the connector spawns jobs that are not managed by the framework. It could lead to several configuration refresh jobs running in parallel for instance. I think we need to solve this differently. What is the problem that we are trying to solve here exactly?
Comment 16 Frank Becker CLA 2011-02-23 15:37:04 EST
(In reply to comment #15)
> It is problematic if the the connector spawns jobs that are not managed by the
> framework. It could lead to several configuration refresh jobs running in
> parallel for instance. I think we need to solve this differently. What is the
> problem that we are trying to solve here exactly?

The problem I want to solve is the following:
We know if we found an missing value that the configuration is not up to date so I want to get the latest version, so that ohter tasks / refresh of tasks did not get the same problem.

That why I create the Update Job.

Did you know a better way?
Comment 17 Steffen Pingel CLA 2011-02-23 18:31:52 EST
First off, we should be dynamically adding newly discovered component, milestones and versions to the configuration without triggering a re-download. Does that already work? I still occasionally get a blank field when new milestones are added but that should be simple to fix.

We could then also set a flag that marks the configuration as stale and inform the framework that an update is required or do it as part of the regular update cycle. In either case, the download configuration refresh to be managed by the framework.
Comment 18 Frank Becker CLA 2011-02-25 15:34:55 EST
Created attachment 189850 [details]
patch V5

(In reply to comment #17)
> First off, we should be dynamically adding newly discovered component,
> milestones and versions to the configuration without triggering a re-download.
> Does that already work? I still occasionally get a blank field when new
> milestones are added but that should be simple to fix.
I add the new value to the localTaskDate but BugzillaAttributeMapper.getOptions() use the values from the configuration so I change this.

Can I commit the patch or should we wait for version 3.6
> 
> We could then also set a flag that marks the configuration as stale and inform
> the framework that an update is required or do it as part of the regular update
> cycle. In either case, the download configuration refresh to be managed by the
> framework.

I think we should do this after 3.5 is released.

Thoughts?
Comment 19 Frank Becker CLA 2011-02-25 15:34:58 EST
Created attachment 189851 [details]
mylyn/context/zip
Comment 20 Steffen Pingel CLA 2011-02-25 16:00:05 EST
(In reply to comment #18)
> I add the new value to the localTaskDate but
> BugzillaAttributeMapper.getOptions() use the values from the configuration so I
> change this.
> 
> Can I commit the patch or should we wait for version 3.6

Good find! We need the code in the mapper to work the way it does right now to reflect configuration refreshes in the task editor. For product, milestone etc. could we do a check if the current value is part of the options coming from the repository and add it from the attribute if not? That way we could still display current configuration options but would not have the problem that newer values show blank.

> >
> > We could then also set a flag that marks the configuration as stale and inform
> > the framework that an update is required or do it as part of the regular
> update
> > cycle. In either case, the download configuration refresh to be managed by the
> > framework.
> 
> I think we should do this after 3.5 is released.
> 
> Thoughts?

Agreed. We should create a bug for 3.6 to consider that improvement.
Comment 21 Frank Becker CLA 2011-02-25 16:31:21 EST
Created attachment 189857 [details]
patch V6

(In reply to comment #20)
> (In reply to comment #18)
> > I add the new value to the localTaskDate but
> > BugzillaAttributeMapper.getOptions() use the values from the configuration so I
> > change this.
> > 
> > Can I commit the patch or should we wait for version 3.6
> 
> Good find! We need the code in the mapper to work the way it does right now to
> reflect configuration refreshes in the task editor. For product, milestone etc.
> could we do a check if the current value is part of the options coming from the
> repository and add it from the attribute if not? That way we could still
> display current configuration options but would not have the problem that newer
> values show blank.
> 

This patch fix this. Can we do this  for 3.5 because we have only have P3 for this?
Comment 22 Frank Becker CLA 2011-02-25 16:31:24 EST
Created attachment 189858 [details]
mylyn/context/zip
Comment 23 Steffen Pingel CLA 2011-02-26 03:35:01 EST
(In reply to comment #21)
> This patch fix this. Can we do this  for 3.5 because we have only have P3 for
> this?

Yes, that's fine. We'll freeze end of next week but it's okay to make this change now. Thanks for asking.

Change looks good to me. Can you add a comment why the value gets added if it's not in the options?
Comment 24 Frank Becker CLA 2011-02-27 14:17:26 EST
Patch V6 is now in HEAD with the requested comment.

So I close this bug.

I open bug# 338347 for some improvements.
Comment 25 Frank Becker CLA 2011-02-27 14:17:30 EST
Created attachment 189899 [details]
mylyn/context/zip
Comment 26 Steffen Pingel CLA 2011-02-27 15:27:08 EST
Did the changes from V4 get reverted? That would be important. We can address the configuration update in a standard way through the framework for 3.6 but I would prefer to leave the current behavior for 3.5.
Comment 27 Frank Becker CLA 2011-02-27 15:44:27 EST
(In reply to comment #26)
> Did the changes from V4 get reverted? That would be important. We can address
> the configuration update in a standard way through the framework for 3.6 but I
> would prefer to leave the current behavior for 3.5.

No I did not revert the changes. 
The update of the configuration is disabled. When you want it to be active then we must remove the comments in line 507 - 511 in file BugzillaTaskDataHandler.

Should I do this?

Actual the missing options get added twice.
1) in BugzillaTaskDataHandler.initializeTaskData
2) in BugzillaAttributeMapper.getOptions
Comment 28 Steffen Pingel CLA 2011-02-27 15:49:54 EST
(In reply to comment #27)
> No I did not revert the changes.
> The update of the configuration is disabled. When you want it to be active then
> we must remove the comments in line 507 - 511 in file BugzillaTaskDataHandler.

I would like to have the job entirely removed from the Bugzilla connector. It should not reference TaskJob.

> Actual the missing options get added twice.
> 1) in BugzillaTaskDataHandler.initializeTaskData
> 2) in BugzillaAttributeMapper.getOptions

That seems fine.
Comment 29 Steffen Pingel CLA 2011-03-01 00:05:18 EST
This seems to have introduced a regression: If I create a new task the "" empty value is part of the choices for components on Eclipse.org.
Comment 30 Frank Becker CLA 2011-03-02 14:28:42 EST
Created attachment 190190 [details]
patch V7

committed patch.

This is not a regression. The problem was that in some case the initData only contain a product from an other repository.
Comment 31 Frank Becker CLA 2011-03-02 14:28:45 EST
Created attachment 190192 [details]
mylyn/context/zip
Comment 32 Frank Becker CLA 2011-03-02 14:31:21 EST
resolved!

If the component is null we set product and component from the configuration
Comment 33 Steffen Pingel CLA 2011-03-03 18:17:50 EST
Noticed another problem: When creating subtasks the component field is blank. Frank, could look into that and add a test case?
Comment 34 Frank Becker CLA 2011-03-04 17:01:54 EST
(In reply to comment #33)
> Noticed another problem: When creating subtasks the component field is blank.
> Frank, could look into that and add a test case?

Steffen, sorry I can not reproduce this. The only way that I see to get this is with a parent task which has an not valid component.

Can you give me some more details?

I changed the way when component was null but this can not fix your problem.
Comment 35 Frank Becker CLA 2011-03-04 17:02:44 EST
Created attachment 190452 [details]
mylyn/context/zip
Comment 36 Steffen Pingel CLA 2011-03-05 02:51:24 EST
Thanks. I can not reproduce this any longer. Something must have fixed it.