From a819796c662f62d3b829bfb2ed620cbc27ca2254 Mon Sep 17 00:00:00 2001 From: josiahzimmerman-caci Date: Mon, 27 Jan 2025 23:10:14 +0000 Subject: [PATCH 01/13] add scripts to path --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6bda2d38ec9..9082889d6da 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -60,7 +60,7 @@ stages: #set safe directory and path .setup_milmove_env: &setup_milmove_env - git config --global --add safe.directory /builds/milmove/mymove - - export PATH=${PATH}:${GOPATH}/bin:~/transcom/mymove/builds/milmove/mymove + - export PATH=${PATH}:${GOPATH}/bin:~/transcom/mymove/builds/milmove/mymove:~/scripts/ - export REACT_APP_ERROR_LOGGING=otel .announce_failure: &announce_failure From 8e519ead76fe0a01b0edd1b86879244be570d0d0 Mon Sep 17 00:00:00 2001 From: josiahzimmerman-caci Date: Mon, 27 Jan 2025 23:42:42 +0000 Subject: [PATCH 02/13] add scripts to path --- .gitlab-ci.yml | 2 +- scripts/psql-wrapper | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9082889d6da..22c2651971e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -60,7 +60,7 @@ stages: #set safe directory and path .setup_milmove_env: &setup_milmove_env - git config --global --add safe.directory /builds/milmove/mymove - - export PATH=${PATH}:${GOPATH}/bin:~/transcom/mymove/builds/milmove/mymove:~/scripts/ + - export PATH=${PATH}:${GOPATH}/bin:~/transcom/mymove/builds/milmove/mymove:/builds/milmove/mymove/scripts - export REACT_APP_ERROR_LOGGING=otel .announce_failure: &announce_failure diff --git a/scripts/psql-wrapper b/scripts/psql-wrapper index 1499958be01..0b7c4ab9f51 100755 --- a/scripts/psql-wrapper +++ b/scripts/psql-wrapper @@ -13,6 +13,8 @@ command="${*:-}" # nix-friendly option if [ -n "${NIX_PROFILE+x}" ]; then psql_exe="/nix/var/nix/profiles/per-user/${LOGNAME}/mymove/bin/psql" +elif [[ $(uname -s) == "Linux" ]]; then + psql_exe="/usr/bin/psql" else # Check if Homebrew is installed and fail with an error message if it isn't for # some reason. From 8734840c4e380d1673a16f86ddb32cef15df14ff Mon Sep 17 00:00:00 2001 From: josiahzimmerman-caci Date: Tue, 28 Jan 2025 01:37:17 +0000 Subject: [PATCH 03/13] test interrupt/remove circle validate pretest --- .gitlab-ci.yml | 12 ++++++++---- .pre-commit-config.yaml | 1 - 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 22c2651971e..d656abaeead 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,10 +34,10 @@ variables: DP3_BRANCH: &dp3_branch placeholder_branch_name # Ignore branches for integration tests - INTEGRATION_IGNORE_BRANCH: &integration_ignore_branch placeholder_branch_name - INTEGRATION_MTLS_IGNORE_BRANCH: &integration_mtls_ignore_branch placeholder_branch_name - CLIENT_IGNORE_BRANCH: &client_ignore_branch placeholder_branch_name - SERVER_IGNORE_BRANCH: &server_ignore_branch placeholder_branch_name + INTEGRATION_IGNORE_BRANCH: &integration_ignore_branch B-22274-cleanup_tests_gitlab + INTEGRATION_MTLS_IGNORE_BRANCH: &integration_mtls_ignore_branch B-22274-cleanup_tests_gitlab + CLIENT_IGNORE_BRANCH: &client_ignore_branch B-22274-cleanup_tests_gitlab + SERVER_IGNORE_BRANCH: &server_ignore_branch B-22274-cleanup_tests_gitlab RUNNER_TAG: &runner_tag milmove DOCKER_RUNNER_TAG: &docker_runner_tag eks_cluster_runner @@ -298,6 +298,7 @@ sast: stage: pre_checks tags: - $RUNNER_TAG + interruptible: true include: - template: Jobs/SAST.gitlab-ci.yml - template: Jobs/Dependency-Scanning.gitlab-ci.yml @@ -336,6 +337,7 @@ anti_virus: # This is needed for things like pdfjs-dist prep_server_hosted_client_deps: stage: pre_checks + interruptible: true tags: - $RUNNER_TAG image: $DOCKER_APP_IMAGE @@ -352,6 +354,7 @@ prep_server_hosted_client_deps: pre_deps_golang: stage: pre_checks + interruptible: true tags: - $RUNNER_TAG image: $DOCKER_APP_IMAGE @@ -383,6 +386,7 @@ pre_deps_golang: pre_deps_yarn: stage: pre_checks + interruptible: true tags: - $RUNNER_TAG image: $DOCKER_APP_IMAGE diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9df9ef29fe7..a3a309e7285 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -160,7 +160,6 @@ repos: hooks: - id: gen-docs args: ['docs/adr'] - - id: circleci-validate - id: markdown-toc - id: hadolint From 94281afa480051e4b32e3022f05aedf90677df30 Mon Sep 17 00:00:00 2001 From: josiahzimmerman-caci Date: Tue, 28 Jan 2025 01:42:18 +0000 Subject: [PATCH 04/13] test interrupt/remove circle validate pretest --- .gitlab-ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d656abaeead..dd9b783fb13 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -417,6 +417,7 @@ check_generated_code: check_tls_certificate_dp3: stage: pre_checks + interruptible: true tags: - $RUNNER_TAG image: $DOCKER_APP_IMAGE # Replace with your appropriate Docker image. @@ -441,6 +442,7 @@ check_tls_certificate_dp3: check_tls_certificate_stg: stage: pre_checks + interruptible: true tags: - $RUNNER_TAG image: $DOCKER_APP_IMAGE @@ -455,6 +457,7 @@ check_tls_certificate_stg: check_tls_certificate_prd: stage: pre_checks + interruptible: true tags: - $RUNNER_TAG image: $DOCKER_APP_IMAGE @@ -469,6 +472,7 @@ check_tls_certificate_prd: build_storybook: stage: build + interruptible: true tags: - $RUNNER_TAG image: $DOCKER_APP_IMAGE @@ -497,6 +501,7 @@ build_storybook: deploy_storybook_dp3: stage: deploy + interruptible: true tags: - $RUNNER_TAG image: $DOCKER_APP_IMAGE @@ -518,6 +523,7 @@ deploy_storybook_dp3: compile_app_client: stage: build + interruptible: true tags: - $RUNNER_TAG image: $DOCKER_APP_IMAGE @@ -550,6 +556,7 @@ compile_app_client: compile_app_server: stage: build + interruptible: true tags: - $RUNNER_TAG image: $DOCKER_APP_IMAGE @@ -598,6 +605,7 @@ compile_app_server: pre_test: stage: test + interruptible: true tags: - $RUNNER_TAG image: $DOCKER_APP_IMAGE @@ -656,6 +664,7 @@ pre_test: server_test: stage: test + interruptible: true tags: - $DOCKER_RUNNER_TAG image: $DOCKER_APP_IMAGE @@ -726,6 +735,7 @@ server_test: server_test_coverage: stage: test + interruptible: true tags: - $RUNNER_TAG image: $DOCKER_APP_IMAGE From b8174ae0683600993b7d55c2325ba812551e75ab Mon Sep 17 00:00:00 2001 From: josiahzimmerman-caci Date: Tue, 28 Jan 2025 01:48:34 +0000 Subject: [PATCH 05/13] test interrupt/remove circle validate pretest --- .gitlab-ci.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dd9b783fb13..fd7fd03b081 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -766,6 +766,7 @@ server_test_coverage: client_test: stage: test + interruptible: true tags: - $RUNNER_TAG image: $DOCKER_APP_IMAGE @@ -802,6 +803,7 @@ client_test: client_test_coverage: stage: test + interruptible: true tags: - $RUNNER_TAG image: $DOCKER_APP_IMAGE @@ -825,6 +827,7 @@ client_test_coverage: integration_test_devseed: stage: test + interruptible: true tags: - $DOCKER_RUNNER_TAG image: $DOCKER_APP_IMAGE @@ -874,6 +877,7 @@ integration_test_devseed: integration_tests: stage: test + interruptible: true tags: - $RUNNER_TAG image: $DOCKER_APP_IMAGE @@ -898,6 +902,7 @@ integration_tests: integration_test_mtls: stage: test + interruptible: true tags: - $DOCKER_RUNNER_TAG image: $DOCKER_APP_IMAGE @@ -950,6 +955,7 @@ integration_test_mtls: integration_test_admin: stage: test + interruptible: true tags: - $DOCKER_RUNNER_TAG image: $DOCKER_APP_IMAGE @@ -1007,6 +1013,7 @@ integration_test_admin: integration_test_my: stage: test + interruptible: true tags: - $DOCKER_RUNNER_TAG image: $DOCKER_APP_IMAGE @@ -1065,6 +1072,7 @@ integration_test_my: integration_test_office: stage: test + interruptible: true tags: - $DOCKER_RUNNER_TAG image: $DOCKER_APP_IMAGE @@ -1125,6 +1133,7 @@ integration_test_office: ############################################################### build_push_app_dp3: stage: push + interruptible: true tags: - $RUNNER_TAG environment: $DP3_ENV @@ -1148,6 +1157,7 @@ build_push_app_dp3: build_push_migrations_dp3: stage: push + interruptible: true tags: - $RUNNER_TAG environment: $DP3_ENV @@ -1171,6 +1181,7 @@ build_push_migrations_dp3: build_push_tasks_dp3: stage: push + interruptible: true tags: - $RUNNER_TAG environment: $DP3_ENV @@ -1194,6 +1205,7 @@ build_push_tasks_dp3: push_otel_collector_image_dp3: stage: push + interruptible: true tags: - $RUNNER_TAG environment: $DP3_ENV @@ -1229,6 +1241,7 @@ push_otel_collector_image_dp3: deploy_migrations_dp3: stage: deploy + resource_group: $DP3_ENV tags: - $RUNNER_TAG environment: $DP3_ENV @@ -1260,6 +1273,7 @@ deploy_migrations_dp3: deploy_tasks_dp3: stage: deploy + resource_group: $DP3_ENV tags: - $RUNNER_TAG environment: $DP3_ENV @@ -1288,6 +1302,7 @@ deploy_tasks_dp3: deploy_app_client_tls_dp3: stage: deploy + resource_group: $DP3_ENV tags: - $RUNNER_TAG environment: $DP3_ENV @@ -1329,6 +1344,7 @@ deploy_app_client_tls_dp3: deploy_app_dp3: stage: deploy + resource_group: $DP3_ENV tags: - $RUNNER_TAG environment: $DP3_ENV @@ -1383,6 +1399,7 @@ deploy_app_dp3: build_push_app_stg: stage: push + interruptible: true tags: - $RUNNER_TAG environment: stg @@ -1406,6 +1423,7 @@ build_push_app_stg: build_push_migrations_stg: stage: push + interruptible: true tags: - $RUNNER_TAG environment: stg @@ -1429,6 +1447,7 @@ build_push_migrations_stg: build_push_tasks_stg: stage: push + interruptible: true tags: - $RUNNER_TAG environment: stg @@ -1452,6 +1471,7 @@ build_push_tasks_stg: push_otel_collector_image_stg: stage: push + interruptible: true tags: - $RUNNER_TAG environment: stg @@ -1487,6 +1507,7 @@ push_otel_collector_image_stg: deploy_migrations_stg: stage: deploy + resource_group: staging tags: - $RUNNER_TAG environment: stg @@ -1518,6 +1539,7 @@ deploy_migrations_stg: deploy_tasks_stg: stage: deploy + resource_group: staging tags: - $RUNNER_TAG environment: stg @@ -1546,6 +1568,7 @@ deploy_tasks_stg: deploy_app_client_tls_stg: stage: deploy + resource_group: staging environment: stg image: name: $DOCKER_APP_IMAGE @@ -1586,6 +1609,7 @@ deploy_app_client_tls_stg: deploy_app_stg: stage: deploy + resource_group: staging tags: - $RUNNER_TAG environment: stg @@ -1640,6 +1664,7 @@ deploy_app_stg: ############################################################################## prod_approval: stage: prod_approval + resource_group: production tags: - $RUNNER_TAG environment: prd_approval @@ -1657,6 +1682,7 @@ prod_approval: build_push_app_prd: stage: push_prd + resource_group: production environment: prd image: name: gcr.io/kaniko-project/executor:v1.14.0-debug @@ -1679,6 +1705,7 @@ build_push_app_prd: build_push_migrations_prd: stage: push_prd + resource_group: production tags: - $RUNNER_TAG environment: prd @@ -1703,6 +1730,7 @@ build_push_migrations_prd: build_push_tasks_prd: stage: push_prd + resource_group: production environment: prd tags: - $RUNNER_TAG @@ -1727,6 +1755,7 @@ build_push_tasks_prd: push_otel_collector_image_prd: stage: push_prd + resource_group: production tags: - $RUNNER_TAG environment: prd @@ -1763,6 +1792,7 @@ push_otel_collector_image_prd: deploy_migrations_prd: stage: deploy_prd + resource_group: production environment: prd tags: - $RUNNER_TAG @@ -1794,6 +1824,7 @@ deploy_migrations_prd: deploy_tasks_prd: stage: deploy_prd + resource_group: production environment: prd tags: - $RUNNER_TAG @@ -1822,6 +1853,7 @@ deploy_tasks_prd: deploy_app_client_tls_prd: stage: deploy_prd + resource_group: production environment: prd tags: - $RUNNER_TAG @@ -1864,6 +1896,7 @@ deploy_app_client_tls_prd: deploy_app_prd: stage: deploy_prd + resource_group: production tags: - $RUNNER_TAG environment: prd From 265ab0b59493459f96117de3802c5864ea2c433e Mon Sep 17 00:00:00 2001 From: josiahzimmerman-caci Date: Tue, 28 Jan 2025 02:02:54 +0000 Subject: [PATCH 06/13] test make file update --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 50282d6aab1..6ea24396bb9 100644 --- a/Makefile +++ b/Makefile @@ -690,7 +690,7 @@ endif .PHONY: db_test_create db_test_create: ## Create Test DB -ifndef CIRCLECI +ifndef GITLAB @echo "Create the ${DB_NAME_TEST} database..." DB_NAME=postgres DB_PORT=$(DB_PORT_TEST) scripts/wait-for-db && \ createdb -p $(DB_PORT_TEST) -h $(DB_HOST) -U postgres $(DB_NAME_TEST) || true From ef113166f358d485537aabb7de9a1008aaf40810 Mon Sep 17 00:00:00 2001 From: josiahzimmerman-caci Date: Tue, 28 Jan 2025 16:46:58 +0000 Subject: [PATCH 07/13] test docker hub --- .gitlab-ci.yml | 57 +++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fd7fd03b081..dfc8aaaf722 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,10 +28,10 @@ variables: GOLANGCI_LINT_VERBOSE: "-v" # Specify the environment: loadtest, demo, exp - DP3_ENV: &dp3_env placeholder_env + DP3_ENV: &dp3_env demo # Specify the branch to deploy TODO: this might be not needed. So far useless - DP3_BRANCH: &dp3_branch placeholder_branch_name + DP3_BRANCH: &dp3_branch B-22274-cleanup_tests_gitlab # Ignore branches for integration tests INTEGRATION_IGNORE_BRANCH: &integration_ignore_branch B-22274-cleanup_tests_gitlab @@ -1204,10 +1204,16 @@ build_push_tasks_dp3: - *check_dp3 push_otel_collector_image_dp3: - stage: push + stage: pre_checks interruptible: true + services: + - name: docker:dind + alias: docker + variables: + DOCKER_HOST: "tcp://docker-backend.gitlab-runner.svc.cluster.local:2375" + DOCKER_TLS_CERTDIR: "" tags: - - $RUNNER_TAG + - $DOCKER_RUNNER_TAG environment: $DP3_ENV before_script: - *setup_aws_vars_dp3 @@ -1215,24 +1221,20 @@ push_otel_collector_image_dp3: image: name: $DOCKER_BASE_IMAGE entrypoint: [""] - needs: - - compile_app_server - - compile_app_client + # needs: + # - compile_app_server + # - compile_app_client script: - - echo "Logging in to DockerHub with Crane..." - - echo "${DOCKERHUB_PASSWORD}" | crane auth login docker.io -u "${DOCKERHUB_USERNAME}" --password-stdin - - - echo "Pulling the AWS OTel Collector image from Dockerhub with Crane..." - - crane pull $ECR_REPOSITORY_OTEL:$OTEL_VERSION image.tar - - - echo "Logging in to AWS ECR with Crane..." - - aws ecr get-login-password --region $AWS_DEFAULT_REGION | crane auth login ${ECR_REPOSITORY_URI} -u AWS --password-stdin - - - echo "Pushing the image to our private ECR using Crane..." - - crane push image.tar ${ECR_REPOSITORY_URI}/otel-collector:${CI_COMMIT_SHORT_SHA} - - - echo "Cleaning up the temporary image file..." - - rm image.tar + - | + aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com + otel_image=$(echo $ECR_REPOSITORY_OTEL:$OTEL_VERSION) + docker pull "${otel_image}" + otel_image_tag=${otel_image#*:} + repo_name=${ECR_REPOSITORY_URI}/otel-collector + image_name="${repo_name}:${otel_image_tag}" + docker pull "${otel_image}" + docker tag "${otel_image}" "${repo_name}:git-${otel_image_tag}-${CI_COMMIT_SHORT_SHA}" + docker push "${repo_name}:git-${otel_image_tag}-${CI_COMMIT_SHORT_SHA}" allow_failure: false after_script: - *announce_failure @@ -1473,7 +1475,7 @@ push_otel_collector_image_stg: stage: push interruptible: true tags: - - $RUNNER_TAG + - $DOCKER_RUNNER_TAG environment: stg image: name: $DOCKER_BASE_IMAGE @@ -1489,16 +1491,13 @@ push_otel_collector_image_stg: - echo "${DOCKERHUB_PASSWORD}" | crane auth login docker.io -u "${DOCKERHUB_USERNAME}" --password-stdin - echo "Pulling the AWS OTel Collector image from Dockerhub with Crane..." - - crane pull $ECR_REPOSITORY_OTEL:$OTEL_VERSION image.tar - + - docker pull $ECR_REPOSITORY_OTEL:$OTEL_VERSION:otel$OTEL_VERSION + - docker tag ${DOCKERHUB_USERNAME}/$OTEL_VERSION:otel$OTEL_VERSION ${ECR_REPOSITORY_URI}/otel-collector:git-otel${CI_COMMIT_SHORT_SHA} - echo "Logging in to AWS ECR with Crane..." - - aws ecr get-login-password --region $AWS_DEFAULT_REGION | crane auth login ${ECR_REPOSITORY_URI} -u AWS --password-stdin + - aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login ${ECR_REPOSITORY_URI}/otel-collector -u AWS --password-stdin - echo "Pushing the image to our private ECR using Crane..." - - crane push image.tar ${ECR_REPOSITORY_URI}/otel-collector:${CI_COMMIT_SHORT_SHA} - - - echo "Cleaning up the temporary image file..." - - rm image.tar + - docker push ${ECR_REPOSITORY_URI}/otel-collector:git-otel${CI_COMMIT_SHORT_SHA} allow_failure: false after_script: - *announce_failure From a0b85f7615f052357ad6dbd9534f5339f658b4c2 Mon Sep 17 00:00:00 2001 From: Paul Stonebraker Date: Tue, 28 Jan 2025 21:14:16 +0000 Subject: [PATCH 08/13] add ppm closeout unassign counselor to move history --- .../FinishDocumentReviewMoves.jsx | 18 ++++++++ .../FinishDocumentReviewMoves.test.jsx | 42 +++++++++++++++++++ .../MoveHistory/EventTemplates/index.js | 1 + 3 files changed, 61 insertions(+) create mode 100644 src/constants/MoveHistory/EventTemplates/FinishDocumentReview/FinishDocumentReviewMoves.jsx create mode 100644 src/constants/MoveHistory/EventTemplates/FinishDocumentReview/FinishDocumentReviewMoves.test.jsx diff --git a/src/constants/MoveHistory/EventTemplates/FinishDocumentReview/FinishDocumentReviewMoves.jsx b/src/constants/MoveHistory/EventTemplates/FinishDocumentReview/FinishDocumentReviewMoves.jsx new file mode 100644 index 00000000000..1764fc61497 --- /dev/null +++ b/src/constants/MoveHistory/EventTemplates/FinishDocumentReview/FinishDocumentReviewMoves.jsx @@ -0,0 +1,18 @@ +import React from 'react'; + +import o from 'constants/MoveHistory/UIDisplay/Operations'; +import a from 'constants/MoveHistory/Database/Actions'; +import t from 'constants/MoveHistory/Database/Tables'; + +export default { + action: a.UPDATE, + eventName: o.finishDocumentReview, + tableName: t.moves, + getEventNameDisplay: () => 'Updated move', + getDetails: ({ changedValues }) => ( + <> +
PPM Closeout Complete
+ {changedValues?.sc_assigned_id !== undefined ?
Closeout Counselor Unassigned
: null} + + ), +}; diff --git a/src/constants/MoveHistory/EventTemplates/FinishDocumentReview/FinishDocumentReviewMoves.test.jsx b/src/constants/MoveHistory/EventTemplates/FinishDocumentReview/FinishDocumentReviewMoves.test.jsx new file mode 100644 index 00000000000..4e43cdca1cf --- /dev/null +++ b/src/constants/MoveHistory/EventTemplates/FinishDocumentReview/FinishDocumentReviewMoves.test.jsx @@ -0,0 +1,42 @@ +import { screen, render } from '@testing-library/react'; + +import e from 'constants/MoveHistory/EventTemplates/FinishDocumentReview/FinishDocumentReviewMoves'; +import getTemplate from 'constants/MoveHistory/TemplateManager'; + +describe('When given a completed services counseling for a move', () => { + const historyRecord = { + action: 'UPDATE', + eventName: 'finishDocumentReview', + tableName: 'moves', + }; + it('correctly matches the update mto status services counseling completed event to the proper template', () => { + const template = getTemplate(historyRecord); + expect(template).toMatchObject(e); + }); + + it('displays the proper name in the event name display column', () => { + const template = getTemplate(historyRecord); + + render(template.getEventNameDisplay(historyRecord)); + expect(screen.getByText('Updated move')).toBeInTheDocument(); + }); + + it('displays default when TIO ID is not present', () => { + const template = getTemplate(historyRecord); + + render(template.getDetails(historyRecord)); + expect(screen.getByText('PPM Closeout Complete')).toBeInTheDocument(); + }); + + it('displays correct details when a TIO is unassigned', () => { + historyRecord.changedValues = { + ...historyRecord.changedValues, + sc_assigned_id: null, + }; + const template = getTemplate(historyRecord); + + render(template.getDetails(historyRecord)); + expect(screen.getByText('PPM Closeout Complete')).toBeInTheDocument(); + expect(screen.getByText('Closeout Counselor Unassigned')).toBeInTheDocument(); + }); +}); diff --git a/src/constants/MoveHistory/EventTemplates/index.js b/src/constants/MoveHistory/EventTemplates/index.js index 9036e31baaf..b729c57984c 100644 --- a/src/constants/MoveHistory/EventTemplates/index.js +++ b/src/constants/MoveHistory/EventTemplates/index.js @@ -115,3 +115,4 @@ export { default as updateAssignedOfficeUser } from './UpdateAssignedOfficeUser/ export { default as deleteAssignedOfficeUser } from './UpdateAssignedOfficeUser/DeleteAssignedOfficeUser'; export { default as UpdatePaymentRequestStatusMoves } from './UpdatePaymentRequestStatus/UpdatePaymentRequestStatusMoves'; export { default as reviewShipmentAddressUpdate } from './ReviewShipmentAddressUpdate/reviewShipmentAddressUpdate'; +export { default as FinishDocumentReviewMoves } from './FinishDocumentReview/FinishDocumentReviewMoves'; From 40fe4e18bb2e2d0258432cb218890fd48afe8ef1 Mon Sep 17 00:00:00 2001 From: josiahzimmerman-caci Date: Wed, 29 Jan 2025 18:32:50 +0000 Subject: [PATCH 09/13] clean up tests --- .gitlab-ci.yml | 12 ++++++------ Makefile | 11 ++++++++++- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dfc8aaaf722..79da8263886 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,16 +28,16 @@ variables: GOLANGCI_LINT_VERBOSE: "-v" # Specify the environment: loadtest, demo, exp - DP3_ENV: &dp3_env demo + DP3_ENV: &dp3_env placeholder_env # Specify the branch to deploy TODO: this might be not needed. So far useless - DP3_BRANCH: &dp3_branch B-22274-cleanup_tests_gitlab + DP3_BRANCH: &dp3_branch placeholder_branch_name # Ignore branches for integration tests - INTEGRATION_IGNORE_BRANCH: &integration_ignore_branch B-22274-cleanup_tests_gitlab - INTEGRATION_MTLS_IGNORE_BRANCH: &integration_mtls_ignore_branch B-22274-cleanup_tests_gitlab - CLIENT_IGNORE_BRANCH: &client_ignore_branch B-22274-cleanup_tests_gitlab - SERVER_IGNORE_BRANCH: &server_ignore_branch B-22274-cleanup_tests_gitlab + INTEGRATION_IGNORE_BRANCH: &integration_ignore_branch placeholder_branch_name + INTEGRATION_MTLS_IGNORE_BRANCH: &integration_mtls_ignore_branch placeholder_branch_name + CLIENT_IGNORE_BRANCH: &client_ignore_branch placeholder_branch_name + SERVER_IGNORE_BRANCH: &server_ignore_branch placeholder_branch_name RUNNER_TAG: &runner_tag milmove DOCKER_RUNNER_TAG: &docker_runner_tag eks_cluster_runner diff --git a/Makefile b/Makefile index 6ea24396bb9..4f43ffbaf3b 100644 --- a/Makefile +++ b/Makefile @@ -41,6 +41,15 @@ ifdef CIRCLECI endif endif +ifdef GITLAB + DB_PORT_DEV=5432 + DB_PORT_TEST=5432 + UNAME_S := $(shell uname -s) + ifeq ($(UNAME_S),Linux) + LDFLAGS=-linkmode external -extldflags -static + endif +endif + ifdef GOLAND GOLAND_GC_FLAGS=all=-N -l endif @@ -690,7 +699,7 @@ endif .PHONY: db_test_create db_test_create: ## Create Test DB -ifndef GITLAB +ifndef CIRCLEI @echo "Create the ${DB_NAME_TEST} database..." DB_NAME=postgres DB_PORT=$(DB_PORT_TEST) scripts/wait-for-db && \ createdb -p $(DB_PORT_TEST) -h $(DB_HOST) -U postgres $(DB_NAME_TEST) || true From 8682c6bce1f64092b53bd486ee305ceca97774ce Mon Sep 17 00:00:00 2001 From: josiahzimmerman-caci Date: Wed, 29 Jan 2025 18:34:20 +0000 Subject: [PATCH 10/13] typo --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4f43ffbaf3b..6d3f51056fd 100644 --- a/Makefile +++ b/Makefile @@ -699,7 +699,7 @@ endif .PHONY: db_test_create db_test_create: ## Create Test DB -ifndef CIRCLEI +ifndef CIRCLECI @echo "Create the ${DB_NAME_TEST} database..." DB_NAME=postgres DB_PORT=$(DB_PORT_TEST) scripts/wait-for-db && \ createdb -p $(DB_PORT_TEST) -h $(DB_HOST) -U postgres $(DB_NAME_TEST) || true From f17dea2a6c21de9ad32165c40642bc699956a603 Mon Sep 17 00:00:00 2001 From: josiahzimmerman-caci Date: Wed, 29 Jan 2025 18:41:54 +0000 Subject: [PATCH 11/13] clean up merge --- .gitlab-ci.yml | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 422a174ea40..6ff130ec1cc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1204,16 +1204,10 @@ build_push_tasks_dp3: - *check_dp3 push_otel_collector_image_dp3: - stage: pre_checks + stage: push interruptible: true - services: - - name: docker:dind - alias: docker - variables: - DOCKER_HOST: "tcp://docker-backend.gitlab-runner.svc.cluster.local:2375" - DOCKER_TLS_CERTDIR: "" tags: - - $DOCKER_RUNNER_TAG + - $RUNNER_TAG environment: $DP3_ENV before_script: - *setup_aws_vars_dp3 @@ -1221,9 +1215,9 @@ push_otel_collector_image_dp3: image: name: $DOCKER_BASE_IMAGE entrypoint: [""] - # needs: - # - compile_app_server - # - compile_app_client + needs: + - compile_app_server + - compile_app_client script: - echo "Logging in to Amazon ECR with Crane..." - aws ecr get-login-password --region ${AWS_REGION} | crane auth login ${ECR_REPOSITORY_URI} -u AWS --password-stdin @@ -1476,7 +1470,7 @@ push_otel_collector_image_stg: stage: push interruptible: true tags: - - $DOCKER_RUNNER_TAG + - $RUNNER_TAG environment: stg image: name: $DOCKER_BASE_IMAGE @@ -1495,7 +1489,10 @@ push_otel_collector_image_stg: - crane pull --insecure public.ecr.aws/aws-observability/aws-otel-collector:v0.31.0 image.tar - echo "Pushing the image to our private ECR using Crane..." - - docker push ${ECR_REPOSITORY_URI}/otel-collector:git-otel${CI_COMMIT_SHORT_SHA} + - crane push image.tar ${ECR_REPOSITORY_URI}/otel-collector:${CI_COMMIT_SHORT_SHA} + + - echo "Cleaning up the temporary image file..." + - rm image.tar allow_failure: false after_script: - *announce_failure From a042c41103a3da21b3d0a17ac3caf0df9c4b7f52 Mon Sep 17 00:00:00 2001 From: josiahzimmerman-caci Date: Wed, 29 Jan 2025 13:15:32 -0600 Subject: [PATCH 12/13] stop main circle pushes --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3de527917db..6d154602cf7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2614,28 +2614,28 @@ workflows: - compile_app_server filters: branches: - only: main + only: nolonger_main - push_app_stg: requires: - build_app filters: branches: - only: main + only: nolonger_main - push_migrations_stg: requires: - build_migrations filters: branches: - only: main + only: nolonger_main - push_tasks_stg: requires: - build_tasks filters: branches: - only: main + only: nolonger_main - check_circle_against_stg_sha: requires: From 7e6460b7767ab9dcf2b254d9f01e0a0071e97690 Mon Sep 17 00:00:00 2001 From: Paul Stonebraker Date: Thu, 30 Jan 2025 16:54:53 +0000 Subject: [PATCH 13/13] update FinishDocumentReviewMove test --- .../FinishDocumentReview/FinishDocumentReviewMoves.test.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/constants/MoveHistory/EventTemplates/FinishDocumentReview/FinishDocumentReviewMoves.test.jsx b/src/constants/MoveHistory/EventTemplates/FinishDocumentReview/FinishDocumentReviewMoves.test.jsx index 4e43cdca1cf..967f33d05e2 100644 --- a/src/constants/MoveHistory/EventTemplates/FinishDocumentReview/FinishDocumentReviewMoves.test.jsx +++ b/src/constants/MoveHistory/EventTemplates/FinishDocumentReview/FinishDocumentReviewMoves.test.jsx @@ -21,14 +21,15 @@ describe('When given a completed services counseling for a move', () => { expect(screen.getByText('Updated move')).toBeInTheDocument(); }); - it('displays default when TIO ID is not present', () => { + it('displays default when SC ID is not present', () => { const template = getTemplate(historyRecord); render(template.getDetails(historyRecord)); expect(screen.getByText('PPM Closeout Complete')).toBeInTheDocument(); + expect(screen.queryByText('Closeout Counselor Unassigned')).not.toBeInTheDocument(); }); - it('displays correct details when a TIO is unassigned', () => { + it('displays correct details when a SC is unassigned', () => { historyRecord.changedValues = { ...historyRecord.changedValues, sc_assigned_id: null,