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

Merge to main close #190: add checking duplicate api to frontend #192

Merged
merged 9 commits into from
Dec 15, 2022

Conversation

MCatherine1994
Copy link
Contributor

@MCatherine1994 MCatherine1994 commented Dec 14, 2022


Thanks for the PR!

Any successful deployments (not always required) will be available below.
Backend available
Frontend available

Once merged, code will be promoted and handed off to following workflow run.
Main Merge Workflow

@DerekRoberts DerekRoberts reopened this Dec 14, 2022
Copy link
Member

@DerekRoberts DerekRoberts left a comment

Choose a reason for hiding this comment

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

Do resource allocations have to go up that much? Otherwise looks good. :)

@MCatherine1994 MCatherine1994 changed the title Merge to main #190: add checking duplicate api to frontend Merge to main close #190: add checking duplicate api to frontend Dec 14, 2022
@sonarcloud
Copy link

sonarcloud bot commented Dec 15, 2022

[nr-forest-client-backend] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sonarcloud
Copy link

sonarcloud bot commented Dec 15, 2022

[forest-client-frontend] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

No Coverage information No Coverage information
2.9% 2.9% Duplication

@MCatherine1994 MCatherine1994 merged commit f50c423 into main Dec 15, 2022
@MCatherine1994 MCatherine1994 deleted the FSADT1-480-duplicate-api branch December 15, 2022 00:40
paulushcgcj pushed a commit that referenced this pull request Dec 15, 2022
* feat/frontend: added check duplicate api to frontend, refs: #190

* feat/frontend: reinstalled node packages, refs: #190

* feat/pipeline: adjust memory request for deployment yaml file

* feat/frontend: added example for generate form based on json schema, refs: #50

* Exclude example dir from SonarCloud

* Comment out placeholder file

Co-authored-by: Derek Roberts <derek.roberts@gmail.com>
mamartinezmejia added a commit that referenced this pull request Jan 6, 2023
* chore: updating pom

updating pom file to add build and properties

* chore: adding commons-lang3

adding apache commons lang 3 as a dependency

* chore: code cleanup

refactoring a small portion of the code to:

- comply with checkstyle guideline
- use records when possible
- removed interfaces for services

* chore: removing dependencies

removed a few dependencies as they are not required:

- jakarta.inject-api
- commons-collections
- jettison
- spring-context-indexer

Fix #188

* chore: removing component from entity

Entity classes are supposed to be session-bounded. By annotating a class with @component you're flagging it for spring to instantiate it as a managed bean, keeping it as a singleton.

As an entity is supposed to be just a data holder for the database, it makes no sense to use it as a component.

The scope controls the component scope or in simple words, marks how spring will control this singleton lifecycle. You can set a scope per user session (meaning that a bean will exist for each user session) or more global.

Fix #188

* chore: removing ScopeConstant.java

Fix #188

* chore: removing component from entity

Entity classes are supposed to be session-bounded. By annotating a class with @component you're flagging it for spring to instantiate it as a managed bean, keeping it as a singleton.

As an entity is supposed to be just a data holder for the database, it makes no sense to use it as a component.

The scope controls the component scope or in simple words, marks how spring will control this singleton lifecycle. You can set a scope per user session (meaning that a bean will exist for each user session) or more global.

Fix #188

* chore: removing ScopeConstant.java

Fix #188

* chore: adding lombok and refactoring

adding lombok as a dependency and refactoring the code to make use of it. Lombok reduces the boilerplate code by annotating classes that will generate the actual content during build time.

removed `Serializable` interface from entities. Even being a best practice to mark entities as serializable, you only need to mark it if you need to transfer them over-the-wire (serialize them to some other representation), store them in http session (which is in turn serialized to hard disk by the servlet container), or even persist it as a binary content.
as stated on JPA specification:
    If an entity instance is to be passed by value as a detached object (e.g., through a remote interface), the entity class must implement the Serializable interface.

in our case, hibernate will pass it as a reference, and update the fields on the database even if we do not set it as `Serializable`

Fix #188

