Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LPS-83185 Documents breaking change #61395

Closed
wants to merge 3 commits into from

Conversation

jbalsas
Copy link

@jbalsas jbalsas commented Jul 17, 2018

Hey @brianchandotcom!

This change introduces a breaking change as we no longer will escape the portlet description automatically. This was incorrect and causing problems.

I've discussed this with @topolik, who thinks the affected surface is small and with @antonio-ortega who agrees that based on how early in 7.1.x we are it's preferable to break it before we get any clients in. See backport to 7.1.x -> https://github.com/brianchandotcom/liferay-portal-ee/pull/21058

For 7.0.x, we will send a custom backport if necessary, avoiding the breaking change.

Thanks!

… right escaping context. This should be done at the very end of the chain.
… right escaping context. This should be done at the very end of the chain.
@liferay-continuous-integration
Copy link
Collaborator

CI is automatically triggering "ci:test:sf" and "ci:test:relevant" for this pull to run Source Formatter and relevant tests.

Comment "ci:test" to run the full PR Tester for this pull.

@liferay-continuous-integration
Copy link
Collaborator

✔️ ci:test:sf - 1 out of 1 jobs passed in 1 minute 25 seconds 386 ms

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: 4a26debbd31d6f4b2cc4d44c4a0faf52d46377f2

Sender Branch:

Branch Name: LPS-83185
Branch GIT ID: 5761812c5e7b9ade105baff9d650f217421fa511

1 out of 1jobs PASSED
1 Successful Jobs:
For more details click here.

@liferay-continuous-integration
Copy link
Collaborator

❌ ci:test:relevant - 0 out of 1 jobs passed in 28 minutes 49 seconds 828 ms

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: 4a26debbd31d6f4b2cc4d44c4a0faf52d46377f2

Copied in Private Modules Branch:

Branch Name: master-private
Branch GIT ID: 0b8492f1a0afd8fedabea5735e6f7d0a9646c171

0 out of 1 jobs PASSED
For more details click here.

Failures unique to this pull:

  1. test-portal-acceptance-pullrequest(master)
    Job Results:

    0 Jobs Passed.
    1 Job Failed.

    	at net.sf.antcontrib.logic.IfTask$ElseIf.execute(IfTask.java:144)
    	at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:211)
    	at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    	at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154)
    	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    	at org.apache.tools.ant.Task.perform(Task.java:348)
    	at org.apache.tools.ant.Target.execute(Target.java:435)
    	at org.apache.tools.ant.Target.performTasks(Target.java:456)
    	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
    	at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
    	at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
    	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    	at org.apache.tools.ant.Task.perform(Task.java:348)
    	at org.apache.tools.ant.Target.execute(Target.java:435)
    	at org.apache.tools.ant.Target.performTasks(Target.java:456)
    	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    	at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
    	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    	at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    	at org.apache.tools.ant.Main.runBuild(Main.java:851)
    	at org.apache.tools.ant.Main.startAnt(Main.java:235)
    	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
    	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

For upstream results, click here.

@jpince
Copy link
Collaborator

jpince commented Jul 17, 2018

ci:test

@liferay-continuous-integration
Copy link
Collaborator

The pull request tester is still running.

Please wait until you get the final report before running 'ci:retest'.

See this link to check on the status of your test:

@jbalsas


However, the pull request was closed.

The pull request was closed because the following critical batches had failed:

For information as to why we automatically close out certain pull requests see this article.

*This pull will no longer automatically close if this comment is available. If you believe this is a mistake please reopen this pull by entering the following command as a comment.

ci:reopen

Critical Failure Details:

test-portal-acceptance-pullrequest-batch(master)/portal-frontend-js-jdk8
Job Results:

