oracle / opengrok

OpenGrok is a fast and usable source code search and cross reference engine, written in Java
http://oracle.github.io/opengrok/
Other
4.35k stars 744 forks source link

Not displaying history at folder layer for some projects #4437

Closed simranjeetc closed 11 months ago

simranjeetc commented 11 months ago

Describe the bug Clicking on the folder history link throws an error for some repositories

Please refer to the folder structure in the below screenshot

Folder structure

folder-structure-screenshot

Error

image

Expected behavior

Clicking on folder history link of the highlighted repo should display the history even in the nested folder

Additional context Below are the logs

17-Oct-2023 08:57:01.929 FINER [http-nio-8080-exec-8] org.opengrok.indexer.authorization.AuthorizationStack.isAllowed Authorization for "Verity" in "default stack" [required]
17-Oct-2023 08:57:01.929 FINER [http-nio-8080-exec-8] org.opengrok.indexer.authorization.AuthorizationStack.isAllowed Authorization for "Verity" in "default stack" [required] => true
17-Oct-2023 08:57:01.938 FINEST [http-nio-8080-exec-8] org.opengrok.indexer.history.HistoryGuru.getHistoryFromRepository '/opengrok/src/Verity/collection-center' in null is not eligible for history
17-Oct-2023 08:57:01.939 FINE [http-nio-8080-exec-8] org.apache.catalina.core.StandardHostValve.custom Processing ErrorPage[errorCode=404, location=/enoent]
17-Oct-2023 08:57:01.940 FINER [http-nio-8080-exec-8] org.opengrok.indexer.authorization.AuthorizationStack.isAllowed Authorization for "1_verity" in "default stack"

Using the below mentioned docker-compose file to deploy the opengrok image


version: "3"

# More info at https://github.com/oracle/opengrok/docker/
services:
  opengrok-fas:
    container_name: opengrok-fas
    image: opengrok/docker:1.7.11
    restart: always
    volumes:
      - 'opengrok_data_fasa101023:/opengrok/data'
      - '/code/opengrok/src/fas/:/opengrok/src/'  # source code
      - '/code/opengrok/src/ABCCode/:/opengrok/src/ABCCode/' 
      - './etc_fas/:/opengrok/etc/'  # folder contains configuration.xml
      - './conf/:/usr/local/tomcat/conf'
    ports:
      - "9090:8080/tcp"
      - "5001:5000/tcp"
    environment:
      SYNC_PERIOD_MINUTES: '360'
      OPENGROK_LOG_LEVEL: 'INFO'
      NOMIRROR: 'true'
      INDEXER_OPT: '-H -S -R /opengrok/etc/read_only.xml'
    # Volumes store your data between container upgrades
volumes:
  opengrok_data_fasa101023:
networks:
  opengrok-fas:
~                                                                                                                                                                                                           
~                                                                                                                                                                                                           
~                                   
vladak commented 11 months ago

The log message getHistoryFromRepository '/opengrok/src/Verity/collection-center' in null is not eligible for history is the key. The null means that no repository was found for the path. This means when the project was added, the repository scan did not discover the repository for some reason.