Skip to content

Commit

Permalink
Merge branch 'main' into B-20034
Browse files Browse the repository at this point in the history
  • Loading branch information
CoryKleinjanCACI authored May 10, 2024
2 parents 05c0304 + 528d5ae commit c5060cf
Show file tree
Hide file tree
Showing 36 changed files with 199 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apt-get install -y ca-certificates --no-install-recommends
RUN update-ca-certificates

# hadolint ignore=DL3007
FROM gcr.io/distroless/base:latest@sha256:9bc3117a99c731a41200a28774405125cb6fbda1819f4a1af88bd3bfad5dcf32
FROM gcr.io/distroless/base-debian11@sha256:2fb55308ef768a0ca0851f294d7f5b582579dba6522d1d2162e2d5f33b876e97
COPY --from=build-env /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt

COPY bin/rds-ca-rsa4096-g1.pem /bin/rds-ca-rsa4096-g1.pem
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dp3
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# hadolint ignore=DL3007
FROM gcr.io/distroless/base:latest@sha256:9bc3117a99c731a41200a28774405125cb6fbda1819f4a1af88bd3bfad5dcf32
FROM gcr.io/distroless/base-debian11@sha256:2fb55308ef768a0ca0851f294d7f5b582579dba6522d1d2162e2d5f33b876e97

#AWS GovCloud RDS cert
COPY bin/rds-ca-rsa4096-g1.pem /bin/rds-ca-rsa4096-g1.pem
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN rm -f bin/milmove && make bin/milmove
#########

# hadolint ignore=DL3007
FROM gcr.io/distroless/base:latest@sha256:9bc3117a99c731a41200a28774405125cb6fbda1819f4a1af88bd3bfad5dcf32
FROM gcr.io/distroless/base-debian11@sha256:2fb55308ef768a0ca0851f294d7f5b582579dba6522d1d2162e2d5f33b876e97

COPY --from=builder --chown=root:root /home/circleci/project/bin/rds-ca-rsa4096-g1.pem /bin/rds-ca-rsa4096-g1.pem
COPY --from=builder --chown=root:root /home/circleci/project/bin/rds-ca-2019-root.pem /bin/rds-ca-2019-root.pem
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.reviewapp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ RUN set -x \
#########

# hadolint ignore=DL3007
FROM gcr.io/distroless/base:latest@sha256:9bc3117a99c731a41200a28774405125cb6fbda1819f4a1af88bd3bfad5dcf32 as milmove
FROM gcr.io/distroless/base-debian11@sha256:2fb55308ef768a0ca0851f294d7f5b582579dba6522d1d2162e2d5f33b876e97 as milmove

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.tasks
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apt-get install -y ca-certificates --no-install-recommends
RUN update-ca-certificates

# hadolint ignore=DL3007
FROM gcr.io/distroless/base:latest@sha256:9bc3117a99c731a41200a28774405125cb6fbda1819f4a1af88bd3bfad5dcf32
FROM gcr.io/distroless/base-debian11@sha256:2fb55308ef768a0ca0851f294d7f5b582579dba6522d1d2162e2d5f33b876e97
COPY --from=build-env /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt

COPY config/tls/milmove-cert-bundle.p7b /config/tls/milmove-cert-bundle.p7b
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.tasks_dp3
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# hadolint ignore=DL3007
FROM gcr.io/distroless/base:latest@sha256:9bc3117a99c731a41200a28774405125cb6fbda1819f4a1af88bd3bfad5dcf32
FROM gcr.io/distroless/base-debian11@sha256:2fb55308ef768a0ca0851f294d7f5b582579dba6522d1d2162e2d5f33b876e97

# Demo Environment Certs
COPY config/tls/api.demo.dp3.us.chain.der.p7b /config/tls/api.demo.dp3.us.chain.der.p7b
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.tasks_local
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN rm -f bin/milmove-tasks && make bin/milmove-tasks
#########

# hadolint ignore=DL3007
FROM gcr.io/distroless/base:latest@sha256:9bc3117a99c731a41200a28774405125cb6fbda1819f4a1af88bd3bfad5dcf32
FROM gcr.io/distroless/base-debian11@sha256:2fb55308ef768a0ca0851f294d7f5b582579dba6522d1d2162e2d5f33b876e97

COPY --from=builder --chown=root:root /home/circleci/project/config/tls/milmove-cert-bundle.p7b /config/tls/milmove-cert-bundle.p7b
COPY --from=builder --chown=root:root /home/circleci/project/bin/rds-ca-2019-root.pem /bin/rds-ca-2019-root.pem
Expand Down
2 changes: 2 additions & 0 deletions migrations/app/migrations_manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -919,8 +919,10 @@
20240402155228_updateLongBeachGbloc.up.sql
20240402192009_add_shipment_locator_and_shipment_seq_num.up.sql
20240403172437_backfill_counties_again.up.sql
20240404152441_add_gun_safe_to_entitlements.up.sql
20240405190435_add_safety_privilege.up.sql
20240411201158_add_application_parameter_and_validation_code_table.up.sql
20240412201837_edit_gun_safe_entitlement_not_null.up.sql
20240416145256_update_safety_privilege_label.up.sql
20240502183613_add_support_for_standalone_payment_cap.up.sql
20240503123556_add_diversion_reason_to_mto_shipments.up.sql
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- Adds new column to entitlements table
-- allows customer to move a gun safe with their move.
ALTER TABLE entitlements
ADD COLUMN IF NOT EXISTS gun_safe BOOLEAN DEFAULT FALSE;

