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

Modify default configuration file to prevent fails during LPVS service start #207

Merged
merged 2 commits into from
Sep 8, 2023

Conversation

m-rudyk
Copy link
Collaborator

@m-rudyk m-rudyk commented Sep 8, 2023

Description

Changed default configuration in application properties to prevent issues with Default launch:

  • added table properties configuration;
  • added default token (requred change in order to operate with real repo);

Fixes # (207)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code cleanup/refactoring
  • Documentation update
  • This change requires a documentation update
  • CI system update
  • Test Coverage update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. Below is just an example and you can delete it when you contribute.

Test Configuration:

  • Java: v11
  • LPVS Release: v1.x.x

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Comment on lines 45 to 50
# Custom DB components name configuration
app.table.detectedLicenseName=detected_license
app.table.detectedLicenseSchema=soshub
app.table.diffFileName=code_licenses
app.table.pullRequestsName=lpvs_pull_requests
app.table.queueName=queue
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we need these properties for the issue #206 fix?

Copy link
Collaborator

@o-kopysov o-kopysov left a comment

Choose a reason for hiding this comment

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

Please check my comments

@m-rudyk m-rudyk force-pushed the m.rudyk/fix_configuration_issues branch 2 times, most recently from 9bf7806 to 58a1e13 Compare September 8, 2023 10:44
@m-rudyk m-rudyk force-pushed the m.rudyk/fix_configuration_issues branch from 58a1e13 to 7b75226 Compare September 8, 2023 10:48
@m-rudyk
Copy link
Collaborator Author

m-rudyk commented Sep 8, 2023

Please check my comments
after conversation, I've put additional verification on application property set. Overall, Spring application failed to load due to absence of token.
Table configuration is set to prevent another failure when injecting app property

@m-rudyk m-rudyk self-assigned this Sep 8, 2023
@m-rudyk m-rudyk added the bug Something isn't working label Sep 8, 2023
@m-rudyk m-rudyk marked this pull request as ready for review September 8, 2023 10:52
@m-rudyk m-rudyk requested a review from o-kopysov September 8, 2023 11:00
Copy link
Collaborator

@o-kopysov o-kopysov left a comment

Choose a reason for hiding this comment

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

I have no issues with LPVS run.

$ java -jar lpvs-*.jar

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::               (v2.7.10)

2023-09-08 14:05:28.682  INFO 24816 --- [           main] com.lpvs.LicensePreValidationSystem      : Starting LicensePreValidationSystem v1.1.0 using Java 11.0.6 on o-kopysov05 with PID 24816 (D:\Git\GitHub\LPVS-Github\LPVS\target\lpvs-1.1.0.jar started by o.kopysov in D:\Git\GitHub\LPVS-Github\LPVS\target)
2023-09-08 14:05:28.688  INFO 24816 --- [           main] com.lpvs.LicensePreValidationSystem      : No active profile set, falling back to 1 default profile: "default"
2023-09-08 14:05:30.021  INFO 24816 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2023-09-08 14:05:30.247  INFO 24816 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 191 ms. Found 5 JPA repository interfaces.
2023-09-08 14:05:34.881  INFO 24816 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 7896 (http)
2023-09-08 14:05:34.914  INFO 24816 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2023-09-08 14:05:34.915  INFO 24816 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.73]
2023-09-08 14:05:35.144  INFO 24816 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2023-09-08 14:05:35.144  INFO 24816 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 6340 ms
2023-09-08 14:05:35.683  INFO 24816 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [name: default]
2023-09-08 14:05:35.855  INFO 24816 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate ORM core version 5.6.15.Final
2023-09-08 14:05:36.367  INFO 24816 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2023-09-08 14:05:36.708  INFO 24816 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2023-09-08 14:05:37.871  INFO 24816 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2023-09-08 14:05:37.933  INFO 24816 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MySQL8Dialect
2023-09-08 14:05:40.230  INFO 24816 --- [           main] o.h.e.t.j.p.i.JtaPlatformInitiator       : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2023-09-08 14:05:40.255  INFO 24816 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2023-09-08 14:05:41.605  INFO 24816 --- [           main] com.lpvs.service.LPVSLicenseService      : LICENSES: loaded 5 licenses from DB.
2023-09-08 14:05:41.645  INFO 24816 --- [           main] com.lpvs.service.LPVSLicenseService      : LICENSE CONFLICTS: loaded 3 license conflicts from DB.
2023-09-08 14:05:41.649  INFO 24816 --- [           main] com.lpvs.service.LPVSDetectService       : License detection scanner: scanoss
2023-09-08 14:05:42.829  INFO 24816 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 7896 (http) with context path ''
2023-09-08 14:05:42.852  INFO 24816 --- [           main] com.lpvs.LicensePreValidationSystem      : Started LicensePreValidationSystem in 15.027 seconds (JVM running for 16.173)

@o-kopysov o-kopysov linked an issue Sep 8, 2023 that may be closed by this pull request
Copy link
Collaborator

@o-kopysov o-kopysov left a comment

Choose a reason for hiding this comment

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

LGTM

@o-kopysov o-kopysov requested a review from tiokim September 8, 2023 13:05
Copy link
Member

@tiokim tiokim left a comment

Choose a reason for hiding this comment

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

LGTM!

@o-kopysov o-kopysov merged commit c67c4bf into Samsung:main Sep 8, 2023
5 checks passed
@m-rudyk m-rudyk deleted the m.rudyk/fix_configuration_issues branch February 13, 2024 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"ApplicationContext" Injection Failure in GitHubWebhooksController
3 participants