0 Tests Passed.
1 Test Failed.

  1. AXIS_VARIABLE=0,label_exp=!master #237993
         [exec]       604 | 							() => {
         [exec]     > 605 | 								expect(onStateChange).toHaveBeenCalled();
         [exec]           | 								                      ^
         [exec]       606 | 								expect(onStateChange.mock.calls[0][0]).toEqual(eventType);
         [exec]       607 | 
         [exec]       608 | 								hubA.removeEventListener(handle);
         [exec] 
         [exec]       at test/liferay/portlet/events.es.js:605:31
         [exec]       at Timeout.callback [as _onTimeout] (node_modules/jsdom/lib/jsdom/browser/Window.js:628:19)
         [exec] 
         [exec] Test Suites: 1 failed, 8 passed, 9 total
         [exec] Tests:       1 failed, 202 passed, 203 total
         [exec] Snapshots:   0 total
         [exec] Time:        4.617s
         [exec] Ran all test suites.
         [exec] npm ERR! code ELIFECYCLE
         [exec] npm ERR! errno 1
         [exec] npm ERR! frontend-js-web@3.0.0 test: `jest`
         [exec] npm ERR! Exit status 1
         [exec] npm ERR! 
         [exec] npm ERR! Failed at the frontend-js-web@3.0.0 test script.
         [exec] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
         [exec] 
         [exec] npm ERR! A complete log of this run can be found in:
         [exec] npm ERR!     /root/.npm/_logs/2018-07-17T15_13_23_133Z-debug.log
         [exec] 
         [exec] FAILURE: Build failed with an exception.
         [exec] 
         [exec] * What went wrong:
         [exec] Execution failed for task ':apps:frontend-js:frontend-js-web:npmRunTest'.
         [exec] > java.io.IOException: Process '[/opt/dev/projects/github/liferay-portal/build/node/bin/node, /opt/dev/projects/github/liferay-portal/build/node/lib/node_modules/npm/bin/npm-cli.js, run-script, test, --loglevel, warn, --progress, true, --registry, http://mirrors.lax.liferay.com:4873]' finished with non-zero exit value 1
         [exec] 
         [exec] * Try:
         [exec] Run with --info or --debug option to get more log output.
         [exec] 
         [exec] * Exception is:
         [exec] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':apps:frontend-js:frontend-js-web:npmRunTest'.
         [exec] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:84)
         [exec] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:55)
         [exec] 	at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)

@jpince
Copy link
Collaborator

jpince commented Jul 17, 2018

