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-74827 For site role, it should be added into index field "groupRoleId" so that it can match with search query. #342

Closed
wants to merge 83 commits into from

Conversation

matethurzo
Copy link

@matethurzo matethurzo commented Oct 10, 2017

hey André,

the change seems okay from my perspective but you might need to take a look on it too. Also I think @topolik might be interested too.

cc: @yuhai @hhuijser

mbowerman and others added 30 commits October 9, 2017 16:34
…namicQuery with services in different modules
…model bean in the future. This is because of dependencies to the taglib. Once changed in the subrepo, the model bean parameter will be completely removed
brianchandotcom and others added 8 commits October 9, 2017 21:16
…istener would see users with twitter accounts, and trying to connect to twitter which is against the no network access rule in test. This was not a problem before, because scheduler is disabled in portal-impl integration tests, but enabled in modules integration tests. This is caused by 2dcb43a
… is staging groupId, we should save live groupId because local staging site is not real site and we can't assign users to staging Site on UI.
…leId" so that it can match with search query.
@liferay-continuous-integration
Copy link
Collaborator

@liferay-continuous-integration
Copy link
Collaborator

The pull request was closed.

The pull request was closed due to the following branch validation error:

/opt/dev/projects/github/liferay-subrepo-tools/bin/git-lpush -b master -o 9e418395e030757fc80b564bf5726b3cd47f860a -s e0f778de1f4e7e62717868df1adab678d03a6d82 -r liferay-portal -v
master: Verifying.
error: Illegal change to a .gitrepo file.

For more details, click here.

@liferay-continuous-integration
Copy link
Collaborator

Some tests FAILED.

Build Time: 2 minutes 51 seconds 10 ms

Base Branch:

Branch Name: master
Branch GIT ID: 9e418395e030757fc80b564bf5726b3cd47f860a

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.

         [exec]     "repos_url": "https://api.github.com/users/liferay-continuous-integration/repos",
         [exec]     "events_url": "https://api.github.com/users/liferay-continuous-integration/events{/privacy}",
         [exec]     "received_events_url": "https://api.github.com/users/liferay-continuous-integration/received_events",
         [exec]     "type": "User",
         [exec]     "site_admin": false
         [exec]   },
         [exec]   "created_at": "2017-10-10T15:50:46Z",
         [exec]   "updated_at": "2017-10-10T15:50:46Z",
         [exec]   "author_association": "COLLABORATOR",
         [exec]   "body": "<h1>The pull request was closed.</h1><p>The pull request was closed due to the following branch validation error:</p><pre>/opt/dev/projects/github/liferay-subrepo-tools/bin/git-lpush -b master -o 9e418395e030757fc80b564bf5726b3cd47f860a -s e0f778de1f4e7e62717868df1adab678d03a6d82 -r liferay-portal -v\nmaster: Verifying.\nerror: Illegal change to a .gitrepo file.</pre><p><b>For more details, click <a href=\"https://test-1-17.liferay.com//userContent/jobs/test-portal-acceptance-pullrequest(master)/builds/1673/jenkins-report.html\">here</a>.</b></p>"
         [exec] }
         [exec]   0     0    0     0    0   569      0   3531 --:--:-- --:--:-- --:--:--  3531 37  2236   11   246    0   569    555   1285  0:00:04 --:--:--  0:00:04     0127  2236  101  2236    0   569   5047   1284 --:--:-- --:--:-- --:--:--  5911
         [exec]   0     0    0     0    0   569      0   3531 --:--:-- --:--:-- --:--:--  3531 37  2236   11   246    0   569    555   1285  0:00:04 --:--:--  0:00:04     0127  2236  101  2236    0   569   5047   1284 --:--:-- --:--:-- --:--:--  5911
       [delete] Deleting: /opt/dev/projects/github/liferay-jenkins-ee/commands/20171010155045879
       [delete] Deleting: /opt/dev/projects/github/liferay-jenkins-ee/github-data.json
    

    BUILD FAILED
    /opt/dev/projects/github/liferay-jenkins-ee/commands/build-test-portal-acceptance-pullrequest.xml:661: The following error occurred while executing this line:
    /opt/dev/projects/github/liferay-jenkins-ee/commands/build-test-portal-acceptance-pullrequest.xml:1293: The following error occurred while executing this line:
    /opt/dev/projects/github/liferay-jenkins-ee/commands/build-common.xml:6766: The following error occurred while executing this line:
    /opt/dev/projects/github/liferay-jenkins-ee/commands/build-common.xml:584: exec returned: 1

