Check the correct operation of the single-scan mode
tdrozdovsky opened this issue · comments
Taras Drozdovskyi commented
Task
Description:
Check the correct operation of the mode and determine the correct answer to the following cases:
- Scan PR with no code in it
- Scan PR with no license issue
Scan PR with no code in it
https://github.sec.samsung.net/SOSHUB/LPVS-test/pull/642
30-04-2024 09:51:45.680 [main] INFO com.lpvs.LicensePreValidationService.logStarting - Starting LicensePreValidationService v1.5.0 using Java 17.0.10 with PID 11127 (/home/virtual-box/projects/LPVS/target/lpvs-1.5.0.jar started by virtual-box in /home/virtual-box/projects/LPVS/target)
30-04-2024 09:51:45.688 [main] INFO com.lpvs.LicensePreValidationService.logStartupProfileInfo - The following 1 profile is active: "singlescan"
30-04-2024 09:51:46.816 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate.registerRepositoriesIn - Bootstrapping Spring Data JPA repositories in DEFAULT mode.
30-04-2024 09:51:46.917 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate.registerRepositoriesIn - Finished Spring Data repository scanning in 91 ms. Found 6 JPA repository interfaces.
30-04-2024 09:51:47.573 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize - Tomcat initialized with port 7869 (http)
30-04-2024 09:51:47.588 [main] INFO org.apache.catalina.core.StandardService.log - Starting service [Tomcat]
30-04-2024 09:51:47.589 [main] INFO org.apache.catalina.core.StandardEngine.log - Starting Servlet engine: [Apache Tomcat/10.1.18]
30-04-2024 09:51:47.611 [main] INFO org.apache.catalina.loader.WebappLoader.log - Unknown class loader [jdk.internal.loader.ClassLoaders$PlatformClassLoader@3247b2d5] of class [class jdk.internal.loader.ClassLoaders$PlatformClassLoader]
30-04-2024 09:51:47.645 [main] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].log - Initializing Spring embedded WebApplicationContext
30-04-2024 09:51:47.647 [main] INFO org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.prepareWebApplicationContext - Root WebApplicationContext: initialization completed in 1839 ms
30-04-2024 09:51:48.139 [main] INFO org.springframework.orm.jpa.persistenceunit.SpringPersistenceUnitInfo.addTransformer - No LoadTimeWeaver setup: ignoring JPA class transformer
30-04-2024 09:51:48.159 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Starting...
30-04-2024 09:51:48.362 [main] INFO com.zaxxer.hikari.pool.HikariPool.checkFailFast - HikariPool-1 - Added connection conn0: url=jdbc:h2:mem:singlescan user=SA
30-04-2024 09:51:48.364 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Start completed.
30-04-2024 09:51:49.382 [main] INFO org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.buildNativeEntityManagerFactory - Initialized JPA EntityManagerFactory for persistence unit 'default'
30-04-2024 09:51:49.765 [main] INFO org.springframework.data.jpa.repository.query.QueryEnhancerFactory.<clinit> - Hibernate is in classpath; If applicable, HQL parser will be used.
30-04-2024 09:51:50.324 [main] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper.logExceptions - Table "license_list" not found (this database is empty); SQL statement:
SELECT * FROM license_list [42104-220]
30-04-2024 09:51:50.330 [main] WARN com.lpvs.service.LPVSLicenseService.init - LICENSES and LICENSE CONFLICTS are not loaded.
30-04-2024 09:51:50.331 [main] ERROR com.lpvs.service.LPVSLicenseService.init - could not prepare statement [Table "license_list" not found (this database is empty); SQL statement:
SELECT * FROM license_list [42104-220]] [SELECT * FROM license_list]; SQL [SELECT * FROM license_list]
30-04-2024 09:51:50.335 [main] INFO com.lpvs.service.scan.LPVSDetectService.<init> - License detection scanner: scanoss
30-04-2024 09:51:50.832 [main] INFO org.springframework.security.web.DefaultSecurityFilterChain.<init> - Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@2091b6b9, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@67091f3b, org.springframework.security.web.context.SecurityContextHolderFilter@3e909075, org.springframework.security.web.header.HeaderWriterFilter@281e2637, org.springframework.web.filter.CorsFilter@66f99dcc, org.springframework.security.web.authentication.logout.LogoutFilter@1bf00a6f, org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestRedirectFilter@374bbe80, org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter@704e27f9, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@7a065f73, org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter@321c6e0c, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@7d97eeb4, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@2728e166, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@1f953288, org.springframework.security.web.access.ExceptionTranslationFilter@4159113f, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@a53f879]
30-04-2024 09:51:51.196 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start - Tomcat started on port 7869 (http) with context path ''
30-04-2024 09:51:51.211 [main] INFO com.lpvs.LicensePreValidationService.logStarted - Started LicensePreValidationService in 5.935 seconds (process running for 8.62)
30-04-2024 09:51:51.260 [main] INFO com.lpvs.service.scan.LPVSDetectService.runOneScan - Triggered single scan operation
30-04-2024 09:51:51.273 [main] INFO com.lpvs.service.LPVSLicenseService.reloadFromTables - LOADED 7 licenses from DB.
30-04-2024 09:51:51.293 [main] INFO com.lpvs.service.LPVSLicenseService.reloadFromTables - LOADED 8 license conflicts from DB.
Warning: No files found to scan in folder: /home/virtual-box/Projects/LPVS-test/70f6214de5bdbda0d6fb85b6c488426f0e14faf4
30-04-2024 09:51:55.560 [main] ERROR com.lpvs.service.scan.scanner.LPVSScanossDetectService.runScan - Scanoss scanner terminated with non-zero code. Terminating.
30-04-2024 09:51:55.561 [main] ERROR com.lpvs.service.scan.scanner.LPVSScanossDetectService.runScan - null
30-04-2024 09:51:55.561 [main] ERROR com.lpvs.service.scan.LPVSDetectService.runOneScan -
Single scan finished with errors
30-04-2024 09:51:55.561 [main] ERROR com.lpvs.service.scan.LPVSDetectService.runOneScan - Can't trigger single scan: Scanoss scanner terminated with non-zero code. Terminating.
30-04-2024 09:51:55.572 [main] INFO org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.destroy - Closing JPA EntityManagerFactory for persistence unit 'default'
30-04-2024 09:51:55.580 [main] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown initiated...
30-04-2024 09:51:55.585 [main] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown completed.
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
Scan PR with no license issue
https://github.sec.samsung.net/SOSHUB/LPVS-test/pull/643
30-04-2024 09:56:46.224 [main] INFO com.lpvs.LicensePreValidationService.logStarting - Starting LicensePreValidationService v1.5.0 using Java 17.0.10 with PID 11211 (/home/virtual-box/projects/LPVS/target/lpvs-1.5.0.jar started by virtual-box in /home/virtual-box/projects/LPVS/target)
30-04-2024 09:56:46.233 [main] INFO com.lpvs.LicensePreValidationService.logStartupProfileInfo - The following 1 profile is active: "singlescan"
30-04-2024 09:56:47.550 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate.registerRepositoriesIn - Bootstrapping Spring Data JPA repositories in DEFAULT mode.
30-04-2024 09:56:47.691 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate.registerRepositoriesIn - Finished Spring Data repository scanning in 129 ms. Found 6 JPA repository interfaces.
30-04-2024 09:56:48.467 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize - Tomcat initialized with port 7869 (http)
30-04-2024 09:56:48.480 [main] INFO org.apache.catalina.core.StandardService.log - Starting service [Tomcat]
30-04-2024 09:56:48.481 [main] INFO org.apache.catalina.core.StandardEngine.log - Starting Servlet engine: [Apache Tomcat/10.1.18]
30-04-2024 09:56:48.520 [main] INFO org.apache.catalina.loader.WebappLoader.log - Unknown class loader [jdk.internal.loader.ClassLoaders$PlatformClassLoader@3247b2d5] of class [class jdk.internal.loader.ClassLoaders$PlatformClassLoader]
30-04-2024 09:56:48.566 [main] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].log - Initializing Spring embedded WebApplicationContext
30-04-2024 09:56:48.568 [main] INFO org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.prepareWebApplicationContext - Root WebApplicationContext: initialization completed in 2141 ms
30-04-2024 09:56:49.158 [main] INFO org.springframework.orm.jpa.persistenceunit.SpringPersistenceUnitInfo.addTransformer - No LoadTimeWeaver setup: ignoring JPA class transformer
30-04-2024 09:56:49.190 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Starting...
30-04-2024 09:56:49.475 [main] INFO com.zaxxer.hikari.pool.HikariPool.checkFailFast - HikariPool-1 - Added connection conn0: url=jdbc:h2:mem:singlescan user=SA
30-04-2024 09:56:49.477 [main] INFO com.zaxxer.hikari.HikariDataSource.getConnection - HikariPool-1 - Start completed.
30-04-2024 09:56:51.048 [main] INFO org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.buildNativeEntityManagerFactory - Initialized JPA EntityManagerFactory for persistence unit 'default'
30-04-2024 09:56:51.639 [main] INFO org.springframework.data.jpa.repository.query.QueryEnhancerFactory.<clinit> - Hibernate is in classpath; If applicable, HQL parser will be used.
30-04-2024 09:56:52.508 [main] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper.logExceptions - Table "license_list" not found (this database is empty); SQL statement:
SELECT * FROM license_list [42104-220]
30-04-2024 09:56:52.519 [main] WARN com.lpvs.service.LPVSLicenseService.init - LICENSES and LICENSE CONFLICTS are not loaded.
30-04-2024 09:56:52.519 [main] ERROR com.lpvs.service.LPVSLicenseService.init - could not prepare statement [Table "license_list" not found (this database is empty); SQL statement:
SELECT * FROM license_list [42104-220]] [SELECT * FROM license_list]; SQL [SELECT * FROM license_list]
30-04-2024 09:56:52.525 [main] INFO com.lpvs.service.scan.LPVSDetectService.<init> - License detection scanner: scanoss
30-04-2024 09:56:53.133 [main] INFO org.springframework.security.web.DefaultSecurityFilterChain.<init> - Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@1f8825a, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@55117fea, org.springframework.security.web.context.SecurityContextHolderFilter@613e05d3, org.springframework.security.web.header.HeaderWriterFilter@3f321f8, org.springframework.web.filter.CorsFilter@486cb71f, org.springframework.security.web.authentication.logout.LogoutFilter@716f968a, org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestRedirectFilter@2fc7698c, org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter@25370af5, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@37a1ac0, org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter@12bcedf8, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@13fd5aaa, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@4d55b63d, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@579347a7, org.springframework.security.web.access.ExceptionTranslationFilter@6c32da37, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@2fa7a848]
30-04-2024 09:56:53.607 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start - Tomcat started on port 7869 (http) with context path ''
30-04-2024 09:56:53.638 [main] INFO com.lpvs.LicensePreValidationService.logStarted - Started LicensePreValidationService in 7.839 seconds (process running for 11.002)
30-04-2024 09:56:53.725 [main] INFO com.lpvs.service.scan.LPVSDetectService.runOneScan - Triggered single scan operation
30-04-2024 09:56:53.748 [main] INFO com.lpvs.service.LPVSLicenseService.reloadFromTables - LOADED 7 licenses from DB.
30-04-2024 09:56:53.784 [main] INFO com.lpvs.service.LPVSLicenseService.reloadFromTables - LOADED 8 license conflicts from DB.
30-04-2024 09:56:59.413 [main] INFO com.lpvs.service.scan.LPVSDetectService.runOneScan -
30-04-2024 09:56:59.414 [main] INFO com.lpvs.service.scan.LPVSDetectService.runOneScan - Single scan completed.
30-04-2024 09:56:59.422 [main] INFO org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.destroy - Closing JPA EntityManagerFactory for persistence unit 'default'
30-04-2024 09:56:59.435 [main] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown initiated...
30-04-2024 09:56:59.438 [main] INFO com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown completed.
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)