@jbalsas is this a real failure, or a fluke?

     [exec] FAIL test/liferay/portlet/events.es.js
     [exec]   ??? Console
     [exec] 
     [exec]     console.error node_modules/jsdom/lib/jsdom/virtual-console.js:29
     [exec]       Error: Uncaught [Error: expect(jest.fn()).toHaveBeenCalled()
     [exec]       
     [exec]       Expected mock function to have been called, but it was not called.]
     [exec]           at reportException (/opt/dev/projects/github/liferay-portal/modules/apps/frontend-js/frontend-js-web/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:66:24)
     [exec]           at Timeout.callback [as _onTimeout] (/opt/dev/projects/github/liferay-portal/modules/apps/frontend-js/frontend-js-web/node_modules/jsdom/lib/jsdom/browser/Window.js:630:7)
     [exec]           at ontimeout (timers.js:482:11)
     [exec]           at tryOnTimeout (timers.js:317:5)
     [exec]           at Timer.listOnTimeout (timers.js:277:5) { Error: expect(jest.fn()).toHaveBeenCalled()
     [exec]       
     [exec]       Expected mock function to have been called, but it was not called.
     [exec]           at /opt/dev/projects/github/liferay-portal/modules/apps/frontend-js/frontend-js-web/test/liferay/portlet/events.es.js:605:31
     [exec]           at Timeout.callback [as _onTimeout] (/opt/dev/projects/github/liferay-portal/modules/apps/frontend-js/frontend-js-web/node_modules/jsdom/lib/jsdom/browser/Window.js:628:19)
     [exec]           at ontimeout (timers.js:482:11)
     [exec]           at tryOnTimeout (timers.js:317:5)
     [exec]           at Timer.listOnTimeout (timers.js:277:5) matcherResult: { message: [Function], pass: false } }
     [exec] 
     [exec]   ??? PortletHub ??? onStateChange without render data ??? is passed a type parameter with value "portlet.onStateChange"
     [exec] 
     [exec]     expect(jest.fn()).toHaveBeenCalled()
     [exec] 
     [exec]     Expected mock function to have been called, but it was not called.
     [exec] 
     [exec]       603 | 						setTimeout(
     [exec]       604 | 							() => {
     [exec]     > 605 | 								expect(onStateChange).toHaveBeenCalled();
     [exec]           | 								                      ^
     [exec]       606 | 								expect(onStateChange.mock.calls[0][0]).toEqual(eventType);
     [exec]       607 | 
     [exec]       608 | 								hubA.removeEventListener(handle);
     [exec] 
     [exec]       at test/liferay/portlet/events.es.js:605:31
     [exec]       at Timeout.callback [as _onTimeout] (node_modules/jsdom/lib/jsdom/browser/Window.js:628:19)

@jbalsas
Copy link
Author

jbalsas commented Jul 17, 2018

Looks like a fluke, it's working fine locally 😢

We'll take a look at this again asap!

@jbalsas
Copy link
Author

jbalsas commented Jul 17, 2018

ci:reopen

@liferay-continuous-integration
Copy link
Collaborator

❌ ci:test - 149 out of 161 jobs passed in 2 hours 3 minutes 10 seconds 279 ms

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: 4a26debbd31d6f4b2cc4d44c4a0faf52d46377f2

Copied in Private Modules Branch:

Branch Name: master-private
Branch GIT ID: 0b8492f1a0afd8fedabea5735e6f7d0a9646c171

149 out of 161 jobs PASSED

12 Failed Jobs:

149 Successful Jobs:
For more details click here.

Failures unique to this pull:

  1. test-portal-acceptance-pullrequest-batch(master)/portal-frontend-js-jdk8
    Job Results:

    0 Tests Passed.
    1 Test Failed.

    1. AXIS_VARIABLE=0,label_exp=!master #237993
           [exec]       604 | 							() => {
           [exec]     > 605 | 								expect(onStateChange).toHaveBeenCalled();
           [exec]           | 								                      ^
           [exec]       606 | 								expect(onStateChange.mock.calls[0][0]).toEqual(eventType);
           [exec]       607 | 
           [exec]       608 | 								hubA.removeEventListener(handle);
           [exec] 
           [exec]       at test/liferay/portlet/events.es.js:605:31
           [exec]       at Timeout.callback [as _onTimeout] (node_modules/jsdom/lib/jsdom/browser/Window.js:628:19)
           [exec] 
           [exec] Test Suites: 1 failed, 8 passed, 9 total
           [exec] Tests:       1 failed, 202 passed, 203 total
           [exec] Snapshots:   0 total
           [exec] Time:        4.617s
           [exec] Ran all test suites.
           [exec] npm ERR! code ELIFECYCLE
           [exec] npm ERR! errno 1
           [exec] npm ERR! frontend-js-web@3.0.0 test: `jest`
           [exec] npm ERR! Exit status 1
           [exec] npm ERR! 
           [exec] npm ERR! Failed at the frontend-js-web@3.0.0 test script.
           [exec] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
           [exec] 
           [exec] npm ERR! A complete log of this run can be found in:
           [exec] npm ERR!     /root/.npm/_logs/2018-07-17T15_13_23_133Z-debug.log
           [exec] 
           [exec] FAILURE: Build failed with an exception.
           [exec] 
           [exec] * What went wrong:
           [exec] Execution failed for task ':apps:frontend-js:frontend-js-web:npmRunTest'.
           [exec] > java.io.IOException: Process '[/opt/dev/projects/github/liferay-portal/build/node/bin/node, /opt/dev/projects/github/liferay-portal/build/node/lib/node_modules/npm/bin/npm-cli.js, run-script, test, --loglevel, warn, --progress, true, --registry, http://mirrors.lax.liferay.com:4873]' finished with non-zero exit value 1
           [exec] 
           [exec] * Try:
           [exec] Run with --info or --debug option to get more log output.
           [exec] 
           [exec] * Exception is:
           [exec] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':apps:frontend-js:frontend-js-web:npmRunTest'.
           [exec] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:84)
           [exec] 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:55)
           [exec] 	at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)

