Skip to content

Commit 90db8b4

Browse files
DurgaPrasad-54vishwab1
authored andcommitted
Cherry-pick health and version API enhancements to release-3.6.1 (#371)
* feat(health,version): update version and health endpoints and add advance check for database * fix(health): normalize severity and fix slow query false positives * fix(health): avoid false CRITICAL on single long-running MySQL transaction * fix(health): enforce 3s DB connection timeout via HikariCP
1 parent 1cc3888 commit 90db8b4

4 files changed

Lines changed: 458 additions & 3 deletions

File tree

pom.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,32 @@
520520
<build>
521521
<finalName>${artifactId}-${version}</finalName>
522522
<plugins>
523+
<plugin>
524+
<groupId>io.github.git-commit-id</groupId>
525+
<artifactId>git-commit-id-maven-plugin</artifactId>
526+
<version>9.0.2</version>
527+
<executions>
528+
<execution>
529+
<id>get-the-git-infos</id>
530+
<goals>
531+
<goal>revision</goal>
532+
</goals>
533+
<phase>initialize</phase>
534+
</execution>
535+
</executions>
536+
<configuration>
537+
<generateGitPropertiesFile>true</generateGitPropertiesFile>
538+
<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
539+
<includeOnlyProperties>
540+
<property>^git.branch$</property>
541+
<property>^git.commit.id.abbrev$</property>
542+
<property>^git.build.version$</property>
543+
<property>^git.build.time$</property>
544+
</includeOnlyProperties>
545+
<failOnNoGitDirectory>false</failOnNoGitDirectory>
546+
<failOnUnableToExtractRepoInfo>false</failOnUnableToExtractRepoInfo>
547+
</configuration>
548+
</plugin>
523549
<plugin>
524550
<groupId>org.apache.maven.plugins</groupId>
525551
<artifactId>maven-jar-plugin</artifactId>

src/main/java/com/iemr/common/controller/version/VersionController.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@
2828

2929
import org.slf4j.Logger;
3030
import org.slf4j.LoggerFactory;
31-
import org.springframework.web.bind.annotation.RequestMapping;
32-
import org.springframework.web.bind.annotation.RequestMethod;
31+
import org.springframework.http.MediaType;
32+
import org.springframework.http.ResponseEntity;
33+
import org.springframework.web.bind.annotation.GetMapping;
3334
import org.springframework.web.bind.annotation.RestController;
3435

3536
import com.iemr.common.utils.response.OutputResponse;
@@ -52,6 +53,9 @@ public String versionInformation() {
5253
} catch (Exception e) {
5354
output.setError(e);
5455
}
56+
logger.info("version Controller End");
57+
return ResponseEntity.ok(response);
58+
}
5559

5660
logger.info("version Controller End");
5761
return output.toString();

0 commit comments

Comments
 (0)