-
Notifications
You must be signed in to change notification settings - Fork 33
Merge release 3.6.1 to main #141
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a20e55b
fix: amm-1927 res headers based on allowed origins
5Amogh 42201d4
Merge pull request #119 from PSMRI/amm-1927
5Amogh 998b5ab
Update version from 3.1.0 to 3.6.0
5Amogh c2cd720
Abdm v3 (#128)
helenKaryamsetty 4388d59
Small correction (#131)
helenKaryamsetty c1ac206
Fix the sync issue of Abha Details in Elasticsearch (#133)
vanitha1822 db93a33
Cherry-pick health and version API enhancements to release-3.6.1 (#139)
DurgaPrasad-54 3be966a
fix: merge 3.6.1 to main
vanitha1822 7ef6b9a
fix: remove unwanted file
vanitha1822 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| <factorypath> | ||
| <factorypathentry kind="VARJAR" id="M2_REPO/org/projectlombok/lombok/1.18.36/lombok-1.18.36.jar" enabled="true" runInBatchMode="false"/> | ||
| <factorypathentry kind="VARJAR" id="M2_REPO/org/projectlombok/lombok/1.18.30/lombok-1.18.30.jar" enabled="true" runInBatchMode="false"/> | ||
| <factorypathentry kind="VARJAR" id="M2_REPO/org/mapstruct/mapstruct-processor/1.2.0.Final/mapstruct-processor-1.2.0.Final.jar" enabled="true" runInBatchMode="false"/> | ||
| </factorypath> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -100,6 +100,10 @@ | |
| webLoginAbhaVerify = https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/verify | ||
| webLoginPhrCard = https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/profile/abha/phr-card | ||
|
|
||
| ## ABDM V3 M2 APIs | ||
| generateTokenForLinkCareContext = https://dev.abdm.gov.in/api/hiecm/v3/token/generate-token | ||
| linkCareContext = https://dev.abdm.gov.in/api/hiecm/hip/v3/link/carecontext | ||
|
|
||
| x-CM-ID= sbx | ||
| abhaMode=sbx | ||
|
|
||
|
|
@@ -113,4 +117,17 @@ | |
| logging.path=logs/ | ||
| logging.file.name=logs/fhir-api.log | ||
|
|
||
| cors.allowed-origins=http://localhost:* | ||
| cors.allowed-origins=http://localhost:* | ||
|
|
||
| hipSystemUrl= <Enter HIP request URL> | ||
|
|
||
| # Elasticsearch Configuration | ||
| elasticsearch.host=localhost | ||
| elasticsearch.port=9200 | ||
| elasticsearch.username=elastic | ||
| elasticsearch.password=piramalES | ||
|
Check warning on line 128 in src/main/environment/common_example.properties
|
||
Check noticeCode scanning / SonarCloud Credentials should not be hard-coded Low
Make sure these credentials get revoked, changed, and removed from the code. See more on SonarQube Cloud
|
||
| elasticsearch.index.beneficiary=beneficiary_index | ||
|
|
||
| # Enable/Disable ES (for gradual rollout) | ||
| elasticsearch.enabled=true | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 104 additions & 0 deletions
104
src/main/java/com/wipro/fhir/config/ElasticsearchConfig.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| package com.wipro.fhir.config; | ||
|
|
||
| import co.elastic.clients.elasticsearch.ElasticsearchClient; | ||
| import co.elastic.clients.json.jackson.JacksonJsonpMapper; | ||
| import co.elastic.clients.transport.ElasticsearchTransport; | ||
| import co.elastic.clients.transport.rest_client.RestClientTransport; | ||
| import org.apache.http.HttpHost; | ||
| import org.apache.http.auth.AuthScope; | ||
| import org.apache.http.auth.UsernamePasswordCredentials; | ||
| import org.apache.http.impl.client.BasicCredentialsProvider; | ||
| import org.apache.http.impl.nio.reactor.IOReactorConfig; | ||
| import org.elasticsearch.client.RestClient; | ||
| import org.elasticsearch.client.RestClientBuilder; | ||
| import org.springframework.beans.factory.annotation.Value; | ||
| import org.springframework.context.annotation.Bean; | ||
| import org.springframework.context.annotation.Configuration; | ||
| import org.springframework.scheduling.annotation.EnableAsync; | ||
| import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; | ||
|
|
||
| import java.util.concurrent.Executor; | ||
|
|
||
| @Configuration | ||
| @EnableAsync | ||
| public class ElasticsearchConfig { | ||
|
|
||
| @Value("${elasticsearch.host}") | ||
| private String esHost; | ||
|
|
||
| @Value("${elasticsearch.port}") | ||
| private int esPort; | ||
|
|
||
| @Value("${elasticsearch.username}") | ||
| private String esUsername; | ||
|
|
||
| @Value("${elasticsearch.password}") | ||
| private String esPassword; | ||
|
|
||
| @Value("${elasticsearch.connection.timeout:10000}") | ||
| private int connectionTimeout; | ||
|
|
||
| @Value("${elasticsearch.socket.timeout:120000}") | ||
| private int socketTimeout; | ||
|
|
||
| @Value("${elasticsearch.max.connections:200}") | ||
| private int maxConnections; | ||
|
|
||
| @Value("${elasticsearch.max.connections.per.route:100}") | ||
| private int maxConnectionsPerRoute; | ||
|
|
||
| @Bean | ||
| public ElasticsearchClient elasticsearchClient() { | ||
| BasicCredentialsProvider credentialsProvider = new BasicCredentialsProvider(); | ||
| credentialsProvider.setCredentials( | ||
| AuthScope.ANY, | ||
| new UsernamePasswordCredentials(esUsername, esPassword) | ||
| ); | ||
|
|
||
| RestClientBuilder builder = RestClient.builder( | ||
| new HttpHost(esHost, esPort, "http") | ||
| ); | ||
|
|
||
| // Apply timeout configurations | ||
| builder.setRequestConfigCallback(requestConfigBuilder -> | ||
| requestConfigBuilder | ||
| .setConnectTimeout(connectionTimeout) | ||
| .setSocketTimeout(socketTimeout) | ||
| .setConnectionRequestTimeout(connectionTimeout) | ||
| ); | ||
|
|
||
| // Apply connection pool settings | ||
| builder.setHttpClientConfigCallback(httpClientBuilder -> | ||
| httpClientBuilder | ||
| .setDefaultCredentialsProvider(credentialsProvider) | ||
| .setMaxConnTotal(maxConnections) | ||
| .setMaxConnPerRoute(maxConnectionsPerRoute) | ||
| .setDefaultIOReactorConfig( | ||
| IOReactorConfig.custom() | ||
| .setSoTimeout(socketTimeout) | ||
| .build() | ||
| ) | ||
| ); | ||
|
|
||
| RestClient restClient = builder.build(); | ||
|
|
||
| ElasticsearchTransport transport = new RestClientTransport( | ||
| restClient, | ||
| new JacksonJsonpMapper() | ||
| ); | ||
|
|
||
| return new ElasticsearchClient(transport); | ||
| } | ||
|
|
||
| @Bean(name = "esAsyncExecutor") | ||
| public Executor asyncExecutor() { | ||
| ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); | ||
| executor.setCorePoolSize(5); | ||
| executor.setMaxPoolSize(20); | ||
| executor.setQueueCapacity(500); | ||
| executor.setThreadNamePrefix("es-sync-"); | ||
| executor.setRejectedExecutionHandler(new java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy()); | ||
| executor.initialize(); | ||
| return executor; | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Inconsistent placeholder syntax will cause runtime failure.
Lines 102-103 use
@env.ABDM_HIECM_BASE_URL@(Maven resource filtering syntax), while all other properties in this file use${VARIABLE}(Spring property placeholder syntax). This inconsistency will likely result in the literal string@env.ABDM_HIECM_BASE_URL@being used at runtime instead of the resolved value.π Proposed fix
π Committable suggestion
π€ Prompt for AI Agents