Failures in common with acceptance upstream results at 4a26deb:
  1. test-portal-acceptance-pullrequest-batch(master)/functional-upgrade-tomcat90-oracle121-jdk8/4
    Job Results:

    0 Tests Passed.
    1 Test Failed.

    1. AXIS_VARIABLE=0,label_exp=!master #157945
           [java] INFO - Completed com.liferay.adaptive.media.document.library.thumbnails.internal.upgrade.v1_0_0.UpgradeDocumentLibraryThumbnailsConfiguration#doUpgrade in 41 ms
           [java] 15:13:17,561 INFO  [main][UpgradeProcess:103] Completed upgrade process com.liferay.adaptive.media.document.library.thumbnails.internal.upgrade.v1_0_0.UpgradeDocumentLibraryThumbnailsConfiguration in 41ms
           [java] INFO - Completed upgrade process com.liferay.adaptive.media.document.library.thumbnails.internal.upgrade.v1_0_0.UpgradeDocumentLibraryThumbnailsConfiguration in 41ms
           [java] 
           [java] Completed Liferay core upgrade and verify processes in 80 seconds
           [java] Checking to see if all upgrades have completed... your upgrades have failed, have not started, or are still running.
           [java] You are connected to Gogo shell.
           [java] 
           [java] Type "help" to get available upgrade and verify commands.
           [java] Type "help {command}" to get additional information about the command. For example, "help upgrade:list".
           [java] Enter "exit" or "quit" to exit.
           [java] g! 
         [delete] Deleting: /opt/dev/projects/github/liferay-portal/jps_output
           [echo] The following error occurred while executing this line:
           [echo] /opt/dev/projects/github/liferay-portal/build-test-batch.xml:340: The following error occurred while executing this line:
           [echo] /opt/dev/projects/github/liferay-portal/build-test-batch.xml:994: /opt/dev/projects/github/liferay-portal/build-test-batch.xml:998: The following error occurred while executing this line:
           [echo] /opt/dev/projects/github/liferay-portal/build-test-tomcat.xml:46: The following error occurred while executing this line:
           [echo] /opt/dev/projects/github/liferay-portal/build-test-tomcat.xml:54: The following error occurred while executing this line:
           [echo] /opt/dev/projects/github/liferay-portal/build-test.xml:9673: The following error occurred while executing this line:
           [echo] /opt/dev/projects/github/liferay-portal/build-test.xml:10328: Timeout: killed the sub-process
           [echo] ${jstack.output}
            [get] Getting: http://test-1-12/job/test-portal-acceptance-pullrequest-batch(master)/AXIS_VARIABLE=0,label_exp=!master/157945//consoleText
            [get] To: /opt/dev/projects/github/liferay-portal/20180717152657319.txt
         [delete] Deleting: /opt/dev/projects/github/liferay-portal/20180717152657319.txt
         [delete] Deleting: /opt/dev/projects/github/liferay-portal/null754408897.properties
  2. test-portal-acceptance-pullrequest-batch(master)/modules-integration-db2105-jdk8
    Job Results:

    9568 Tests Passed.
    2 Tests Failed.

    1. AXIS_VARIABLE=15,label_exp=!master #213942
      1. TokenExpeditionTest.test
        java.lang.IllegalArgumentException: The token service returned 
        	at com.liferay.oauth2.provider.client.test.BaseClientTestCase.parseJSONObject(BaseClientTestCase.java:567)
        	at com.liferay.oauth2.provider.client.test.BaseClientTestCase.parseJsonField(BaseClientTestCase.java:549)
        	at com.liferay.oauth2.provider.client.test.BaseClientTestCase.parseError(BaseClientTestCase.java:545)
        	at com.liferay.oauth2.provider.client.test.TokenExpeditionTest.test(TokenExpeditionTest.java:67)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.java:498)
        	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
        	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
        	at org.jboss.arquillian.junit.Arquillian$8$1.invoke(Arquillian.java:370)
        	at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.jav...
      2. PortalLogAssertorTest.testScanXMLLog
        junit.framework.AssertionFailedError: 
        Remote client 127.0.0.1 - 127.0.0.1 tried to use a nonexistent OAuth 2 client ID 
        	at com.liferay.portal.log.assertor.PortalLogAssertorTest.scanXMLLogFile(PortalLogAssertorTest.java:174)
        	at com.liferay.portal.log.assertor.PortalLogAssertorTest$1.visitFile(PortalLogAssertorTest.java:100)
        	at com.liferay.portal.log.assertor.PortalLogAssertorTest$1.visitFile(PortalLogAssertorTest.java:90)
        	at java.nio.file.Files.walkFileTree(Files.java:2670)
        	at java.nio.file.Files.walkFileTree(Files.java:2742)
        	at com.liferay.portal.log.assertor.PortalLogAssertorTest.testScanXMLLog(PortalLogAssertorTest.java:88)
        
  3. ...

@brianchandotcom
Copy link
Owner

Merged. Thx.

@brianchandotcom
Copy link
Owner

@topolik this might be something you care about

@jbalsas jbalsas deleted the LPS-83185 branch November 17, 2018 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants