Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions chpl/chpl-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
<commonmark.version>0.27.1</commonmark.version>
<fuzzywuzzy.version>1.4.0</fuzzywuzzy.version>
<itext.version>9.4.0</itext.version>
<jackson.version>3.2.0</jackson.version>
<jackson.version>3.2.1</jackson.version>
<jfreechart.version>1.5.6</jfreechart.version>
<microsoft-graph.version>6.59.0</microsoft-graph.version>
<org.apache.httpcomponents.version>4.5.14</org.apache.httpcomponents.version>
<poi.version>5.5.1</poi.version>
<postgresql.version>42.7.11</postgresql.version>
<postgresql.version>42.7.12</postgresql.version>
<quartz.version>2.5.2</quartz.version>
<zxcvbn.version>1.7.0</zxcvbn.version>
<spring.data.redis.version>4.0.1</spring.data.redis.version>
Expand Down Expand Up @@ -126,7 +126,7 @@
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>9.1.0.Final</version>
<version>9.1.3.Final</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -278,7 +278,7 @@
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-dbcp</artifactId>
<version>11.0.23</version>
<version>11.0.24</version>
</dependency>

<!-- Enhanced stream functions -->
Expand Down Expand Up @@ -347,7 +347,7 @@
<dependency>
<groupId>com.datadoghq</groupId>
<artifactId>datadog-api-client</artifactId>
<version>2.48.0</version>
<version>2.56.0</version>
</dependency>
<!-- Provides throttling and rate-limiting behavior-->
<!-- Specifically being used to slow down our requests to the Datadog API to avoid being rate-limited -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import com.datadog.api.client.v1.model.SyntheticsPatchTestBody;
import com.datadog.api.client.v1.model.SyntheticsPatchTestOperation;
import com.datadog.api.client.v1.model.SyntheticsPatchTestOperationName;
import com.datadog.api.client.v1.model.SyntheticsTestDetails;
import com.datadog.api.client.v1.model.SyntheticsTestDetailsWithoutSteps;
import com.datadog.api.client.v1.model.SyntheticsTestOptions;
import com.datadog.api.client.v1.model.SyntheticsTestOptionsHTTPVersion;
import com.datadog.api.client.v1.model.SyntheticsTestOptionsScheduling;
Expand Down Expand Up @@ -63,7 +63,7 @@ public DatadogSyntheticsTestApiProvider getApiProvider() {
return apiProvider;
}