-- Comments on new column
COMMENT ON COLUMN entitlements.gun_safe IS 'True if customer is entitled to move a gun safe up to 500 lbs without it being charged against their authorized weight allowance.';
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- COALESCE makes sure that any currently NULL gun_safe values are converted to false before setting to NOT NULL.
ALTER TABLE entitlements
ALTER COLUMN gun_safe TYPE boolean USING (COALESCE(gun_safe, false)),
ALTER COLUMN gun_safe SET DEFAULT false,
ALTER COLUMN gun_safe SET NOT NULL;
28 changes: 28 additions & 0 deletions pkg/gen/ghcapi/embedded_spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pkg/gen/ghcmessages/counseling_update_allowance_payload.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions pkg/gen/ghcmessages/entitlements.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pkg/gen/ghcmessages/update_allowance_payload.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions pkg/gen/primeapi/embedded_spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions pkg/gen/primemessages/entitlements.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions pkg/gen/primev2api/embedded_spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions pkg/gen/primev2messages/entitlements.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions pkg/gen/primev3api/embedded_spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions pkg/gen/primev3messages/entitlements.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions pkg/gen/supportapi/embedded_spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions pkg/gen/supportmessages/entitlement.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion pkg/handlers/ghcapi/internal/payloads/model_to_payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ func Entitlement(entitlement *models.Entitlement) *ghcmessages.Entitlements {
totalDependents = int64(*entitlement.TotalDependents)
}
requiredMedicalEquipmentWeight := int64(entitlement.RequiredMedicalEquipmentWeight)
gunSafe := entitlement.GunSafe
return &ghcmessages.Entitlements{
ID: strfmt.UUID(entitlement.ID.String()),
AuthorizedWeight: authorizedWeight,
Expand All @@ -629,7 +630,8 @@ func Entitlement(entitlement *models.Entitlement) *ghcmessages.Entitlements {
TotalWeight: totalWeight,
RequiredMedicalEquipmentWeight: requiredMedicalEquipmentWeight,
OrganizationalClothingAndIndividualEquipment: entitlement.OrganizationalClothingAndIndividualEquipment,
ETag: etag.GenerateEtag(entitlement.UpdatedAt),
GunSafe: gunSafe,
ETag: etag.GenerateEtag(entitlement.UpdatedAt),
}
}

Expand Down
1 change: 1 addition & 0 deletions pkg/handlers/primeapi/payloads/model_to_payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ func Entitlement(entitlement *models.Entitlement) *primemessages.Entitlements {
ID: strfmt.UUID(entitlement.ID.String()),
AuthorizedWeight: authorizedWeight,
DependentsAuthorized: entitlement.DependentsAuthorized,
GunSafe: entitlement.GunSafe,
NonTemporaryStorage: entitlement.NonTemporaryStorage,
PrivatelyOwnedVehicle: entitlement.PrivatelyOwnedVehicle,
ProGearWeight: int64(entitlement.ProGearWeight),
Expand Down
1 change: 1 addition & 0 deletions pkg/handlers/primeapiv2/payloads/model_to_payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ func Entitlement(entitlement *models.Entitlement) *primev2messages.Entitlements
ID: strfmt.UUID(entitlement.ID.String()),
AuthorizedWeight: authorizedWeight,
DependentsAuthorized: entitlement.DependentsAuthorized,
GunSafe: entitlement.GunSafe,
NonTemporaryStorage: entitlement.NonTemporaryStorage,
PrivatelyOwnedVehicle: entitlement.PrivatelyOwnedVehicle,
ProGearWeight: int64(entitlement.ProGearWeight),
Expand Down
1 change: 1 addition & 0 deletions pkg/models/ghc_entitlements.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type Entitlement struct {
DBAuthorizedWeight *int `db:"authorized_weight"`
WeightAllotted *WeightAllotment `db:"-"`
StorageInTransit *int `db:"storage_in_transit"`
GunSafe bool `db:"gun_safe"`
RequiredMedicalEquipmentWeight int `db:"required_medical_equipment_weight"`
OrganizationalClothingAndIndividualEquipment bool `db:"organizational_clothing_and_individual_equipment"`
ProGearWeight int `db:"pro_gear_weight"`
Expand Down
Loading

0 comments on commit c5060cf

Please sign in to comment.