Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 486308 - Host name validation detection incorrectly flag as error for reserved route in deployment wizard
Summary: Host name validation detection incorrectly flag as error for reserved route i...
Status: CLOSED FIXED
Alias: None
Product: CFT
Classification: ECD
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal
Target Milestone: ---   Edit
Assignee: Jonathan West CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-21 15:51 EST by Elson Yuen CLA
Modified: 2016-01-25 16:04 EST (History)
1 user (show)

See Also:


Attachments
Patch to ClientRequestFactory (2.89 KB, patch)
2016-01-22 09:58 EST, Jonathan West CLA
no flags Details | Diff
Patch to host taken detection (26.16 KB, patch)
2016-01-22 14:04 EST, Jonathan West CLA
no flags Details | Diff
Patch to host taken detection (30.76 KB, patch)
2016-01-22 15:45 EST, Jonathan West CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Elson Yuen CLA 2016-01-21 15:51:38 EST
In the existing deployment wizard, if the user has a route reserved but not currently used by any application, the host name validation in the deployment wizard page will still flag as error.

This means that if the user deploy an application, remove the application without removing the route and tries to deploy the application again, the user cannot reuse the previous route when deploying the same application.
Comment 1 Jonathan West CLA 2016-01-22 09:58:14 EST
Created attachment 259336 [details]
Patch to ClientRequestFactory
Comment 2 Elson Yuen CLA 2016-01-22 10:21:25 EST
Jonathan, is there any noticeable difference in performance with this change?
Comment 3 Jonathan West CLA 2016-01-22 14:04:32 EST
Created attachment 259339 [details]
Patch to host taken detection
Comment 4 Jonathan West CLA 2016-01-22 14:08:23 EST
I found an issue with the original design of host taken detection, which required me to update my patch. The existing design would delete an existing reserved route (one not reserved by the wizard) if the user entered that route and clicked Validate in the wizard. The wizard should never delete existing routes that it did not reserve.

The host taken detection API will now communicate back to calling methods whether or not the route was created (a route does not need to be created if it already exists).

RE: performance, I have not noticed any performance difference here: Retrieving routes through the Java client is fairly quick. This patch may in fact save a bit of time as we will not incur a performance delay for the subsequent 'addRoute' and 'deleteRoute' operations that would normally occur here.
Comment 5 Elson Yuen CLA 2016-01-22 15:09:48 EST
Changes looks good to me with some minor comments:
1. typo on method comment of UniqueSubdomain: "getUniqueSubdomai(..." should be "getUniqueSubdomain(..."
2. The new class ValidationResult is not part of the patch.
3. Consider to rename ValidationResult to something for narrow, e.g. HostnameValidationResult since with the method isRouteCreated() as part of the methods, this class most likely cannot be used as a general validation result class. Rename will clarify the usage and scope of that class.
4. Thanks for the assessment on the performance impact. Good to hear that.
Comment 6 Jonathan West CLA 2016-01-22 15:45:38 EST
Created attachment 259340 [details]
Patch to host taken detection