[jbosstools-issues] [JBoss JIRA] (JBIDE-22362) Server Adapter: Static changes done to nodejs application are not visible

Andre Dietisheim (JIRA) issues at jboss.org
Mon Oct 24 12:47:00 EDT 2016


    [ https://issues.jboss.org/browse/JBIDE-22362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13310981#comment-13310981 ] 

Andre Dietisheim edited comment on JBIDE-22362 at 10/24/16 12:46 PM:
---------------------------------------------------------------------

[~ibuziuk] I noticed one error:

ASSERT: have a nodejs app running in OpenShift and the project imported to the Eclipse workspace
EXEC: Open nodejs in context menu of the "nodejs-example" server adapter Show In > Web Browser
EXEC: Restart nodejs-example in debug mode via context menu of the server adapter "Restart in Debug"
ASSERT: in the "Servers" view: server adapter is decorated stating [Debugging, Synchronized] 
EXEC: modify workspace project "nodejs-ex/views/index.html": change title "<h1>Welcome....</h1>"
EXEC: refresh browser
ASSERT: change is visible in browser
EXEC: pick "Restart" in context menu of the "nodejs-example" server adapter.

Result:
Error pops up "Enabling 'DEV_MODE' for deployment config nodejs-example" has encountered an error
!enabling-dev-mode-has-encountered-an-error.png! 

In Eclipse log there's the following output:
{code}
!ENTRY org.jboss.tools.openshift.core 4 0 2016-10-24 18:03:41.308
!MESSAGE Unable to enable 'DEV_MODE' for deployment config nodejs-example
!STACK 0
com.openshift.restclient.OpenShiftException: Exception trying to PUT https://192.168.121.152:8443/oapi/v1/namespaces/test/deploymentconfigs/nodejs-example response code: 409 Operation cannot be fulfilled on deploymentconfigs "nodejs-example": the object has been modified; please apply your changes to the latest version and try again
	at com.openshift.internal.restclient.okhttp.ResponseCodeInterceptor.createOpenShiftException(ResponseCodeInterceptor.java:114)
	at com.openshift.internal.restclient.okhttp.ResponseCodeInterceptor.intercept(ResponseCodeInterceptor.java:65)
	at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:190)
	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:163)
	at okhttp3.RealCall.execute(RealCall.java:57)
	at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:217)
	at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:194)
	at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:183)
	at com.openshift.internal.restclient.DefaultClient.update(DefaultClient.java:275)
	at org.jboss.tools.openshift.core.connection.Connection.updateResource(Connection.java:451)
	at org.jboss.tools.openshift.core.server.behavior.OpenShiftLaunchController$1.run(OpenShiftLaunchController.java:159)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
{code}

# ASSERT: Server adapter states [Started, Synchronized]
# EXEC: refresh browser

Result:
The website doesnt have the changes any more. Refreshing the project and manually publishing wont help. The changes wont make it to OpenShift any more. The web page reflects the original state.



was (Author: adietish):
[~ibuziuk] I noticed one error:

ASSERT: have a nodejs app running in OpenShift and the project imported to the Eclipse workspace
EXEC: Open nodejs in context menu of the "nodejs-example" server adapter Show In > Web Browser
EXEC: Restart nodejs-example in debug mode via context menu of the server adapter "Restart in Debug"
ASSERT: in the "Servers" view: server adapter is decorated stating [Debugging, Synchronized] 
EXEC: modify workspace project "nodejs-ex/views/index.html": change title "<h1>Welcome....</h1>"
EXEC: refresh browser
ASSERT: change is visible in browser
EXEC: pick "Restart" in context menu of the "nodejs-example" server adapter.

Result:
Error pops up "Enabling 'DEV_MODE' for deployment config nodejs-example" has encountered an error
!enabling-dev-mode-has-encountered-an-error.png! 

In Eclipse log there's the following output:
{code}
!ENTRY org.jboss.tools.openshift.core 4 0 2016-10-24 18:03:41.308
!MESSAGE Unable to enable 'DEV_MODE' for deployment config nodejs-example
!STACK 0
com.openshift.restclient.OpenShiftException: Exception trying to PUT https://192.168.121.152:8443/oapi/v1/namespaces/test/deploymentconfigs/nodejs-example response code: 409 Operation cannot be fulfilled on deploymentconfigs "nodejs-example": the object has been modified; please apply your changes to the latest version and try again
	at com.openshift.internal.restclient.okhttp.ResponseCodeInterceptor.createOpenShiftException(ResponseCodeInterceptor.java:114)
	at com.openshift.internal.restclient.okhttp.ResponseCodeInterceptor.intercept(ResponseCodeInterceptor.java:65)
	at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:190)
	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:163)
	at okhttp3.RealCall.execute(RealCall.java:57)
	at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:217)
	at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:194)
	at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:183)
	at com.openshift.internal.restclient.DefaultClient.update(DefaultClient.java:275)
	at org.jboss.tools.openshift.core.connection.Connection.updateResource(Connection.java:451)
	at org.jboss.tools.openshift.core.server.behavior.OpenShiftLaunchController$1.run(OpenShiftLaunchController.java:159)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
{code}

# ASSERT: Server adapter states [Started, Synchronized]
# EXEC: refresh browser

Result:
The website doesnt have the changes any more


> Server Adapter: Static changes done to nodejs application are not visible
> -------------------------------------------------------------------------
>
>                 Key: JBIDE-22362
>                 URL: https://issues.jboss.org/browse/JBIDE-22362
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: javascript, openshift
>    Affects Versions: 4.4.0.Alpha2
>            Reporter: Marián Labuda
>            Assignee: Ilya Buziuk
>            Priority: Critical
>              Labels: openshift_v3, server_adapter
>             Fix For: 4.4.2.AM3
>
>         Attachments: enabling-dev-mode-has-encountered-an-error.png
>
>
> I am having an OpenShift application based either on nodejs-example or nodejs-mongodb-example template. Once application is up and running I create a new server adapter and perform changes in index.html. These changes are static and should be (?) immediately visible on OpenShift server, but they are not. I have checked whether changes were published, but rsync in console shows expected output also changes done manually on the server side to index.html are not visible in browser (even when cache overwritten is triggered - so there is no caching problem in browser). This seems to be upstream issues, but requires investigating.
> So far I have tried it on CDK OpenShift. It would be nice to test it on other OpenShift instances, also on templates using different base docker image.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)



More information about the jbosstools-issues mailing list