For upstream results, click here.

@yuhai
Copy link

yuhai commented Oct 11, 2017

ci:reopen

@yuhai
Copy link

yuhai commented Oct 11, 2017

ci:retest

@liferay-continuous-integration
Copy link
Collaborator

@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:

@matethurzo


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 re-open this pull by entering the following command as a comment.

ci:reopen

Critical Failure Details:

test-portal-acceptance-pullrequest-batch(master)/source-format-jdk8
Job Results:

0 Tests Passed.
1 Test Failed.

  1. AXIS_VARIABLE=0,label_exp=!master #156947
         [exec] :util:source-formatter:cleanTranspileJS UP-TO-DATE
         [exec] :util:source-formatter:cleanWriteFindBugsProject UP-TO-DATE
         [exec] :util:source-formatter:cleanWriteMavenSettings UP-TO-DATE
         [exec] :util:source-formatter:clean
         [exec] Note: Some input files use or override a deprecated API.
         [exec] Note: Recompile with -Xlint:deprecation for details.
         [exec] Note: Some input files use unchecked or unsafe operations.
         [exec] Note: Recompile with -Xlint:unchecked for details.
         [exec] :util:source-formatter:compileJava
         [exec] :util:source-formatter:buildCSS UP-TO-DATE
         [exec] :util:source-formatter:processResources
         [exec] :util:source-formatter:transpileJS SKIPPED
         [exec] :util:source-formatter:configJSModules SKIPPED
         [exec] :util:source-formatter:copyLibs SKIPPED
         [exec] :util:source-formatter:replaceSoyTranslation UP-TO-DATE
         [exec] :util:source-formatter:wrapSoyAlloyTemplate SKIPPED
         [exec] :util:source-formatter:classes
         [exec] :util:source-formatter:jar
         [exec] :util:source-formatter:deploy
         [exec] :util:source-formatter:deployDependencies UP-TO-DATE
         [exec] 
         [exec] BUILD SUCCESSFUL
         [exec] 
         [exec] Total time: 15.468 secs
         [exec] Gradle build finished at 2017-10-11 07:59:02.556.
         [exec] 
         [echo] Running com.liferay.source.formatter.jar 1.0.475.
    

    format-source:
    [java] Loading file:/opt/dev/projects/github/liferay-portal/portal-impl/classes/system.properties
    [java] SLF4J: Class path contains multiple SLF4J bindings.
    [java] SLF4J: Found binding in [file:/opt/dev/projects/github/liferay-portal/util-slf4j/classes/org/slf4j/impl/StaticLoggerBinder.class]
    [java] SLF4J: Found binding in [jar:file:/opt/dev/projects/github/liferay-portal/lib/development/slf4j-simple.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    [java] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
    [java] SLF4J: Actual binding is of type [com.liferay.util.sl4fj.LiferayLoggerFactory]
    [java] Incorrect order 'macrodef': prepare-test-cluster-properties: ./build-test.xml
    [java] Exception in thread "main" java.lang.Exception: Incorrect order 'macrodef': prepare-test-cluster-properties: ./build-test.xml
    [java]
    [java] at com.liferay.source.formatter.SourceFormatter.format(SourceFormatter.java:338)
    [java] at com.liferay.source.formatter.SourceFormatter.main(SourceFormatter.java:215)

@liferay-continuous-integration
Copy link
Collaborator

Some tests FAILED.

Build Time: 3 hours 40 minutes 8 seconds 732 ms

Base Branch:

Branch Name: master

111 out of 125 jobs PASSED

14 Failed Jobs:

111 Successful Jobs:
For more details click here.

Failures unique to this pull:

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

    111 Jobs Passed.
    14 Jobs Failed.

    Downstream jobs FAILED.
  2. test-portal-acceptance-pullrequest-batch(master)/modules-integration-hypersonic20-jdk8
    Job Results:

    7975 Tests Passed.
    2 Tests Failed.

    1. AXIS_VARIABLE=4,label_exp=!master #174384
      1. DLAppServiceTest$WhenAddingAFileEntry.shouldSucceedWithConcurrentAccess
        java.lang.AssertionError: Only 9 out of 10 threads added successfully expected:<10> but was:<9>
        	at org.junit.Assert.fail(Assert.java:88)
        	at org.junit.Assert.failNotEquals(Assert.java:834)
        	at org.junit.Assert.assertEquals(Assert.java:645)
        	at com.liferay.document.library.service.test.DLAppServiceTest$WhenAddingAFileEntry.shouldSucceedWithConcurrentAccess(DLAppServiceTest.java:360)
        	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:497)
        	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.java:497)
        	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
        	at org.jb...
      2. DLAppServiceTest$WhenAddingAFileEntry.shouldSucceedWithNullBytes
        java.lang.AssertionError: Thread Thread[Thread-137,5,] caught concurrent failure: java.lang.AssertionError: {level=ERROR, loggerName=com.liferay.document.library.service.test.DLAppServiceTest, message=Unable to add file 9
        java.lang.AssertionError: {level=ERROR, loggerName=com.liferay.document.library.service.test.DLAppServiceTest, message=Unable to add file 9
        	at com.liferay.portal.test.rule.LogAssertionAppender.append(LogAssertionAppender.java:61)
        	at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
        	at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
        	at org.apache.log4j.Category.callAppenders(Category.java:206)
        	at org.apache.log4j.Category.forcedLog(Category.java:391)
        	at org.apache.log4j.Category.log(Category.java:856)
        	at com.liferay.portal.log.Log4jLogImpl.error(Log4jLogImpl.java:54)
        	at com.liferay.portal.kernel.log.LogWrapper.error(LogWrapper.java:69)
        	at com.liferay.document.library.service.test.DLAppServiceTest$WhenAddingAFileEntry$AddFileEntryThread.doRun(DLAppServiceTest.java:453)
        	at com.liferay.portal.security.permission.DoAsUserThread.run(DoAsUserThread.java:61)
        Caused by: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.LockAcquisitionException: Could not execute JDBC batch update
        	at com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:264)
        	at com....

Failures in common with acceptance upstream results at c53b79e:
  1. ...

@yuhai
Copy link

yuhai commented Oct 12, 2017

ci:reopen

@yuhai
Copy link

yuhai commented Oct 12, 2017

ci:retest

@liferay-continuous-integration
Copy link
Collaborator

@liferay-continuous-integration
Copy link
Collaborator

Some tests FAILED.

Build Time: 3 hours 26 minutes 15 seconds 627 ms

Base Branch:

Branch Name: master
Branch GIT ID: 153ff7b1a0e0d7e9576693fa8d8cae029ddd91d0

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

Failures unique to this pull:

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

    103 Jobs Passed.
    8 Jobs Failed.

    Downstream jobs FAILED.
  2. test-portal-acceptance-pullrequest-batch(master)/modules-integration-mariadb100-jdk8
    Job Results:

    7975 Tests Passed.
    4 Tests Failed.

    1. AXIS_VARIABLE=0,label_exp=!master #159208
      1. PortalLogAssertorTest.testScanXMLLog
        junit.framework.AssertionFailedError: 
        com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the primary key 36890
        com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the primary key 36890
        	at com.liferay.portal.service.persistence.impl.GroupPersistenceImpl.findByPrimaryKey(GroupPersistenceImpl.java:10924)
        	at com.liferay.portal.service.persistence.impl.GroupPersistenceImpl.findByPrimaryKey(GroupPersistenceImpl.java:10940)
        	at com.liferay.portal.service.impl.GroupLocalServiceImpl.getGroup(GroupLocalServiceImpl.java:1170)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:163)
        	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
        	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
        	at com.liferay.portal.cache.thread.local.ThreadLocalCacheAdvice.invoke(ThreadLocalCacheAdvice.java:67)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
        	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
        	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBea...
    2. AXIS_VARIABLE=12,label_exp=!master #159208
      1. CalendarBookingLocalServiceTest.testInviteUserCalendarWithWorkflowShouldInviteCalendarBookingOnlyAfterApprovedAndPublished
        java.lang.AssertionError: expected:<11> but was:<10>
        	at org.junit.Assert.fail(Assert.java:88)
        	at org.junit.Assert.failNotEquals(Assert.java:834)
        	at org.junit.Assert.assertEquals(Assert.java:645)
        	at org.junit.Assert.assertEquals(Assert.java:631)
        	at com.liferay.calendar.service.test.CalendarBookingLocalServiceTest.assertStatus(CalendarBookingLocalServiceTest.java:2710)
        	at com.liferay.calendar.service.test.CalendarBookingLocalServiceTest.testInviteUserCalendarWithWorkflowShouldInviteCalendarBookingOnlyAfterApprovedAndPublished(CalendarBookingLocalServiceTest.java:1169)
        	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:497)
        	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.GeneratedMethodAccessor2810.invoke(Unknown Source)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Meth...
    3. AXIS_VARIABLE=6,label_exp=!master #159208
      1. PortalLogAssertorTest.testScanXMLLog
        junit.framework.AssertionFailedError: 
        Unable to save metadata for file version 39483
        com.liferay.document.library.kernel.exception.NoSuchFileException: {companyId=20110, repositoryId=39479, fileName=21, version=1.0}
        	at com.liferay.portal.store.file.system.FileSystemStore.getFile(FileSystemStore.java:220)
        	at com.liferay.portal.store.ignore.duplicates.wrapper.internal.IgnoreDuplicatesStore.getFile(IgnoreDuplicatesStore.java:163)
        	at com.liferay.portal.store.safe.file.name.wrapper.internal.SafeFileNameStore.getFile(SafeFileNameStore.java:189)
        	at com.liferay.portlet.documentlibrary.store.DLStoreImpl.getFile(DLStoreImpl.java:269)
        	at com.liferay.document.library.kernel.store.DLStoreUtil.getFile(DLStoreUtil.java:325)
        	at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.getFile(DLFileEntryLocalServiceImpl.java:1184)
        	at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.getFile(DLFileEntryLocalServiceImpl.java:1167)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:163)
        	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
        	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
        	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvic...
    Click here for more failures.
  3. test-portal-acceptance-pullrequest-batch(master)/modules-integration-oracle121-jdk8
    Job Results:

    11 Tests Passed.
    1 Test Failed.

    1. AXIS_VARIABLE=0,label_exp=!master #150912
           [exec] 
           [exec] com.liferay.journal.service.test.JournalArticleExpirationTest > testExpireApprovedArticle PASSED
           [exec] 
           [exec] com.liferay.journal.service.test.JournalArticleExpirationTest > testExpireApprovedArticlePostponeExpiration STARTED
           [exec] 04:53:44,125 INFO  [elasticsearch[Washout][clusterService#updateTask][T#1]][metadata:317] [Washout] [liferay-20110] update_mapping [LiferayDocumentType]
           [exec] 
           [exec] com.liferay.journal.service.test.JournalArticleExpirationTest > testExpireApprovedArticlePostponeExpiration PASSED
           [exec] 
           [exec] com.liferay.journal.service.test.JournalArticleExpirationTest > testExpireDraftArticle STARTED
           [exec] 04:53:44,734 INFO  [elasticsearch[Washout][clusterService#updateTask][T#1]][metadata:317] [Washout] [liferay-20110] update_mapping [LiferayDocumentType]
           [exec] 
           [exec] com.liferay.journal.service.test.JournalArticleExpirationTest > testExpireDraftArticle PASSED
           [exec] 
           [exec] com.liferay.journal.service.test.JournalArticleExpirationTest > testExpireDraftArticlePostponeExpiration STARTED
           [exec] 04:53:45,133 INFO  [elasticsearch[Washout][clusterService#updateTask][T#1]][metadata:317] [Washout] [liferay-20110] update_mapping [LiferayDocumentType]
           [exec] 
           [exec] com.liferay.journal.service.test.JournalArticleExpirationTest > testExpireDraftArticlePostponeExpiration PASSED
           [exec] 04:53:45,483 INFO  [RMI TCP Connection(73)-127.0.0.1][BundleStartStopLogger:38] STOPPED com.liferay.journal.test_1.0.0 [784]
           [echo] The following error occurred while executing this line:
           [echo] /opt/dev/projects/github/liferay-portal/build-test-batch.xml:240: The following error occurred while executing this line:
           [echo] /opt/dev/projects/github/liferay-portal/build-test-batch.xml:1497: The following error occurred while executing this line:
           [echo] /opt/dev/projects/github/liferay-portal/build-common.xml:634: /opt/dev/projects/github/liferay-portal/build-common.xml:636: exec returned: 137
            [get] Getting: http://test-1-13/job/test-portal-acceptance-pullrequest-batch(master)/AXIS_VARIABLE=0,label_exp=!master/150912//consoleText
            [get] To: /opt/dev/projects/github/liferay-portal/20171012045430536.txt
         [delete] Deleting: /opt/dev/projects/github/liferay-portal/20171012045430536.txt
  4. test-portal-acceptance-pullrequest-batch(master)/modules-integration-postgresql94-jdk8
    Job Results:

    7976 Tests Passed.
    3 Tests Failed.

    1. AXIS_VARIABLE=0,label_exp=!master #148341
      1. PortalLogAssertorTest.testScanXMLLog
        junit.framework.AssertionFailedError: 
        com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the primary key 36887
        com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the primary key 36887
        	at com.liferay.portal.service.persistence.impl.GroupPersistenceImpl.findByPrimaryKey(GroupPersistenceImpl.java:10924)
        	at com.liferay.portal.service.persistence.impl.GroupPersistenceImpl.findByPrimaryKey(GroupPersistenceImpl.java:10940)
        	at com.liferay.portal.service.impl.GroupLocalServiceImpl.getGroup(GroupLocalServiceImpl.java:1170)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:163)
        	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
        	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
        	at com.liferay.portal.cache.thread.local.ThreadLocalCacheAdvice.invoke(ThreadLocalCacheAdvice.java:67)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
        	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
        	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBea...
    2. AXIS_VARIABLE=14,label_exp=!master #148341
      1. PortalLogAssertorTest.testScanXMLLog
        junit.framework.AssertionFailedError: 
        com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the primary key 36889
        com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the primary key 36889
        	at com.liferay.portal.service.persistence.impl.GroupPersistenceImpl.findByPrimaryKey(GroupPersistenceImpl.java:10924)
        	at com.liferay.portal.service.persistence.impl.GroupPersistenceImpl.findByPrimaryKey(GroupPersistenceImpl.java:10940)
        	at com.liferay.portal.service.impl.GroupLocalServiceImpl.getGroup(GroupLocalServiceImpl.java:1170)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:163)
        	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
        	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
        	at com.liferay.portal.cache.thread.local.ThreadLocalCacheAdvice.invoke(ThreadLocalCacheAdvice.java:67)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
        	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
        	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBea...
    3. AXIS_VARIABLE=6,label_exp=!master #148341
      1. PortalLogAssertorTest.testScanXMLLog
        junit.framework.AssertionFailedError: 
        Unable to save metadata for file version 39585
        com.liferay.document.library.kernel.exception.NoSuchFileException: {companyId=20110, repositoryId=39581, fileName=21, version=1.0}
        	at com.liferay.portal.store.file.system.FileSystemStore.getFile(FileSystemStore.java:220)
        	at com.liferay.portal.store.ignore.duplicates.wrapper.internal.IgnoreDuplicatesStore.getFile(IgnoreDuplicatesStore.java:163)
        	at com.liferay.portal.store.safe.file.name.wrapper.internal.SafeFileNameStore.getFile(SafeFileNameStore.java:189)
        	at com.liferay.portlet.documentlibrary.store.DLStoreImpl.getFile(DLStoreImpl.java:269)
        	at com.liferay.document.library.kernel.store.DLStoreUtil.getFile(DLStoreUtil.java:325)
        	at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.getFile(DLFileEntryLocalServiceImpl.java:1184)
        	at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.getFile(DLFileEntryLocalServiceImpl.java:1167)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:163)
        	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
        	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
        	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvic...
    Click here for more failures.
  5. test-portal-acceptance-pullrequest-batch(master)/modules-integration-sybase160-jdk8
    Job Results:

    7977 Tests Passed.
    2 Tests Failed.

    1. AXIS_VARIABLE=0,label_exp=!master #172489
      1. PortalLogAssertorTest.testScanXMLLog
        junit.framework.AssertionFailedError: 
        com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the primary key 36884
        com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the primary key 36884
        	at com.liferay.portal.service.persistence.impl.GroupPersistenceImpl.findByPrimaryKey(GroupPersistenceImpl.java:10924)
        	at com.liferay.portal.service.persistence.impl.GroupPersistenceImpl.findByPrimaryKey(GroupPersistenceImpl.java:10940)
        	at com.liferay.portal.service.impl.GroupLocalServiceImpl.getGroup(GroupLocalServiceImpl.java:1170)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:163)
        	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
        	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
        	at com.liferay.portal.cache.thread.local.ThreadLocalCacheAdvice.invoke(ThreadLocalCacheAdvice.java:67)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
        	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
        	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBea...
    2. AXIS_VARIABLE=14,label_exp=!master #172489
      1. PortalLogAssertorTest.testScanXMLLog
        junit.framework.AssertionFailedError: 
        com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the primary key 36884
        com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the primary key 36884
        	at com.liferay.portal.service.persistence.impl.GroupPersistenceImpl.findByPrimaryKey(GroupPersistenceImpl.java:10924)
        	at com.liferay.portal.service.persistence.impl.GroupPersistenceImpl.findByPrimaryKey(GroupPersistenceImpl.java:10940)
        	at com.liferay.portal.service.impl.GroupLocalServiceImpl.getGroup(GroupLocalServiceImpl.java:1170)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:163)
        	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
        	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
        	at com.liferay.portal.cache.thread.local.ThreadLocalCacheAdvice.invoke(ThreadLocalCacheAdvice.java:67)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
        	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
        	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
        	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBea...

@yuhai
Copy link

yuhai commented Oct 16, 2017

Hi @arboliveira

Hope you are well.

Since the issue came from EE customer, do you have a chance to review this?

Regards,
Hai

companyId, className,
ResourceConstants.SCOPE_GROUP_TEMPLATE,
String.valueOf(GroupConstants.DEFAULT_PARENT_GROUP_ID),
viewActionId));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi guys,