public List<SyntheticsTestDetails> getAllSyntheticsTests() {
public List<SyntheticsTestDetailsWithoutSteps> getAllSyntheticsTests() {
try {
return apiProvider.getApiInstance().listTests().getTests();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.datadog.api.client.v1.model.SyntheticsAPITestResultFull;
import com.datadog.api.client.v1.model.SyntheticsAPITestResultShort;
import com.datadog.api.client.v1.model.SyntheticsApiTestFailureCode;
import com.datadog.api.client.v1.model.SyntheticsTestDetails;
import com.datadog.api.client.v1.model.SyntheticsTestDetailsWithoutSteps;

import gov.healthit.chpl.datadog.OnDemandUrlCheckerManager;
import gov.healthit.chpl.developer.search.DeveloperSearchRequest;
Expand Down Expand Up @@ -89,7 +89,7 @@ public void synchronize() {

private void synchronizeUrlUptimeMonitorTestsWithDatadogSyntheticsTestResults() {
LOGGER.info("**************** Getting Test Results from Datadog and saving it locally ****************");
List<SyntheticsTestDetails> syntheticsTestDetails = datadogSyntheticsTestService.getAllSyntheticsTests();
List<SyntheticsTestDetailsWithoutSteps> syntheticsTestDetails = datadogSyntheticsTestService.getAllSyntheticsTests();

getDatesToRetrieveResultsFor().stream()
.peek(testDate -> LOGGER.info("**************** Retrieving test results for: {} ****************", testDate))
Expand Down Expand Up @@ -136,10 +136,10 @@ private void synchronizeDatadogSyntheticsTestsWithServiceBaseUrlLists() {

private void createOrUpdateSyntheticsTest() {
List<ServiceBaseUrlList> serviceBaseUrlLists = serviceBaseUrlListService.getAllServiceBaseUrlLists();
List<SyntheticsTestDetails> syntheticsTestDetails = datadogSyntheticsTestService.getAllSyntheticsTests();
List<SyntheticsTestDetailsWithoutSteps> syntheticsTestDetails = datadogSyntheticsTestService.getAllSyntheticsTests();

for (ServiceBaseUrlList sbu : serviceBaseUrlLists) {
Optional<SyntheticsTestDetails> foundSyntheticsTestDetails = findSyntheticsTestDetails(syntheticsTestDetails, sbu.getUrl());
Optional<SyntheticsTestDetailsWithoutSteps> foundSyntheticsTestDetails = findSyntheticsTestDetails(syntheticsTestDetails, sbu.getUrl());
if (foundSyntheticsTestDetails.isEmpty()) {
datadogSyntheticsTestService.createSyntheticsTest(sbu.getDatadogFormattedUrl(), sbu.getDeveloperIds());
syntheticsTestDetails = datadogSyntheticsTestService.getAllSyntheticsTests();
Expand All @@ -156,10 +156,10 @@ private void createOrUpdateSyntheticsTest() {

private void removeUnusedDatadogSyntheticsTests() {
List<ServiceBaseUrlList> serviceBaseUrlLists = serviceBaseUrlListService.getAllServiceBaseUrlLists();
List<SyntheticsTestDetails> syntheticsTestDetails = datadogSyntheticsTestService.getAllSyntheticsTests();
List<SyntheticsTestDetailsWithoutSteps> syntheticsTestDetails = datadogSyntheticsTestService.getAllSyntheticsTests();

List<String> syntheticsTestPublicIdsToDelete = new ArrayList<String>();
for (SyntheticsTestDetails std : syntheticsTestDetails) {
for (SyntheticsTestDetailsWithoutSteps std : syntheticsTestDetails) {
boolean found = serviceBaseUrlLists.stream()
.filter(sbu -> sbu.getUrl().equals(std.getConfig().getRequest().getUrl()))
.findAny()
Expand All @@ -174,7 +174,7 @@ private void removeUnusedDatadogSyntheticsTests() {
}
}

private Optional<SyntheticsTestDetails> findSyntheticsTestDetails(List<SyntheticsTestDetails> syntheticsTestDetails, String url) {
private Optional<SyntheticsTestDetailsWithoutSteps> findSyntheticsTestDetails(List<SyntheticsTestDetailsWithoutSteps> syntheticsTestDetails, String url) {
return syntheticsTestDetails.stream()
.filter(std -> std.getConfig().getRequest().getUrl().equals(url))
.findAny();
Expand Down Expand Up @@ -230,7 +230,7 @@ private Boolean contains(List<UrlUptimeMonitor> list, UrlUptimeMonitor value) {
&& item.getUrl().equals(value.getUrl()));
}

private List<UrlUptimeMonitor> generateExpectedUrlIUpTimeMonitors(List<SyntheticsTestDetails> syntheticsTestDetails) {
private List<UrlUptimeMonitor> generateExpectedUrlIUpTimeMonitors(List<SyntheticsTestDetailsWithoutSteps> syntheticsTestDetails) {
return (List<UrlUptimeMonitor>) syntheticsTestDetails.stream()
.flatMap(synthTest -> getDeveloperIdsFromTags(synthTest.getTags()).stream()
.map(devId -> UrlUptimeMonitor.builder()
Expand Down Expand Up @@ -289,7 +289,7 @@ private List<Long> getDeveloperIdsFromTags(List<String> tags) {
.toList();
}

private String getDatadogPublicId(List<SyntheticsTestDetails> syntheticsTestDetails, String url, Long developerId) {
private String getDatadogPublicId(List<SyntheticsTestDetailsWithoutSteps> syntheticsTestDetails, String url, Long developerId) {
return syntheticsTestDetails.stream()
.filter(dets -> dets.getConfig().getRequest().getUrl().equals(url)
&& getDeveloperIdsFromTags(dets.getTags()).contains(developerId))
Expand Down
2 changes: 1 addition & 1 deletion chpl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.10.0</version>
<version>3.22.0</version>
</plugin>
<!-- use the resources sub-project -->
<plugin>
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -669,9 +669,9 @@ inherits@2.0.4, inherits@^2.0.1:
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==

ip-address@^10.0.1:
version "10.2.0"
resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-10.2.0.tgz#805fc178b20c518bd4c8548b24fe30892d7f3206"
integrity sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA==
version "10.4.0"
resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-10.4.0.tgz#c5910bc541b6eae287765d1e4846be0308a05d93"
integrity sha512-oSK96Grm3aP6OrS263xVxbNDGVL7rzBtYdpGqlDG8iQdoenDoTs/nkki+DflYbAEE8Xl6o5YxhxlrKvI3nqKXQ==

is-fullwidth-code-point@^3.0.0:
version "3.0.0"
Expand Down
Loading