[
https://issues.jboss.org/browse/JBIDE-25905?page=com.atlassian.jira.plugi...
]
Andre Dietisheim commented on JBIDE-25905:
------------------------------------------
I looked into the code. The bug isn't obvious at all, it looks as if it's a
databinding problem.
In the code you'll find the following comment pointing to a workaround that was
implemented
{code:title=DeployImageWizardModel#updateServicePort}
final int pos = this.servicePorts.indexOf(source);
if (pos > -1) {
List<IServicePort> old = new ArrayList<>(this.servicePorts);
this.servicePorts.set(pos, target);
/**
* databinding would not replace old object with a new one if only a
* boolean property is modified. I could not understand why it is
* so, but I found that when target port (String) and route port
* (Boolean) are changed in Edit dialog together, everything works.
*
* @see
https://github.com/jbosstools/jbosstools-openshift/pull/1365
*/
String p = target.getTargetPort();
target.setTargetPort("dummy");
fireIndexedPropertyChange(PROPERTY_SERVICE_PORTS, pos, old,
Collections.unmodifiableList(servicePorts));
if (((ServicePortAdapter) target).isRoutePort()) {
setRoutingPort(target);
} else if (((ServicePortAdapter) source).isRoutePort() &&
!((ServicePortAdapter) target).isRoutePort()) {
setRoutingPort(null);
}
target.setTargetPort(p);
}
{code}
The linked github [
PR|https://github.com/jbosstools/jbosstools-openshift/pull/1365] shows
similar screenshots like the one in this jira.
[Deploy Image to OpenShift ->Service & Routing Settings]
Service Port table awkward behavior after reset
---------------------------------------------------------------------------------------------------------
Key: JBIDE-25905
URL:
https://issues.jboss.org/browse/JBIDE-25905
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: openshift
Affects Versions: 4.5.3.AM3
Reporter: Denis Golovin
Assignee: Andre Dietisheim
Fix For: 4.6.0.AM3
Attachments: service-ports.gif, services-routing-page-no-labels.png,
services-routing-page.png
[Service & Routing Settings] page in [Deploy Image to OpenShift] Wizard.
Service Ports table starts to behave awkward after reset.
steps:
# ASSERT: have a docker image available that exposes several ports (ex.
registry.access.redhat.com/openshift3/ose-haproxy-router:v3.7.14 which exposes 4 ports)
# EXEC: in Docker Explorer: select your docker image and pick "Deploy to
OpenShift..." from the context menu
# ASSERT: "Deploy Image to OpenShift" wizard shows up
# EXEC: get to the "Services & Routing Settings" page
# ASSERT: all ports are listed, a port is checked in column "Used by route"
!services-routing-page.png!
# EXEC: hit "Reset" (and confirm the dialog that asks you if you want to reset
the ports)
# EXEC: click in the column "Used by route" on the 2nd port (or any unchecked
entry)
Result:
Labels for columns "Name", "Service Port", "Pod Port"
disappear
!services-routing-page-no-labels.png!
!service-ports.gif!
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)