I'm not sure this is correct, but I don't know search permission checking.

I think when we index the document, it's fine to add SCOPE_INDIVIDUAL roles. When we change permissions we can reindex just one doc.

But is it fine to index also ResourceConstants.SCOPE_GROUP_TEMPLATE roles? When we change assignment on that scope then we need to reindex everything?!

On the other hand, when you index these wide-in-scope permissions, why don't you add also SCOPE_GROUP and SCOPE_COMPANY roles and move whole permission checking inside search operation?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @topolik

Thanks for your check. Please refer to the below explanation:

1.Why index ResourceConstants.SCOPE_GROUP_TEMPLATE(or ) roles?
In search query, we use ({"terms" : {"groupRoleId" : [ "groupId-roleId"]}), and if the entry is only viewable for siteRole, own siteRole's user also can view the model.

2.Why don't I add also SCOPE_GROUP and SCOPE_COMPANY?
Please refer to https://github.com/yuhai/liferay-portal/blob/master/modules/apps/foundation/portal-search/portal-search/src/main/java/com/liferay/portal/search/internal/SearchPermissionCheckerImpl.java#L415-L427

When compose search query, if regular role owns view permission, the query({"terms" : {"groupRoleId" : [ "groupId-roleId"]}) won't add into query. However, we can't do siteRole (as regular role) in search query because siteRole needs to use with group together.

Please refer to the fix detailed explanation from hhuijser#3030 (comment)

Regards,
Hai

@arboliveira
Copy link
Owner

Just started reviewing :)

:octocat: Sent from GH.

@arboliveira
Copy link
Owner

Reviewed, submitted as brianchandotcom#52535. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet