From 14efded5960d47871ab874e5e638e8a3fcbbb010 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 19:23:51 +0000 Subject: [PATCH 1/6] chore(deps): update dependency ubuntu to v24 --- .github/workflows/api-check.yml | 2 +- .github/workflows/merge.yml | 6 +++--- .github/workflows/pr-close.yml | 6 +++--- .github/workflows/pr-open.yml | 4 ++-- .github/workflows/reusable-tests-be.yml | 2 +- .github/workflows/reusable-tests-repo.yml | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/api-check.yml b/.github/workflows/api-check.yml index 7797f3ed..acd38885 100644 --- a/.github/workflows/api-check.yml +++ b/.github/workflows/api-check.yml @@ -12,7 +12,7 @@ concurrency: jobs: verify-api: name: Verify TEST - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: matrix: package: [ test, prod ] diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 42fe7740..aeb73adf 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -18,7 +18,7 @@ concurrency: jobs: deploy-test: name: TEST Deployment - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 outputs: tag: ${{ steps.changelog.outputs.tag }} permissions: @@ -87,7 +87,7 @@ jobs: image-promotions: name: Image Promotions needs: [deploy-test] - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: matrix: tag: [prod, "${{ needs.deploy-test.outputs.tag }}"] @@ -108,7 +108,7 @@ jobs: deploy-prod: name: PROD Deployment needs: [image-promotions] - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 environment: name: prod steps: diff --git a/.github/workflows/pr-close.yml b/.github/workflows/pr-close.yml index 8a91dc6c..05eeaa4b 100644 --- a/.github/workflows/pr-close.yml +++ b/.github/workflows/pr-close.yml @@ -17,7 +17,7 @@ jobs: # Clean up OpenShift when PR closed, no conditions cleanup-openshift: name: Cleanup OpenShift - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 environment: name: dev steps: @@ -33,7 +33,7 @@ jobs: image-promotions: name: Image Promotions if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Promoting API uses: shrink/actions-docker-registry-tag@v4 @@ -47,7 +47,7 @@ jobs: # Notify when PR merged and branch = main merge-notification: name: Merge Notification - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' steps: - name: Pre-merge update diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 70afe4aa..45677636 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -60,7 +60,7 @@ jobs: pr-greeting: name: Greeting - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 permissions: pull-requests: write steps: @@ -100,7 +100,7 @@ jobs: deploy: name: Deploy needs: [build] - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 timeout-minutes: 15 environment: name: dev diff --git a/.github/workflows/reusable-tests-be.yml b/.github/workflows/reusable-tests-be.yml index 2d784e7f..8299cd62 100644 --- a/.github/workflows/reusable-tests-be.yml +++ b/.github/workflows/reusable-tests-be.yml @@ -7,7 +7,7 @@ jobs: tests-java: name: Backend Tests if: github.event_name != 'pull_request' || !github.event.pull_request.draft - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: bcgov-nr/action-test-and-analyse-java@v1.0.2 name: Backend Coverage diff --git a/.github/workflows/reusable-tests-repo.yml b/.github/workflows/reusable-tests-repo.yml index e17fb457..f57c6c1e 100644 --- a/.github/workflows/reusable-tests-repo.yml +++ b/.github/workflows/reusable-tests-repo.yml @@ -7,7 +7,7 @@ jobs: trivy: name: Repository Report if: github.event_name != 'pull_request' || !github.event.pull_request.draft - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - name: Run Trivy vulnerability scanner in repo mode @@ -27,7 +27,7 @@ jobs: codeql: name: Semantic Code Analysis - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 permissions: actions: read contents: read From e74f80f4641a47e8a7916d300713120f3551e605 Mon Sep 17 00:00:00 2001 From: Maria Martinez Date: Thu, 26 Sep 2024 14:35:59 -0700 Subject: [PATCH 2/6] Made code reviews --- .../configuration/MetricConfiguration.java | 2 +- .../legacy/controller/ClientController.java | 6 ++-- .../legacy/entity/ClientLocationEntity.java | 1 + .../legacy/entity/ForestClientEntity.java | 10 +++---- .../legacy/service/ClientLocationService.java | 24 ++++++++++++++- .../legacy/service/ClientSearchService.java | 5 ++-- .../api/oracle/legacy/util/ClientMapper.java | 29 ++++++++++++------- 7 files changed, 53 insertions(+), 24 deletions(-) diff --git a/src/main/java/ca/bc/gov/api/oracle/legacy/configuration/MetricConfiguration.java b/src/main/java/ca/bc/gov/api/oracle/legacy/configuration/MetricConfiguration.java index 21cfd641..dc36c517 100644 --- a/src/main/java/ca/bc/gov/api/oracle/legacy/configuration/MetricConfiguration.java +++ b/src/main/java/ca/bc/gov/api/oracle/legacy/configuration/MetricConfiguration.java @@ -34,7 +34,7 @@ public MeterRegistryCustomizer metricsCommonTags() { .commonTags( "version", appVersion, "app", appName, - "zone",appZone + "zone", appZone ) .meterFilter(ignoreTag()) .meterFilter(distribution()); diff --git a/src/main/java/ca/bc/gov/api/oracle/legacy/controller/ClientController.java b/src/main/java/ca/bc/gov/api/oracle/legacy/controller/ClientController.java index f0fe98fd..8e58f57a 100644 --- a/src/main/java/ca/bc/gov/api/oracle/legacy/controller/ClientController.java +++ b/src/main/java/ca/bc/gov/api/oracle/legacy/controller/ClientController.java @@ -34,10 +34,8 @@ */ @RestController @Slf4j -@Tag( - name = "Client API", - description = "Deals with client data checks and validation" -) +@Tag(name = "Client API", + description = "Deals with client data checks and validation") @RequestMapping(value = "/api/clients", produces = MediaType.APPLICATION_JSON_VALUE) @RequiredArgsConstructor public class ClientController { diff --git a/src/main/java/ca/bc/gov/api/oracle/legacy/entity/ClientLocationEntity.java b/src/main/java/ca/bc/gov/api/oracle/legacy/entity/ClientLocationEntity.java index 1707298b..e11f3e62 100644 --- a/src/main/java/ca/bc/gov/api/oracle/legacy/entity/ClientLocationEntity.java +++ b/src/main/java/ca/bc/gov/api/oracle/legacy/entity/ClientLocationEntity.java @@ -1,6 +1,7 @@ package ca.bc.gov.api.oracle.legacy.entity; import static ca.bc.gov.api.oracle.legacy.ApplicationConstants.ORACLE_ATTRIBUTE_SCHEMA; + import java.time.LocalDateTime; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/src/main/java/ca/bc/gov/api/oracle/legacy/entity/ForestClientEntity.java b/src/main/java/ca/bc/gov/api/oracle/legacy/entity/ForestClientEntity.java index 2cda24c0..9e9a3532 100644 --- a/src/main/java/ca/bc/gov/api/oracle/legacy/entity/ForestClientEntity.java +++ b/src/main/java/ca/bc/gov/api/oracle/legacy/entity/ForestClientEntity.java @@ -1,7 +1,8 @@ package ca.bc.gov.api.oracle.legacy.entity; -import static ca.bc.gov.api.oracle.legacy.ApplicationConstants.ORACLE_ATTRIBUTE_SCHEMA; import static ca.bc.gov.api.oracle.legacy.ApplicationConstants.INDIVIDUAL; +import static ca.bc.gov.api.oracle.legacy.ApplicationConstants.ORACLE_ATTRIBUTE_SCHEMA; + import java.util.Objects; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -70,10 +71,9 @@ public class ForestClientEntity { public String getName() { if (Objects.equals(this.clientTypeCode, INDIVIDUAL)) { return Stream.of(this.legalFirstName, this.legalMiddleName, this.clientName) - .filter(Objects::nonNull) - .collect(Collectors.joining(" ")); - } - else { + .filter(Objects::nonNull) + .collect(Collectors.joining(" ")); + } else { return this.clientName; } } diff --git a/src/main/java/ca/bc/gov/api/oracle/legacy/service/ClientLocationService.java b/src/main/java/ca/bc/gov/api/oracle/legacy/service/ClientLocationService.java index fe582cc9..8dbde406 100644 --- a/src/main/java/ca/bc/gov/api/oracle/legacy/service/ClientLocationService.java +++ b/src/main/java/ca/bc/gov/api/oracle/legacy/service/ClientLocationService.java @@ -20,10 +20,24 @@ public class ClientLocationService { private final ClientLocationRepository repository; + /** + * Counts the number of locations associated with a given client. + * + * @param clientNumber the client number for which to count locations + * @return a {@link Mono} emitting the count of locations + */ public Mono countClientLocations(String clientNumber) { return repository.countByClientNumber(clientNumber); } + /** + * Retrieves a paginated list of client locations. + * + * @param clientNumber the client number for which to retrieve locations + * @param page the page number (0-based) to retrieve + * @param size the number of items per page + * @return a {@link Flux} emitting a list of {@link ClientLocationDto} objects + */ public Flux listClientLocations( String clientNumber, Integer page, @@ -58,10 +72,18 @@ public Flux listClientLocations( ); } + /** + * Retrieves the details of a specific client location based on client number and location code. + * + * @param clientNumber the client number associated with the location + * @param locationNumber the location code for the specific location + * @return a {@link Mono} emitting a {@link ClientLocationDto} object containing the location details, + * or an error if the location is not found + */ public Mono getClientLocationDetails(String clientNumber, String locationNumber) { return repository - .findByClientNumberAndLocationCode(clientNumber,locationNumber) + .findByClientNumberAndLocationCode(clientNumber, locationNumber) .map(entity -> new ClientLocationDto( entity.getClientNumber(), entity.getLocationCode(), diff --git a/src/main/java/ca/bc/gov/api/oracle/legacy/service/ClientSearchService.java b/src/main/java/ca/bc/gov/api/oracle/legacy/service/ClientSearchService.java index 07609cb3..0aa0d3cf 100644 --- a/src/main/java/ca/bc/gov/api/oracle/legacy/service/ClientSearchService.java +++ b/src/main/java/ca/bc/gov/api/oracle/legacy/service/ClientSearchService.java @@ -38,7 +38,8 @@ public Criteria searchById(List ids) { // Create an empty query criteria. Criteria queryCriteria = Criteria.empty(); - // If the ids list is not empty, add a query criteria to search for clients with client numbers in the ids list. + /* If the list of IDs is not empty, add a query criterion to search for clients + with client numbers in the list of IDs.*/ if (ids != null && !ids.isEmpty()) { queryCriteria = queryCriteria .and(where("clientNumber").in(ids)); @@ -75,7 +76,7 @@ public Flux searchClientByQuery( queryCriteria.isEmpty() ); - if(queryCriteria.isEmpty()) { + if (queryCriteria.isEmpty()) { return Flux.empty(); } diff --git a/src/main/java/ca/bc/gov/api/oracle/legacy/util/ClientMapper.java b/src/main/java/ca/bc/gov/api/oracle/legacy/util/ClientMapper.java index d0e36f89..0fb73b0b 100644 --- a/src/main/java/ca/bc/gov/api/oracle/legacy/util/ClientMapper.java +++ b/src/main/java/ca/bc/gov/api/oracle/legacy/util/ClientMapper.java @@ -7,18 +7,22 @@ import lombok.NoArgsConstructor; /** - * This is a utility class that provides methods to map ForestClientEntity objects to ClientPublicViewDto and ClientViewDto objects. - * It is annotated with @NoArgsConstructor(access = AccessLevel.PRIVATE) to prevent instantiation of this utility class. + * This is a utility class that provides methods to map ForestClientEntity objects + * to ClientPublicViewDto and ClientViewDto objects. + * It is annotated with @NoArgsConstructor(access = AccessLevel.PRIVATE) to + * prevent instantiation of this utility class. */ @NoArgsConstructor(access = AccessLevel.PRIVATE) public class ClientMapper { /** - * This method maps a ForestClientEntity object to a ClientPublicViewDto object. - * It takes in a ForestClientEntity object and returns a ClientPublicViewDto object with the same client details. + * Maps a {@link ForestClientEntity} object to a {@link ClientPublicViewDto} object. + * This method converts the provided {@link ForestClientEntity} into a {@link ClientPublicViewDto}, + * transferring the relevant client details. * - * @param clientEntity The ForestClientEntity object to be mapped. - * @return A ClientPublicViewDto object with the same client details as the provided ForestClientEntity object. + * @param clientEntity the {@link ForestClientEntity} object to be mapped. + * @return a {@link ClientPublicViewDto} object containing the same client details + * as the provided {@link ForestClientEntity}. */ public static ClientPublicViewDto mapEntityToDto(ForestClientEntity clientEntity) { return ClientPublicViewDto @@ -34,12 +38,15 @@ public static ClientPublicViewDto mapEntityToDto(ForestClientEntity clientEntity } /** - * This method maps a ForestClientEntity object to a ClientPublicViewDto object and sets the count of total matching clients. - * It takes in a ForestClientEntity object and a count of total matching clients and returns a ClientPublicViewDto object with the same client details and the count. + * Maps a {@link ForestClientEntity} object to a {@link ClientPublicViewDto} object and sets the + * count of total matching clients. This method converts the provided {@link ForestClientEntity} + * into a {@link ClientPublicViewDto}, transferring the relevant client details and adding the + * count of total matching clients. * - * @param clientEntity The ForestClientEntity object to be mapped. - * @param count The count of total matching clients. - * @return A ClientPublicViewDto object with the same client details as the provided ForestClientEntity object and the count of total matching clients. + * @param clientEntity the {@link ForestClientEntity} object to be mapped. + * @param count the count of total matching clients. + * @return a {@link ClientPublicViewDto} object containing the same client details as the provided + * {@link ForestClientEntity} and the count of total matching clients. */ public static ClientPublicViewDto mapEntityToDto(ForestClientEntity clientEntity, Long count) { return ClientPublicViewDto From 7304409b85cda7f5daa19d6540af283482c003a3 Mon Sep 17 00:00:00 2001 From: Maria Martinez Date: Thu, 26 Sep 2024 14:53:40 -0700 Subject: [PATCH 3/6] Made code reviews --- .../configuration/MetricConfiguration.java | 36 +++++++++++++++++++ .../legacy/controller/ClientController.java | 4 +-- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/src/main/java/ca/bc/gov/api/oracle/legacy/configuration/MetricConfiguration.java b/src/main/java/ca/bc/gov/api/oracle/legacy/configuration/MetricConfiguration.java index dc36c517..6cbb72ec 100644 --- a/src/main/java/ca/bc/gov/api/oracle/legacy/configuration/MetricConfiguration.java +++ b/src/main/java/ca/bc/gov/api/oracle/legacy/configuration/MetricConfiguration.java @@ -11,6 +11,14 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +/** + * MetricConfiguration sets up custom metrics and configuration for the application's meter + * registry using Micrometer. + * + * It applies common tags to all metrics, configures percentile distribution statistics, + * and manages Prometheus meter registry configuration. This class also provides a + * {@link TimedAspect} bean to support @Timed annotations for methods. + */ @Configuration public class MetricConfiguration { @@ -23,11 +31,23 @@ public class MetricConfiguration { @Value("${info.app.zone}") private String appZone; + /** + * Creates a {@link TimedAspect} bean for timing method executions using the @Timed annotation. + * + * @param registry the {@link MeterRegistry} to register the aspect with. + * @return a {@link TimedAspect} configured to record method execution times. + */ @Bean public TimedAspect timedAspect(MeterRegistry registry) { return new TimedAspect(registry); } + /** + * Adds common tags like version, app name, and zone to all metrics registered with the + * {@link MeterRegistry}. + * + * @return a {@link MeterRegistryCustomizer} to configure common tags and filters for metrics. + */ @Bean public MeterRegistryCustomizer metricsCommonTags() { return registry -> registry.config() @@ -40,15 +60,31 @@ public MeterRegistryCustomizer metricsCommonTags() { .meterFilter(distribution()); } + /** + * Configures the {@link PrometheusMeterRegistry} for use with Prometheus metrics. + * + * @return a {@link MeterRegistryCustomizer} for Prometheus meter registry configuration. + */ @Bean public MeterRegistryCustomizer prometheusConfiguration() { return MeterRegistry::config; } + /** + * Creates a meter filter that ignores the "type" tag in all registered metrics. + * + * @return a {@link MeterFilter} that ignores the "type" tag. + */ public MeterFilter ignoreTag() { return MeterFilter.ignoreTags("type"); } + /** + * Configures a meter filter to enable percentile histograms and track percentiles (0.5, 0.95, + * 0.99) for distribution statistics. + * + * @return a {@link MeterFilter} that configures percentile statistics and enables histograms. + */ public MeterFilter distribution() { return new MeterFilter() { diff --git a/src/main/java/ca/bc/gov/api/oracle/legacy/controller/ClientController.java b/src/main/java/ca/bc/gov/api/oracle/legacy/controller/ClientController.java index 8e58f57a..d40b9a71 100644 --- a/src/main/java/ca/bc/gov/api/oracle/legacy/controller/ClientController.java +++ b/src/main/java/ca/bc/gov/api/oracle/legacy/controller/ClientController.java @@ -105,8 +105,8 @@ public Mono findByClientNumber( */ @GetMapping("/findByClientNumberOrName/{clientNumberOrName}") @Operation( - summary = "Search clients by client number or client name." - + " It will return active and inactive", + summary = "Search clients by client number or client name." + + " It will return active and inactive", responses = { @ApiResponse( responseCode = "200", From 4472b60d5a0c056b07278e9ffdfc02bbba55e637 Mon Sep 17 00:00:00 2001 From: Paulo Gomes da Cruz Junior Date: Thu, 26 Sep 2024 15:15:54 -0700 Subject: [PATCH 4/6] chore: changing ubuntu version --- .github/workflows/pr-open.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 45677636..314d8b7e 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -13,7 +13,7 @@ concurrency: jobs: pr-validation: name: Pull Request Validation - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 permissions: contents: read pull-requests: write @@ -60,7 +60,7 @@ jobs: pr-greeting: name: Greeting - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 permissions: pull-requests: write steps: @@ -100,7 +100,7 @@ jobs: deploy: name: Deploy needs: [build] - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 timeout-minutes: 15 environment: name: dev From cde17917e0eec7ac4feef5c09a86f382c7e42c57 Mon Sep 17 00:00:00 2001 From: Paulo Gomes da Cruz Junior Date: Thu, 26 Sep 2024 15:25:08 -0700 Subject: [PATCH 5/6] chore: changing ubuntu version --- .github/workflows/api-check.yml | 2 +- .github/workflows/merge.yml | 6 +++--- .github/workflows/pr-close.yml | 6 +++--- .github/workflows/reusable-tests-be.yml | 2 +- .github/workflows/reusable-tests-repo.yml | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/api-check.yml b/.github/workflows/api-check.yml index acd38885..7797f3ed 100644 --- a/.github/workflows/api-check.yml +++ b/.github/workflows/api-check.yml @@ -12,7 +12,7 @@ concurrency: jobs: verify-api: name: Verify TEST - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 strategy: matrix: package: [ test, prod ] diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index aeb73adf..42fe7740 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -18,7 +18,7 @@ concurrency: jobs: deploy-test: name: TEST Deployment - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 outputs: tag: ${{ steps.changelog.outputs.tag }} permissions: @@ -87,7 +87,7 @@ jobs: image-promotions: name: Image Promotions needs: [deploy-test] - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 strategy: matrix: tag: [prod, "${{ needs.deploy-test.outputs.tag }}"] @@ -108,7 +108,7 @@ jobs: deploy-prod: name: PROD Deployment needs: [image-promotions] - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 environment: name: prod steps: diff --git a/.github/workflows/pr-close.yml b/.github/workflows/pr-close.yml index 05eeaa4b..8a91dc6c 100644 --- a/.github/workflows/pr-close.yml +++ b/.github/workflows/pr-close.yml @@ -17,7 +17,7 @@ jobs: # Clean up OpenShift when PR closed, no conditions cleanup-openshift: name: Cleanup OpenShift - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 environment: name: dev steps: @@ -33,7 +33,7 @@ jobs: image-promotions: name: Image Promotions if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 steps: - name: Promoting API uses: shrink/actions-docker-registry-tag@v4 @@ -47,7 +47,7 @@ jobs: # Notify when PR merged and branch = main merge-notification: name: Merge Notification - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' steps: - name: Pre-merge update diff --git a/.github/workflows/reusable-tests-be.yml b/.github/workflows/reusable-tests-be.yml index 8299cd62..2d784e7f 100644 --- a/.github/workflows/reusable-tests-be.yml +++ b/.github/workflows/reusable-tests-be.yml @@ -7,7 +7,7 @@ jobs: tests-java: name: Backend Tests if: github.event_name != 'pull_request' || !github.event.pull_request.draft - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 steps: - uses: bcgov-nr/action-test-and-analyse-java@v1.0.2 name: Backend Coverage diff --git a/.github/workflows/reusable-tests-repo.yml b/.github/workflows/reusable-tests-repo.yml index f57c6c1e..e17fb457 100644 --- a/.github/workflows/reusable-tests-repo.yml +++ b/.github/workflows/reusable-tests-repo.yml @@ -7,7 +7,7 @@ jobs: trivy: name: Repository Report if: github.event_name != 'pull_request' || !github.event.pull_request.draft - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - name: Run Trivy vulnerability scanner in repo mode @@ -27,7 +27,7 @@ jobs: codeql: name: Semantic Code Analysis - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 permissions: actions: read contents: read From 7bc088828c3389dcf4bf0f9b406ad0de471c8cdd Mon Sep 17 00:00:00 2001 From: Paulo Gomes da Cruz Junior Date: Thu, 26 Sep 2024 15:27:25 -0700 Subject: [PATCH 6/6] chore: changing ubuntu version --- .github/workflows/api-check.yml | 2 +- .github/workflows/merge.yml | 6 +++--- .github/workflows/pr-close.yml | 6 +++--- .github/workflows/reusable-tests-be.yml | 2 +- .github/workflows/reusable-tests-repo.yml | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/api-check.yml b/.github/workflows/api-check.yml index acd38885..7797f3ed 100644 --- a/.github/workflows/api-check.yml +++ b/.github/workflows/api-check.yml @@ -12,7 +12,7 @@ concurrency: jobs: verify-api: name: Verify TEST - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 strategy: matrix: package: [ test, prod ] diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index aeb73adf..42fe7740 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -18,7 +18,7 @@ concurrency: jobs: deploy-test: name: TEST Deployment - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 outputs: tag: ${{ steps.changelog.outputs.tag }} permissions: @@ -87,7 +87,7 @@ jobs: image-promotions: name: Image Promotions needs: [deploy-test] - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 strategy: matrix: tag: [prod, "${{ needs.deploy-test.outputs.tag }}"] @@ -108,7 +108,7 @@ jobs: deploy-prod: name: PROD Deployment needs: [image-promotions] - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 environment: name: prod steps: diff --git a/.github/workflows/pr-close.yml b/.github/workflows/pr-close.yml index 05eeaa4b..8a91dc6c 100644 --- a/.github/workflows/pr-close.yml +++ b/.github/workflows/pr-close.yml @@ -17,7 +17,7 @@ jobs: # Clean up OpenShift when PR closed, no conditions cleanup-openshift: name: Cleanup OpenShift - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 environment: name: dev steps: @@ -33,7 +33,7 @@ jobs: image-promotions: name: Image Promotions if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 steps: - name: Promoting API uses: shrink/actions-docker-registry-tag@v4 @@ -47,7 +47,7 @@ jobs: # Notify when PR merged and branch = main merge-notification: name: Merge Notification - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' steps: - name: Pre-merge update diff --git a/.github/workflows/reusable-tests-be.yml b/.github/workflows/reusable-tests-be.yml index 8299cd62..2d784e7f 100644 --- a/.github/workflows/reusable-tests-be.yml +++ b/.github/workflows/reusable-tests-be.yml @@ -7,7 +7,7 @@ jobs: tests-java: name: Backend Tests if: github.event_name != 'pull_request' || !github.event.pull_request.draft - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 steps: - uses: bcgov-nr/action-test-and-analyse-java@v1.0.2 name: Backend Coverage diff --git a/.github/workflows/reusable-tests-repo.yml b/.github/workflows/reusable-tests-repo.yml index f57c6c1e..e17fb457 100644 --- a/.github/workflows/reusable-tests-repo.yml +++ b/.github/workflows/reusable-tests-repo.yml @@ -7,7 +7,7 @@ jobs: trivy: name: Repository Report if: github.event_name != 'pull_request' || !github.event.pull_request.draft - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - name: Run Trivy vulnerability scanner in repo mode @@ -27,7 +27,7 @@ jobs: codeql: name: Semantic Code Analysis - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 permissions: actions: read contents: read