* Frontend(deps-dev): Bump @types/node in /frontend (#191)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.11.12 to 18.11.15.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Derek Roberts <derek.roberts@gmail.com>
Co-authored-by: MCatherine <Mcatherine1994@gmail.com>

* Frontend(deps-dev): Bump @typescript-eslint/eslint-plugin in /frontend (#186)

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.46.0 to 5.46.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.46.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Merge to main close #190: add checking duplicate api to frontend (#192)

* feat/frontend: added check duplicate api to frontend, refs: #190

* feat/frontend: reinstalled node packages, refs: #190

* feat/pipeline: adjust memory request for deployment yaml file

* feat/frontend: added example for generate form based on json schema, refs: #50

* Exclude example dir from SonarCloud

* Comment out placeholder file

Co-authored-by: Derek Roberts <derek.roberts@gmail.com>

* chore: code cleanup

refactoring a small portion of the code to:

- comply with checkstyle guideline
- use records when possible
- removed interfaces for services

* chore: removing dependencies

removed a few dependencies as they are not required:

- jakarta.inject-api
- commons-collections
- jettison
- spring-context-indexer

Fix #188

* chore: adding lombok and refactoring

adding lombok as a dependency and refactoring the code to make use of it. Lombok reduces the boilerplate code by annotating classes that will generate the actual content during build time.

removed `Serializable` interface from entities. Even being a best practice to mark entities as serializable, you only need to mark it if you need to transfer them over-the-wire (serialize them to some other representation), store them in http session (which is in turn serialized to hard disk by the servlet container), or even persist it as a binary content.
as stated on JPA specification:
    If an entity instance is to be passed by value as a detached object (e.g., through a remote interface), the entity class must implement the Serializable interface.

in our case, hibernate will pass it as a reference, and update the fields on the database even if we do not set it as `Serializable`

Fix #188

* chore: adding lombok and refactoring

adding lombok as a dependency and refactoring the code to make use of it. Lombok reduces the boilerplate code by annotating classes that will generate the actual content during build time.

removed `Serializable` interface from entities. Even being a best practice to mark entities as serializable, you only need to mark it if you need to transfer them over-the-wire (serialize them to some other representation), store them in http session (which is in turn serialized to hard disk by the servlet container), or even persist it as a binary content.
as stated on JPA specification:
    If an entity instance is to be passed by value as a detached object (e.g., through a remote interface), the entity class must implement the Serializable interface.

in our case, hibernate will pass it as a reference, and update the fields on the database even if we do not set it as `Serializable`

Fix #188

* chore: removing mapping

Fix #188

* chore: code cleanup

* chore: updating gititnore

* chore: cleaning up repository

* chore: cleaning up repository

* chore: updating gitignore

* chore: updating dependencies and cleanup

removing SwaggerConfiguration.java as it is not required anymore.

updating OraclePersistenceConfiguration and PostgresPersistenceConfiguration for better maintainability.

moved configurations to reside inside YML file and reused properties file for build purpose.

added documentation folder with initial compose file.

* ci: updating workflow and labels

* ci: adding codechange detection

* ci: fixing ci for frontend

* ci: limiting ci per folder

* ci: removing changes

* ci: adding backend ci

* chore: moving packages out of core

we will be reworking the folder/package structure

* feat: added functional routes

added base classes and code for functional routing. this will be the skeleton/starting point for the functional routing

* chore: removing old common service package

removed old code to give some space for the new implementation

* feat: adding common service functional api

- added the functional api endpoint for the common service.
- moved the old dto classes to new record dto.
- added new dto to align with api specification.
- added new exceptions to handle error cases
- moved service to use mono and webclient

* ci: fixing backend ci

* ci: changing mvn wrapper exec mode

* ci: updating ci configuration

* ci(docker): updating dockerfile

* ci(docker): updating dockerfile

* feat!: removing oracle data.

oracle data will be moved to nr-forest-client-api.

* chore: commenting out class for now

those classes will be reworked on next feat branches

* feat: reworking commons host email

- reworked the code to include error handling from ches.
- added exception classes
- added support for testcontainers (for future tests)
- added tests for common host email endpoint

* chore: updating yml configurations

* test: adding more test cases

* ci: updating backend ci

* feat: updating functional routing

- updated functional routing to enable other routes
- moved parameters away from abstract router
- updated ches route

* chore: removing old orgbook code

* feat: adding orgbook endpoint

* chore: code cleanup

- removed SwaggerUtils
- updated underlying code to not rely on SwaggerUtils
- updated CoreUtil to be a POJO Singleton

* chore: commenting out postgres code

* feat: updating to boot 3.0.1

* test: adding tests to orgbook endpoint

* chore: updating configuration and npe

- preventing possible npe
- updating coverage

* chore: removing fsa postgres client data

* chore: updating orgbook route swagger

* chore: removing old postgres code

* feat: fsa client implementation from postgres

* feat: moving to r2dbc and flyway

- moving from jpa to r2dbc
- added flyway to manage sql scripts
- added repeatable sql script to test

* test: adding fsa client test

* ci(docker): updating dockerfile

- changed dockerfile to use jre instead of jdk
- removed oracle part of the process
- updated ci to build image before release

* ci(mvnw): updating ci

* ci(mvnw): updating ci

* ci(mvnw): updating ci

* ci(docker): testing out release

* chore: updated path to nrs

- changed groupid to include nrs
- changed yml files to include nrs

* chore: moved webclient to config

- moved webclient instantiation to config class as beans
- changed services to inject webclient

* chore: updated routing

- changed route parent part to the RouteConfiguration class
- updated route classes

note: I choose to move the api to the RouteConfiguration class instead of setting as a basepath on the yml file to allow for paths without the API to exist, specially the actuator paths.

* ci: updating test command parameter

* ci: removing sonar parameter

* ci: changing parameters for sonar

- moving most of the parameters to within pom file

* chore: removing unused constants

* ci: updating deployment

- removed oracle information from deployment
- removed oracle information from workflow
- added common service parameter to yml

* chore: code smell cleanup

* chore: code smell cleanup

* fix: fixing app parameter naming

* chore: changing parameter from URI to String

this is to prevent conversion errors

* ci(openshift): fixing health probe

- fixed the health probe address to be /health
- changed port back to 3000

* ci(openshift): updating health probe

* chore: renaming fsa package to client

* ci: updating deploy action version

* ci: updating deploy health endpoint

* chore: moving date to be a parameter on client

* chore: updating compose file

removing compose file inside docs and updating the one at root

* ci: removing be-tests workflow

* chore: re-adding db init script

* chore: updating client query

* chore: code cleanup

* chore: updating gitignore

* chore: fixing naming convention

* chore: removing old openmaps code

* feat(openmaps): adding openmaps feature

- moved dtos to correct package
- moved service to correct package
- changed service to be reactive
- added a route and handler to expose openmaps
- added configuration to read openmaps props
- added test to openmaps route
- changed coverage to match sonar

* chore: fixing code smell and style

* doc: updating readme file

* chore: fixing naming convention

* fix: fixing rebase issues

* chore: changing dtos to match naming convention

* docs: updating .gitignore

* docs: updating readme

* docs: updating readme

* chore(deps): removing json conflict

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Paulo Gomes da Cruz Junior <pcruz@daitan.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Derek Roberts <derek.roberts@gmail.com>
Co-authored-by: MCatherine <Mcatherine1994@gmail.com>
Co-authored-by: Maria Martinez <77364706+mamartinezmejia@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants