Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into b-20631-upgrade-go-1.…
Browse files Browse the repository at this point in the history
…23.0-nodejs-18.20.4-main
  • Loading branch information
cameroncaci committed Sep 25, 2024
2 parents 800aaad + e0d4daf commit 39831ff
Show file tree
Hide file tree
Showing 128 changed files with 2,808 additions and 710 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1554,7 +1554,7 @@ jobs:
# Use the BuildNum to update the cache key so that the
# coverage cache is always updated
- save_cache:
key: v7-server-tests-coverage-{{ .BuildNum }}
key: v8-server-tests-coverage-{{ .BuildNum }}
paths:
- ~/transcom/mymove/tmp/baseline-go-coverage
when: always
Expand Down Expand Up @@ -1684,7 +1684,7 @@ jobs:
# Use the BuildNum to update the cache key so that the
# coverage cache is always updated
- save_cache:
key: v5-client-tests-coverage-{{ .BuildNum }}
key: v6-client-tests-coverage-{{ .BuildNum }}
paths:
- ~/transcom/mymove/tmp/baseline-jest-coverage
when: always
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.e2e
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.20.2
FROM alpine:3.20.3

# hadolint ignore=DL3017
RUN apk upgrade --no-cache busybox
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.migrations
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.20.2
FROM alpine:3.20.3

# hadolint ignore=DL3017
RUN apk upgrade --no-cache busybox
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.migrations_local
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN rm -f bin/milmove && make bin/milmove
# FINAL #
#########

FROM alpine:3.20.2
FROM alpine:3.20.3

# hadolint ignore=DL3017
RUN apk upgrade --no-cache busybox
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.reviewapp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ RUN set -x \
&& make bin/generate-test-data

# define migrations before client build since it doesn't need client
FROM alpine:3.20.2 as migrate
FROM alpine:3.20.3 as migrate

COPY --from=server_builder /build/bin/rds-ca-2019-root.pem /bin/rds-ca-2019-root.pem
COPY --from=server_builder /build/bin/milmove /bin/milmove
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.tools
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.20.2
FROM alpine:3.20.3

# hadolint ignore=DL3017
RUN apk upgrade --no-cache busybox
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.tools_local
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN rm -f bin/prime-api-client && make bin/prime-api-client
# FINAL #
#########

FROM alpine:3.20.2
FROM alpine:3.20.3

# hadolint ignore=DL3017
RUN apk upgrade --no-cache busybox
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

[![GoDoc](https://godoc.org/github.com/transcom/mymove?status.svg)](https://godoc.org/github.com/transcom/mymove)

This repository contains the application source code for the Personal Property Prototype, a possible next generation version of the Defense Personal Property System (DPS). DPS is an online system managed by the U.S. [Department of Defense](https://www.defense.gov/) (DoD) [Transportation Command](http://www.ustranscom.mil/) (USTRANSCOM) and is used by service members and their families to manage household goods moves.
This repository contains the application source code for the MilMove application, the next generation version of the Defense Personal Property System (DPS). DPS is an online system managed by the U.S. [Department of Defense](https://www.defense.gov/) (DoD) [Transportation Command](http://www.ustranscom.mil/) (USTRANSCOM) and is used by service members and their families to manage household goods moves.

This prototype was built by a [Defense Digital Service](https://www.dds.mil/) team in support of USTRANSCOM's mission.

## License Information

Expand Down
4 changes: 4 additions & 0 deletions migrations/app/migrations_manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -994,3 +994,7 @@
20240819164156_update_pws_violations_pt3.up.sql
20240820125856_allow_pptas_migration.up.sql
20240820151043_add_gsr_role.up.sql
20240822180409_adding_locked_price_cents_service_param.up.sql
20240909194514_pricing_unpriced_ms_cs_service_items.up.sql
20240910021542_populating_locked_price_cents_from_pricing_estimate_for_ms_and_cs_service_items.up.sql
20240917132411_update_provides_ppm_closeout_transportation_offices.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
INSERT INTO service_item_param_keys
(id,key,description,type,origin,created_at,updated_at)
SELECT '7ec5cf87-a446-4dd6-89d3-50bbc0d2c206','LockedPriceCents', 'Locked price when move was made available to prime', 'INTEGER', 'SYSTEM', now(), now()
WHERE NOT EXISTS
(SELECT 1
FROM service_item_param_keys s
WHERE s.id = '7ec5cf87-a446-4dd6-89d3-50bbc0d2c206'
);

INSERT INTO service_params
(id,service_id,service_item_param_key_id,created_at,updated_at,is_optional)
SELECT '22056106-bbde-4ae7-b5bd-e7d2f103ab7d',(SELECT id FROM re_services WHERE code='MS'),(SELECT id FROM service_item_param_keys where key='LockedPriceCents'), now(), now(), 'false'
WHERE NOT EXISTS
( SELECT 1
FROM service_params s
WHERE s.id = '22056106-bbde-4ae7-b5bd-e7d2f103ab7d'
);

INSERT INTO service_params
(id,service_id,service_item_param_key_id,created_at,updated_at,is_optional)
SELECT '86f8c20c-071e-4715-b0c1-608f540b3be3',(SELECT id FROM re_services WHERE code='CS'),(SELECT id FROM service_item_param_keys where key='LockedPriceCents'), now(), now(), 'false'
WHERE NOT EXISTS
( SELECT 1
FROM service_params s
WHERE s.id = '86f8c20c-071e-4715-b0c1-608f540b3be3'
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-- Filling in pricing_estimates for unprices services code MS and CS service items. Service items should not be able to reach this state
-- but some older data exists where unpriced MS and CS items exist
SET statement_timeout = 300000;
SET lock_timeout = 300000;
SET idle_in_transaction_session_timeout = 300000;

UPDATE mto_service_items AS ms
SET locked_price_cents =
CASE
when price_cents > 0 AND (s.code = 'MS' OR s.code = 'CS') AND ms.re_service_id = s.id then price_cents
when price_cents = 0 AND (s.code = 'MS' OR s.code = 'CS') AND ms.re_service_id = s.id then 0
END,
pricing_estimate =
CASE
when price_cents > 0 AND (s.code = 'MS' OR s.code = 'CS') AND ms.re_service_id = s.id then price_cents
when price_cents = 0 AND (s.code = 'MS' OR s.code = 'CS') AND ms.re_service_id = s.id then 0
END
FROM re_task_order_fees AS tf
JOIN re_services AS s
ON tf.service_id = s.id
JOIN re_contract_years AS cy
ON tf.contract_year_id = cy.id
JOIN re_contracts AS ct
ON cy.contract_id = ct.id
JOIN mto_service_items AS msi
ON s.id = msi.re_service_id
JOIN moves AS mo
ON mo.id = msi.move_id
WHERE (s.code = 'MS' OR s.code = 'CS') AND (mo.available_to_prime_at BETWEEN cy.start_date AND cy.end_date) AND ms.re_service_id = s.id AND ms.locked_price_cents is null AND ms.pricing_estimate is null;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- Customer directed that the current pricing_estimate should be saved as the locked_price for MS and CS
SET statement_timeout = 300000;
SET lock_timeout = 300000;
SET idle_in_transaction_session_timeout = 300000;

UPDATE mto_service_items AS ms
SET locked_price_cents = pricing_estimate
FROM re_services AS r
WHERE ms.re_service_id = r.id AND (r.code = 'MS' OR r.code = 'CS')
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-- PPPO Fort Belvoir - USA
UPDATE transportation_offices SET provides_ppm_closeout = true WHERE id = 'a877a317-be5f-482b-a126-c91a34be9290';

-- Personal Property Activity HQ (PPA HQ) - USAF
UPDATE transportation_offices SET provides_ppm_closeout = false WHERE id = 'ebdacf64-353a-4014-91db-0d04d88320f0';

-- PPPO Base Miami - USCG
UPDATE transportation_offices SET provides_ppm_closeout = true WHERE id = '1b3e7496-efa7-48aa-ba22-b630d6fea98b';

-- JPPSO - North West (JEAT) - USA
UPDATE transportation_offices SET provides_ppm_closeout = false WHERE id = '5a3388e1-6d46-4639-ac8f-a8937dc26938';

-- PPPO NSWC Panama City Division - USN
UPDATE transportation_offices SET provides_ppm_closeout = true WHERE id = '57cf1e81-8113-4a52-bc50-3cb8902c2efd';

-- JPPSO - Mid Atlantic (BGAC) - USA
UPDATE transportation_offices SET provides_ppm_closeout = false WHERE id = '8e25ccc1-7891-4146-a9d0-cd0d48b59a50';

-- JPPSO - South West (LKNQ) - USN
UPDATE transportation_offices SET provides_ppm_closeout = false WHERE id = '27002d34-e9ea-4ef5-a086-f23d07c4088c';
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"test": "react-app-rewired test --env=jsdom",
"test:debug": "react-app-rewired --inspect-brk test --runInBand --env=jsdom",
"test:coverage": "react-app-rewired test --coverage --reporters=default --reporters=jest-junit --env=jsdom --coverageDirectory=coverage --maxWorkers=4 --watchAll=false",
"test:e2e": "playwright test --trace=on",
"test:e2e": "A11Y_AUDIT=true playwright test --trace=on",
"prettier": "prettier --write --loglevel warn 'src/**/*.{js,jsx}' playwright/tests/**/*.js'",
"prettier-ci": "prettier --check 'src/**/*.{js,jsx}' playwright/tests/**/*.js",
"lint": "eslint --ext .js,.jsx --max-warnings=0 src playwright/tests",
Expand Down
16 changes: 14 additions & 2 deletions pkg/factory/mto_service_item_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/transcom/mymove/pkg/models"
"github.com/transcom/mymove/pkg/testdatagen"
"github.com/transcom/mymove/pkg/unit"
)

type mtoServiceItemBuildType byte
Expand Down Expand Up @@ -56,6 +57,8 @@ func buildMTOServiceItemWithBuildType(db *pop.Connection, customs []Customizatio

requestedApprovalsRequestedStatus := false

var lockedPriceCents = unit.Cents(12303)

// Create default MTOServiceItem
mtoServiceItem := models.MTOServiceItem{
MoveTaskOrder: move,
Expand All @@ -67,6 +70,7 @@ func buildMTOServiceItemWithBuildType(db *pop.Connection, customs []Customizatio
Status: models.MTOServiceItemStatusSubmitted,
RequestedApprovalsRequestedStatus: &requestedApprovalsRequestedStatus,
CustomerExpense: isCustomerExpense,
LockedPriceCents: &lockedPriceCents,
}

// only set SITOriginHHGOriginalAddress if a customization is provided
Expand Down Expand Up @@ -341,15 +345,23 @@ var (
Type: models.ServiceItemParamTypeString,
Origin: models.ServiceItemParamOriginPrime,
}
paramLockedPriceCents = models.ServiceItemParamKey{
Key: models.ServiceItemParamNameLockedPriceCents,
Description: "locked price cents",
Type: models.ServiceItemParamTypeInteger,
Origin: models.ServiceItemParamOriginSystem,
}
fixtureServiceItemParamsMap = map[models.ReServiceCode]models.ServiceItemParamKeys{
models.ReServiceCodeCS: {
paramContractCode,
paramMTOAvailableAToPrimeAt,
paramContractCode,
paramLockedPriceCents,
paramPriceRateOrFactor,
},
models.ReServiceCodeMS: {
paramContractCode,
paramMTOAvailableAToPrimeAt,
paramContractCode,
paramLockedPriceCents,
paramPriceRateOrFactor,
},
models.ReServiceCodeDLH: {
Expand Down
5 changes: 5 additions & 0 deletions pkg/gen/ghcapi/configure_mymove.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ func configureAPI(api *ghcoperations.MymoveAPI) http.Handler {
return middleware.NotImplemented("operation report_violations.AssociateReportViolations has not yet been implemented")
})
}
if api.PaymentRequestsBulkDownloadHandler == nil {
api.PaymentRequestsBulkDownloadHandler = payment_requests.BulkDownloadHandlerFunc(func(params payment_requests.BulkDownloadParams) middleware.Responder {
return middleware.NotImplemented("operation payment_requests.BulkDownload has not yet been implemented")
})
}
if api.OrderCounselingUpdateAllowanceHandler == nil {
api.OrderCounselingUpdateAllowanceHandler = order.CounselingUpdateAllowanceHandlerFunc(func(params order.CounselingUpdateAllowanceParams) middleware.Responder {
return middleware.NotImplemented("operation order.CounselingUpdateAllowance has not yet been implemented")
Expand Down
Loading

0 comments on commit 39831ff

Please sign in to comment.