-
Notifications
You must be signed in to change notification settings - Fork 37
HCMPRE-2709: Integrate Geopode with Boundary Service #1583
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
base: geopode-adapter-dev
Are you sure you want to change the base?
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughA new Spring Boot microservice called Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant GeopodeApiController
participant GeopodeAdapterService
participant ArcgisUtil
participant BoundaryUtil
participant ServiceRequestRepository
participant ExternalServices
Client->>GeopodeApiController: POST /boundary/setup (GeopodeBoundaryRequest)
GeopodeApiController->>GeopodeAdapterService: createRootBoundaryData(request)
GeopodeAdapterService->>ArcgisUtil: createRoot(request)
ArcgisUtil->>ServiceRequestRepository: fetchMdmsData(request)
ServiceRequestRepository->>ExternalServices: POST MDMS API
ExternalServices-->>ServiceRequestRepository: MDMS Response
ArcgisUtil->>ServiceRequestRepository: fetchArcGisData(countryName)
ServiceRequestRepository->>ExternalServices: GET ArcGIS API
ExternalServices-->>ServiceRequestRepository: ArcGIS Response
ArcgisUtil->>BoundaryUtil: buildBoundaryRequest(...)
ArcgisUtil->>BoundaryUtil: createChildrenAsync(...)
ArcgisUtil-->>GeopodeAdapterService: ResponseEntity<String>
GeopodeAdapterService-->>GeopodeApiController: ResponseEntity<String>
GeopodeApiController-->>Client: HTTP 200/409 Response
Suggested reviewers
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 140
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (61)
health-services/geopode-adapter/README.md(1 hunks)health-services/geopode-adapter/pom.xml(1 hunks)health-services/geopode-adapter/src/main/java/digit/Main.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/config/Configuration.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/config/ServiceConstants.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/kafka/Producer.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/repository/ServiceRequestRepository.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/service/GeopodeAdapterService.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/util/ArcgisUtil.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/util/BoundaryUtil.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/util/ChildBoundaryCreationUtil.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/util/MdmsUtil.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/util/MdmsV2Util.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/controllers/GeopodeApiController.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/Arcgis/ArcgisRequest.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/Arcgis/ArcgisResponse.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/Arcgis/Attributes.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/Arcgis/Feature.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/Arcgis/Field.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/Arcgis/Geometry.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/Arcgis/GeometryProperties.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/Arcgis/SpatialReference.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/Arcgis/UniqueIdField.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/GeopdeHierarchyLevel.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/GeopodeBoundary.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/GeopodeBoundaryRequest.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/Boundary.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryHierarchy.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryHierarchyDefinitionResponse.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryHierarchyDefinitionSearchCriteria.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryHierarchyDefinitionSearchRequest.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryHierarchyDefinitonSearchRequest.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryRelation.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryRelationshipDTO.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryRelationshipRequest.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryRelationshipRequestDTO.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryRelationshipResponse.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryRelationshipSearchCriteria.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryRequest.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryResponse.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundarySearchCriteria.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundarySearchResponse.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryType.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryTypeHierarchy.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryTypeHierarchyDefinition.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryTypeHierarchyRequest.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryTypeHierarchyResponse.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryTypeHierarchySearchCriteria.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryTypeHierarchySearchRequest.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/EnrichedBoundary.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/HierarchyRelation.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/HierarchyType.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/mdmsV2/Mdms.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/mdmsV2/MdmsCriteriaReqV2.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/mdmsV2/MdmsCriteriaV2.java(1 hunks)health-services/geopode-adapter/src/main/java/digit/web/models/mdmsV2/MdmsResponseV2.java(1 hunks)health-services/geopode-adapter/src/main/resources/Dockerfile(1 hunks)health-services/geopode-adapter/src/main/resources/application.properties(1 hunks)health-services/geopode-adapter/src/main/resources/start.sh(1 hunks)health-services/geopode-adapter/src/test/java/digit/TestConfiguration.java(1 hunks)health-services/geopode-adapter/src/test/java/digit/web/controllers/GeopodeApiControllerTest.java(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
health-services/geopode-adapter/src/main/java/digit/config/ServiceConstants.java (1)
Learnt from: Saloni-eGov
PR: egovernments/health-campaign-services#906
File: health-services/plan-service/src/main/java/digit/util/CampaignUtil.java:1-13
Timestamp: 2024-09-26T10:49:23.404Z
Learning: When importing constants from 'digit.config.ServiceConstants', it's acceptable to use static wildcard imports since all constants are static.
🧬 Code Graph Analysis (13)
health-services/geopode-adapter/src/main/java/digit/web/models/Arcgis/Attributes.java (2)
health-services/geopode-adapter/src/main/java/digit/web/models/Arcgis/Feature.java (1)
Data(11-22)health-services/geopode-adapter/src/main/java/digit/web/models/Arcgis/ArcgisResponse.java (1)
Data(13-48)
health-services/geopode-adapter/src/main/java/digit/web/models/Arcgis/Geometry.java (3)
health-services/geopode-adapter/src/main/java/digit/web/models/Arcgis/Feature.java (1)
Data(11-22)health-services/geopode-adapter/src/main/java/digit/web/models/Arcgis/Attributes.java (1)
Data(10-31)health-services/geopode-adapter/src/main/java/digit/web/models/Arcgis/ArcgisResponse.java (1)
Data(13-48)
health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryTypeHierarchySearchRequest.java (1)
health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryHierarchyDefinitionSearchCriteria.java (1)
Validated(15-38)
health-services/geopode-adapter/src/main/java/digit/web/models/Arcgis/UniqueIdField.java (1)
health-services/geopode-adapter/src/main/java/digit/web/models/Arcgis/ArcgisResponse.java (1)
Data(13-48)
health-services/geopode-adapter/src/main/java/digit/web/models/mdmsV2/MdmsResponseV2.java (2)
health-services/geopode-adapter/src/main/java/digit/web/models/mdmsV2/MdmsCriteriaReqV2.java (1)
Data(13-26)health-services/geopode-adapter/src/main/java/digit/web/models/mdmsV2/MdmsCriteriaV2.java (1)
Data(18-62)
health-services/geopode-adapter/src/main/java/digit/web/models/mdmsV2/MdmsCriteriaReqV2.java (1)
health-services/geopode-adapter/src/main/java/digit/web/models/mdmsV2/MdmsCriteriaV2.java (1)
Data(18-62)
health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/HierarchyType.java (10)
health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryHierarchy.java (4)
Data(8-58)Data(25-33)Data(35-44)Data(46-57)health-services/geopode-adapter/src/main/java/digit/web/models/GeopodeBoundary.java (1)
Validated(15-29)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryHierarchyDefinitionResponse.java (1)
Validated(12-29)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryHierarchyDefinitionSearchCriteria.java (1)
Validated(15-38)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryTypeHierarchyRequest.java (1)
Validated(15-30)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/Boundary.java (1)
Validated(17-44)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryRelation.java (1)
Validated(16-52)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryRelationshipDTO.java (1)
Validated(12-47)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryRelationshipRequest.java (1)
Validated(15-32)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryRequest.java (1)
Validated(19-37)
health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryHierarchyDefinitionSearchRequest.java (1)
health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryHierarchyDefinitionSearchCriteria.java (1)
Validated(15-38)
health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/EnrichedBoundary.java (3)
health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/Boundary.java (1)
Validated(17-44)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryRelation.java (1)
Validated(16-52)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryRelationshipDTO.java (1)
Validated(12-47)
health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/HierarchyRelation.java (3)
health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/Boundary.java (1)
Validated(17-44)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryRelation.java (1)
Validated(16-52)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundarySearchResponse.java (1)
Validated(17-33)
health-services/geopode-adapter/src/test/java/digit/web/controllers/GeopodeApiControllerTest.java (1)
health-services/geopode-adapter/src/main/java/digit/Main.java (1)
Import(9-17)
health-services/geopode-adapter/src/main/java/digit/web/controllers/GeopodeApiController.java (1)
health-services/project-factory/src/server/models/Boundary.d.ts (1)
BoundaryHierarchyDefinitionResponse(32-35)
health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryTypeHierarchyRequest.java (8)
health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryHierarchy.java (4)
Data(8-58)Data(25-33)Data(35-44)Data(46-57)health-services/geopode-adapter/src/main/java/digit/web/models/GeopodeBoundary.java (1)
Validated(15-29)health-services/geopode-adapter/src/main/java/digit/web/models/GeopodeBoundaryRequest.java (1)
Validated(15-27)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryHierarchyDefinitionResponse.java (1)
Validated(12-29)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryHierarchyDefinitionSearchCriteria.java (1)
Validated(15-38)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryTypeHierarchySearchRequest.java (1)
Validated(15-31)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryRelation.java (1)
Validated(16-52)health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryRelationshipRequest.java (1)
Validated(15-32)
🪛 LanguageTool
health-services/geopode-adapter/README.md
[misspelling] ~13-~13: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’.
Context: ...gfox/springfox) Start your server as an simple java application You can view...
(EN_A_VS_AN)
[uncategorized] ~18-~18: You might be missing the article “the” here.
Context: ...g to http://localhost:8080/ Change default port value in application.properties
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
🪛 markdownlint-cli2 (0.17.2)
health-services/geopode-adapter/README.md
3-3: Trailing spaces
Expected: 0 or 2; Actual: 1
(MD009, no-trailing-spaces)
5-5: Multiple consecutive blank lines
Expected: 1; Actual: 2
(MD012, no-multiple-blanks)
6-6: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
16-16: Bare URL used
null
(MD034, no-bare-urls)
18-18: Files should end with a single newline character
null
(MD047, single-trailing-newline)
🪛 Checkov (3.2.334)
health-services/geopode-adapter/src/main/resources/Dockerfile
[LOW] 1-20: Ensure that HEALTHCHECK instructions have been added to container images
(CKV_DOCKER_2)
[LOW] 1-20: Ensure that a user for the container has been created
(CKV_DOCKER_3)
🪛 Hadolint (2.12.0)
health-services/geopode-adapter/src/main/resources/Dockerfile
[warning] 6-6: Pin versions in apk add. Instead of apk add <package> use apk add <package>=<version>
(DL3018)
🪛 Shellcheck (0.10.0)
health-services/geopode-adapter/src/main/resources/start.sh
[warning] 3-3: In POSIX sh, [[ ]] is undefined.
(SC3010)
[info] 11-11: Double quote to prevent globbing and word splitting.
(SC2086)
[info] 11-11: Double quote to prevent globbing and word splitting.
(SC2086)
[info] 11-11: Double quote to prevent globbing and word splitting.
(SC2086)
🔇 Additional comments (29)
health-services/geopode-adapter/src/main/resources/Dockerfile (1)
9-9: Verifystart.shcopy path.
The Dockerfile copiesbuild/maven/start.shbut your script lives insrc/main/resources. Confirm thatWORK_DIRand paths match your project layout.health-services/geopode-adapter/src/test/java/digit/TestConfiguration.java (1)
9-16: LGTM! Clean test configuration.The mocked
KafkaTemplatebean is properly configured for testing purposes, enabling isolated unit tests without external Kafka dependencies. The use of@SuppressWarnings("unchecked")is appropriate for the generic type in mocking scenarios.health-services/geopode-adapter/src/main/java/digit/web/models/mdmsV2/MdmsResponseV2.java (1)
20-28: LGTM! Follows standard egov response pattern.The
MdmsResponseV2class correctly implements the standard egov response wrapper pattern with proper validation annotations and JSON mapping. The structure is consistent with the related MDMS V2 models and follows established conventions.health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryType.java (1)
22-26: Verify mandatory status of tenantId and idNeither
tenantIdnoridare annotated with@NotNull. Confirm if both fields must be present; if so, add@NotNullor@NotBlankaccordingly.health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryTypeHierarchy.java (1)
19-30: LGTM! Well-structured model class.The implementation follows best practices with proper annotations for JSON serialization, validation, and Lombok code generation. The fields appropriately represent a boundary type hierarchy entity.
health-services/geopode-adapter/src/main/java/digit/web/models/Arcgis/Attributes.java (1)
15-31: LGTM! Appropriate model for ArcGIS integration.The class properly models hierarchical administrative names from ArcGIS with appropriate Jackson annotations. The
@JsonIgnoreProperties(ignoreUnknown = true)annotation is a good practice for handling API evolution and unknown fields from external services.health-services/geopode-adapter/src/main/java/digit/web/models/GeopdeHierarchyLevel.java (2)
15-15: Inconsistent class naming: "GeopdeHierarchyLevel" vs module name "geopode-adapter".
It appears the class name is missing an 'o' (GeopdevsGeopode). Verify and rename toGeopodeHierarchyLevelacross the codebase to maintain consistency.
17-27: DTO structure and annotations look solid.
Jackson mappings via@JsonPropertyand Lombok boilerplate generation with@Data,@Builder, and@JsonIgnorePropertiesensure reliable serialization/deserialization.health-services/geopode-adapter/src/main/java/digit/web/models/GeopodeBoundaryRequest.java (1)
21-26: DTO mapping looks correct.
Jackson property names (RequestInfo,BoundarySetup) and validation annotations (@Valid,@Validated) align with the API contract.health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryTypeHierarchyDefinition.java (1)
26-43: Core DTO is well-structured.
Lombok annotations, JSON mappings, and the inclusion ofAuditDetailsandJsonNodecover necessary data points for the hierarchy definition.health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryRelationshipRequestDTO.java (2)
1-9: DTO structure is sound.
Lombok (@Data,@Builder) and Jackson (@JsonProperty) annotations align and should serialize/deserialize properly.
18-25: Clarify single vs. list usage.
Having bothboundaryRelationshipDTOandboundaryRelationshipDTOListcan be confusing—confirm if both are required or if one can be consolidated.health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryRelationshipResponse.java (1)
17-22: Model class looks solid.
Fields are correctly annotated for JSON mapping and validation, and Lombok covers boilerplate.health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/EnrichedBoundary.java (1)
36-38: Nested children validation is correctly configured.
Using@ValidonList<EnrichedBoundary> childrenensures recursive validation; JSON mapping is handled via@JsonProperty.health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryRelation.java (1)
24-33: BoundaryRelation model is well-defined.
Key fields are validated, JSON mapping is correct, and@JsonIgnorehides internal paths.health-services/geopode-adapter/src/main/java/digit/web/models/Arcgis/UniqueIdField.java (1)
10-22: Well-structured model class.The implementation correctly uses Jackson annotations for JSON mapping and Lombok for boilerplate code generation. The
@JsonIgnoreProperties(ignoreUnknown = true)annotation properly handles unknown fields during deserialization.health-services/geopode-adapter/src/test/java/digit/web/controllers/GeopodeApiControllerTest.java (1)
19-19: Remove @ignore annotation or provide justification.The entire test class is disabled. Either fix the tests and enable them, or document why they're disabled.
Should these tests be enabled? If there are specific issues preventing them from running, please document the reasons.
health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryResponse.java (2)
26-28: ResponseInfo field is well-defined
Using@JsonProperty("ResponseInfo")and@Validaligns with other models and ensures proper deserialization and nested validation.
30-32: Boundary list mapping is correct
@JsonProperty("Boundary")and@Validon the list match the contract.health-services/geopode-adapter/src/main/java/digit/web/models/Arcgis/GeometryProperties.java (1)
10-14: Class annotations look good
@Data,@Builder, and@JsonIgnoreProperties(ignoreUnknown = true)are appropriate for this ArcGIS response model.health-services/geopode-adapter/pom.xml (2)
84-84: 🛠️ Refactor suggestionConsider pinning SNAPSHOT dependencies to stable releases.
Using SNAPSHOT versions in production can lead to unpredictable behavior due to version changes. Consider using stable releases for
tracerandmdms-clientdependencies.Also applies to: 94-94
⛔ Skipped due to learnings
Learnt from: Priyanka-eGov PR: egovernments/health-campaign-services#783 File: health-services/plan-service/pom.xml:67-75 Timestamp: 2024-06-20T06:32:11.588Z Learning: SNAPSHOT versions of the dependencies `tracer` and `mdms-client` are required for the `plan-service` project as specified by Priyanka-eGov.
52-52:❓ Verification inconclusive
Verify dependency versions for security vulnerabilities and latest releases.
Several dependencies have explicitly specified versions that may contain security vulnerabilities or be outdated:
- Flyway 9.22.3
- PostgreSQL 42.7.1
- Swagger Core 1.5.18 (notably old version)
- Swagger Annotations 2.2.8
- JSON Smart 2.5.0
- eGov tracer and mdms-client using SNAPSHOT versions
Also applies to: 57-57, 68-68, 73-73, 78-78, 84-84, 94-94
🏁 Script executed:
#!/bin/bash # Check for security vulnerabilities and latest versions of key dependencies echo "Checking Flyway versions and security advisories..." curl -s https://api.github.com/repos/flyway/flyway/releases/latest | jq '.tag_name' echo "Checking PostgreSQL JDBC driver versions..." curl -s https://search.maven.org/solrsearch/select?q=g:org.postgresql+AND+a:postgresql&rows=1&wt=json | jq '.response.docs[0].latestVersion' echo "Checking Swagger Core versions..." curl -s https://search.maven.org/solrsearch/select?q=g:io.swagger+AND+a:swagger-core&rows=1&wt=json | jq '.response.docs[0].latestVersion' echo "Checking for security advisories on key dependencies..." for package in "flyway-core" "postgresql" "swagger-core" "json-smart"; do gh api graphql -f query=" { securityVulnerabilities(first: 5, ecosystem: MAVEN, package: \"$package\") { nodes { advisory { summary severity publishedAt } vulnerableVersionRange firstPatchedVersion { identifier } } } }" doneLength of output: 2885
🏁 Script executed:
#!/bin/bash set -e echo "Latest Flyway version:" curl -s "https://api.github.com/repos/flyway/flyway/releases/latest" | jq -r '.tag_name' echo "Latest PostgreSQL JDBC driver version:" curl -s "https://search.maven.org/solrsearch/select?q=g:org.postgresql+AND+a:postgresql&rows=1&wt=json" \ | jq -r '.response.docs[0].latestVersion' echo "Latest Swagger Core (1.x) version:" curl -s "https://search.maven.org/solrsearch/select?q=g:io.swagger+AND+a:swagger-core&rows=1&wt=json" \ | jq -r '.response.docs[0].latestVersion' echo "Latest Swagger Annotations (v3) version:" curl -s "https://search.maven.org/solrsearch/select?q=g:io.swagger.core.v3+AND+a:swagger-annotations&rows=1&wt=json" \ | jq -r '.response.docs[0].latestVersion' echo "Latest JSON Smart version:" curl -s "https://search.maven.org/solrsearch/select?q=g:net.minidev+AND+a:json-smart&rows=1&wt=json" \ | jq -r '.response.docs[0].latestVersion' echo "Checking GitHub Security Advisories for key Maven coordinates:" for coords in \ "g:org.flywaydb,a:flyway-core" \ "g:org.postgresql,a:postgresql" \ "g:io.swagger,a:swagger-core" \ "g:io.swagger.core.v3,a:swagger-annotations" \ "g:net.minidev,a:json-smart" do echo echo "==> $coords" gh api graphql -f query=" { securityVulnerabilities(first: 5, ecosystem: MAVEN, package: \"$coords\") { nodes { advisory { summary severity publishedAt } vulnerableVersionRange firstPatchedVersion { identifier } } } }" doneLength of output: 456
Manual verification required: dependency versions and security advisories
Automated checks failed to retrieve all version details. Please manually verify the following entries in
health-services/geopode-adapter/pom.xml(lines 52, 57, 68, 73, 78, 84, 94):
- Flyway (
9.22.3) → latest is11.9.1- org.postgresql:postgresql (
42.7.1) → confirm current release- io.swagger:swagger-core (
1.5.18) → confirm latest 1.x- io.swagger.core.v3:swagger-annotations (
2.2.8) → confirm latest 2.x- net.minidev:json-smart (
2.5.0) → confirm latest- eGov-tracer and mdms-client → avoid SNAPSHOTs for stable builds
Use Maven Central and GitHub Security Advisories to ensure each dependency is up-to-date and free of known vulnerabilities.
health-services/geopode-adapter/src/main/java/digit/web/models/mdmsV2/Mdms.java (1)
16-55: Well-structured data model implementationThe class properly implements a validated MDMS entity with appropriate use of Lombok annotations, validation constraints, and Jackson serialization. The default value for
isActiveand flexibleJsonNodefor data storage are good design choices.health-services/geopode-adapter/src/main/java/digit/util/BoundaryUtil.java (1)
187-196: LGTM!The method is well-structured and uses the builder pattern appropriately with clear documentation.
health-services/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryRelationshipSearchCriteria.java (5)
1-61: Well-structured data model implementation.The class is properly designed with appropriate validation annotations, builder pattern, and JSON serialization configuration. The use of
@JsonIgnorefor internal fields is a good practice.
1-14: LGTM: Clean imports and package structure.The package structure follows Java conventions and imports are well-organized with appropriate libraries for validation, JSON processing, and Lombok.
16-21: LGTM: Proper use of annotations for a DTO class.The combination of Lombok annotations (@DaTa, @builder, @AllArgsConstructor, @NoArgsConstructor) and Spring's @validated is appropriate for a search criteria DTO class.
45-51: LGTM: Proper default values for boolean flags.Good use of
@Builder.DefaultwithBoolean.FALSEfor the inclusion flags. Using Boolean wrapper type is appropriate for DTOs where null vs false distinction might be meaningful.
53-59: LGTM: Proper handling of internal fields.Excellent use of
@JsonIgnorefor internal processing fields with appropriate default values. ThecurrentBoundaryCodesinitialization withnew ArrayList<>()ensures the field is never null.
health-services/geopode-adapter/src/main/java/digit/config/ServiceConstants.java
Show resolved
Hide resolved
...ode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryTypeHierarchyRequest.java
Show resolved
Hide resolved
...ode-adapter/src/main/java/digit/web/models/boundaryService/BoundaryTypeHierarchyRequest.java
Show resolved
Hide resolved
...s/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundarySearchResponse.java
Show resolved
Hide resolved
...s/geopode-adapter/src/main/java/digit/web/models/boundaryService/BoundarySearchResponse.java
Show resolved
Hide resolved
health-services/geopode-adapter/src/main/java/digit/repository/ServiceRequestRepository.java
Outdated
Show resolved
Hide resolved
health-services/geopode-adapter/src/main/java/digit/service/GeopodeAdapterService.java
Show resolved
Hide resolved
health-services/geopode-adapter/src/main/java/digit/repository/ServiceRequestRepository.java
Outdated
Show resolved
Hide resolved
health-services/geopode-adapter/src/main/java/digit/config/ServiceConstants.java
Show resolved
Hide resolved
health-services/geopode-adapter/src/main/java/digit/util/MdmsV2Util.java
Outdated
Show resolved
Hide resolved
health-services/geopode-adapter/src/main/java/digit/web/controllers/GeopodeApiController.java
Outdated
Show resolved
Hide resolved
health-services/geopode-adapter/src/main/java/digit/web/controllers/GeopodeApiController.java
Outdated
Show resolved
Hide resolved
health-services/geopode-adapter/src/main/java/digit/web/controllers/GeopodeApiController.java
Outdated
Show resolved
Hide resolved
Adding changes for Multi-Architecture Docker Images
…-campaign-services into HCMPRE-2709-modified
Summary by CodeRabbit
New Features
Documentation
Tests