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

Bug 247220

Summary: validating server version did not work
Product: z_Archived Reporter: Frank Becker <eclipse>
Component: MylynAssignee: Frank Becker <eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: robert.elves, steffen.pingel
Version: dev   
Target Milestone: 3.1   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 246260    
Attachments:
Description Flags
patch
none
mylyn/context/zip
none
new patch
none
mylyn/context/zip
none
correction for new patch
none
mylyn/context/zip
none
new patch
none
mylyn/context/zip
none
patch with changed UI
none
mylyn/context/zip
none
Updated patch. none

Description Frank Becker CLA 2008-09-13 14:24:31 EDT
BugzillaValidator.validate did not set the version when RepositoryConfiguration is null
Comment 1 Frank Becker CLA 2008-09-13 14:28:16 EDT
Created attachment 112499 [details]
patch
Comment 2 Frank Becker CLA 2008-09-13 14:28:19 EDT
Created attachment 112500 [details]
mylyn/context/zip
Comment 3 Robert Elves CLA 2008-10-07 03:37:33 EDT
Had a quick look Frank.  I think we should probably just throw a new core exception here so that the error gets displayed just like all others within the title area of the dialog.  Sound right?
Comment 4 Steffen Pingel CLA 2008-10-07 13:21:32 EDT
Generally, is it necessary to store the version in the repository settings? If it is available from the configuration is seems that the client could get it whenever needed. Would it make sense to add an "Auto" setting so the user would not have to worry and validation would not have to download the entire configuration?
Comment 5 Robert Elves CLA 2008-10-08 17:13:14 EDT
(In reply to comment #4)
> Generally, is it necessary to store the version in the repository settings? If
> it is available from the configuration is seems that the client could get it
> whenever needed. Would it make sense to add an "Auto" setting so the user would
> not have to worry and validation would not have to download the entire
> configuration?

Makes sense to me, this should be feasible now.
Comment 6 Frank Becker CLA 2008-10-25 17:04:32 EDT
Created attachment 116139 [details]
new patch

BugzillaClientFactory.createClient did not set the configuration.
Comment 7 Frank Becker CLA 2008-10-25 17:04:35 EDT
Created attachment 116140 [details]
mylyn/context/zip
Comment 8 Frank Becker CLA 2008-10-25 22:55:05 EDT
Created attachment 116142 [details]
correction for new patch

Sorry if the version is set to "Automatic (use Validate Settings)"we can not use the cached configuration

(In reply to comment #5)
> (In reply to comment #4)
> > Generally, is it necessary to store the version in the repository settings? If
> > it is available from the configuration is seems that the client could get it
> > whenever needed. Would it make sense to add an "Auto" setting so the user would
> > not have to worry and validation would not have to download the entire
> > configuration?
> 
> Makes sense to me, this should be feasible now.
> 

This is allready implemented but did not work because the repositoryconfiguration is null so the version did not get set.
Comment 9 Frank Becker CLA 2008-10-25 22:55:08 EDT
Created attachment 116143 [details]
mylyn/context/zip
Comment 10 Robert Elves CLA 2008-10-31 00:31:56 EDT
I see what you mean Frank, but I think Steffen was getting at a deaper issue here - that we in fact don't need to retrieve the configuration at all to validate. 
Unless there is a good use case I'm unaware of, I propose we eliminate the option to set the repository version (we can just put a lable somewhere, maybe message area, indicating the range of Bugzilla versions supported).  Since, at a later stage, the configuraiton will be retrieved anyway and will contain the server version, we can always retrieve it then.

Does this ring true to you Frank?

Steffen, do you have any reservations about removing this from the ui completely?
Comment 11 Steffen Pingel CLA 2008-10-31 01:21:04 EDT
+1 for removing the version from the page if not needed
Comment 12 Frank Becker CLA 2008-11-01 12:59:26 EDT
Created attachment 116695 [details]
new patch

(In reply to comment #10)
> I see what you mean Frank, but I think Steffen was getting at a deaper issue
> here - that we in fact don't need to retrieve the configuration at all to
> validate. 
The new patch only reads the configuration if the version was set to Automatic in the UI.
> Unless there is a good use case I'm unaware of, I propose we eliminate the
> option to set the repository version (we can just put a lable somewhere, maybe
> message area, indicating the range of Bugzilla versions supported).  Since, at
> a later stage, the configuraiton will be retrieved anyway and will contain the
> server version, we can always retrieve it then.
> 
> Does this ring true to you Frank?
> 
> Steffen, do you have any reservations about removing this from the ui
> completely?
> 

There is only one disadvantage with this. You can no longer fake the UI if you did not have installed the right version of bugzilla (see bug#197539). Instead I can change RepositoryConfiguration.getInstallVersion() to get the same result.
Comment 13 Frank Becker CLA 2008-11-01 12:59:32 EDT
Created attachment 116696 [details]
mylyn/context/zip
Comment 14 Robert Elves CLA 2008-11-09 14:10:49 EST
Looks like the only two instances of the version being used are for adding operations and adding line wrapping.  In both cases if null, we just default to 2.18.  So lets just proceed with eliminating this from the configuration ui and from the validation mechanism. Its true that you will not be able to fake out the client but there doesn't seem to be much value in that. So unless I'm missing something Frank, just go ahead eliminate it.
Comment 15 Frank Becker CLA 2008-11-10 16:43:51 EST
Created attachment 117486 [details]
patch with changed UI

Version is now longer part of BugzillaRepositorySettingsPage.

requested from comment#14.
Comment 16 Frank Becker CLA 2008-11-10 16:44:03 EST
Created attachment 117487 [details]
mylyn/context/zip
Comment 17 Robert Elves CLA 2008-11-13 00:24:04 EST
Created attachment 117732 [details]
Updated patch.

Moved label to header.
Comment 18 Robert Elves CLA 2008-11-13 00:25:06 EST
Patch applied, ip log updated.