Skip to content

Commit

Permalink
Merge branch 'main' into B-19181-Create-PPTAS-API
Browse files Browse the repository at this point in the history
  • Loading branch information
joeydoyecaci committed May 16, 2024
2 parents 52d99ed + bbd3295 commit 53fe4a3
Show file tree
Hide file tree
Showing 440 changed files with 7,764 additions and 2,254 deletions.
14 changes: 9 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ version: 2.1

# References for variables shared across the file
references:
circleci-docker: &circleci-docker milmove/circleci-docker:milmove-app-726bfe44bd27d3b41da41acbe3eb231811a993f7
circleci-docker: &circleci-docker milmove/circleci-docker:milmove-app-ab729849a08a773ea2557b19b67f378551d1ad3d

# the playwright image to use
playwright: &playwright cimg/node:18.13.0-browsers
Expand Down Expand Up @@ -277,13 +277,13 @@ commands:
- create_dot_go_version
- restore_cache:
keys:
- go-mod-sources-v5-{{ checksum "go.sum" }}-{{ checksum ".go-version" }}
- go-mod-sources-v7-{{ checksum "go.sum" }}-{{ checksum ".go-version" }}

save_cache_for_go:
steps:
- create_dot_go_version
- save_cache:
key: go-mod-sources-v5-{{ checksum "go.sum" }}-{{ checksum ".go-version" }}
key: go-mod-sources-v7-{{ checksum "go.sum" }}-{{ checksum ".go-version" }}
paths:
- '~/go'
- '~/transcom/mymove/bin/swagger'
Expand Down Expand Up @@ -867,6 +867,8 @@ commands:
export FEATURE_FLAG_NTSR=true
export FEATURE_FLAG_CAC_VALIDATED_LOGIN=false
export FEATURE_FLAG_VALIDATION_CODE_REQUIRED=false
export FEATURE_FLAG_MOVE_LOCK=false
export FEATURE_FLAG_OKTA_DODID_INPUT=false
# disable for speed, playwright tests can fail otherwise
export DB_DEBUG=false
Expand Down Expand Up @@ -897,6 +899,8 @@ commands:
FEATURE_FLAG_NTSR: 'true'
FEATURE_FLAG_CAC_VALIDATED_LOGIN: 'false'
FEATURE_FLAG_VALIDATION_CODE_REQUIRED: 'false'
FEATURE_FLAG_MOVE_LOCK: 'false'
FEATURE_FLAG_OKTA_DODID_INPUT: 'false'
command: |
SHARD=$((${CIRCLE_NODE_INDEX}+1))
PLAYWRIGHT_JUNIT_OUTPUT_NAME=playwright-results.xml \
Expand Down Expand Up @@ -1267,7 +1271,7 @@ jobs:
#
# The trailing hyphen in restore_cache seems important
# according to the page linked above
- v17-spectral-lint-
- v20-spectral-lint-
- run:
name: Save Baseline Spectral Lint
command: |
Expand Down Expand Up @@ -1326,7 +1330,7 @@ jobs:
# Use the BuildNum to update the cache key so that the
# coverage cache is always updated
- save_cache:
key: v17-spectral-lint-{{ .BuildNum }}
key: v20-spectral-lint-{{ .BuildNum }}
paths:
- ~/transcom/mymove/spectral
- store_artifacts:
Expand Down
2 changes: 2 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ export DB_SSL_MODE=disable
export FEATURE_FLAG_MULTI_MOVE=true
export FEATURE_FLAG_COUNSELOR_MOVE_CREATE=true
export FEATURE_FLAG_VALIDATION_CODE_REQUIRED=false
export FEATURE_FLAG_MOVE_LOCK=false
export FEATURE_FLAG_OKTA_DODID_INPUT=false

# Feature flags to disable certain shipment types
export FEATURE_FLAG_PPM=true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go-auto-approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: setup go
uses: actions/setup-go@v5
with:
go-version: '1.20.6'
go-version: '1.22.2'
- name: Tidy
run: |
go version
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ playwright-results.xml
!pkg/parser/pricing/fixtures/8_2c_domestic_other_prices_sit_golden.csv
!pkg/parser/pricing/fixtures/pricing_template_2019-09-19_fake-data.xlsx
!pkg/parser/transittime/fixtures/Appendix_C(i)_-_Transit_Time_Tables_Fake_Data.xlsx
!pkg/testdatagen/testdata/Weight Estimator Full.xlsx
!pkg/testdatagen/testdata/Weight Estimator.xlsx
!pkg/testdatagen/testdata/Weight Estimator.xls
!pkg/testdatagen/testdata/test.xls
Expand Down
18 changes: 11 additions & 7 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
---
linters-settings:
revive:
rules:
- name: indent-error-flow
disabled: true
- name: superfluous-else
disabled: true

gci:
sections:
- standard
Expand Down Expand Up @@ -32,8 +39,6 @@ linters-settings:
- github.com/benbjohnson/clock
reason: facebookgo/clock is archived and inactive, recommend using original fork
repo
govet:
check-shadowing: true
linters:
enable:
- errcheck
Expand All @@ -47,17 +52,16 @@ linters:
- ineffassign
- revive
- staticcheck
- typecheck
#- typecheck
- unused
fast: false
issues:
fix: true
exclude-dirs:
- pkg/gen
- .*mocks
run:
timeout: 8m
concurrency: 1
issues-exit-code: 1
tests: true
skip-dirs:
- pkg/gen
- .*mocks
skip-dirs-use-default: true
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.13.0
18.20.2
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ repos:
exclude: ^public/swagger-ui/

- repo: https://github.com/golangci/golangci-lint
rev: v1.53.3
rev: v1.57.2
hooks:
- id: golangci-lint
entry: bash -c 'exec golangci-lint run ${GOLANGCI_LINT_VERBOSE} -j=${GOLANGCI_LINT_CONCURRENCY:-1}' # custom bash so we can override concurrency for faster dev runs
Expand Down
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
golang 1.20.6
nodejs 18.13.0
golang 1.22.2
nodejs 18.20.2
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
4 changes: 2 additions & 2 deletions Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# BUILDER #
###########

FROM milmove/circleci-docker:milmove-app-726bfe44bd27d3b41da41acbe3eb231811a993f7 as builder
FROM milmove/circleci-docker:milmove-app-ab729849a08a773ea2557b19b67f378551d1ad3d as builder

ENV CIRCLECI=true

Expand All @@ -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.migrations_local
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# BUILDER #
###########

FROM milmove/circleci-docker:milmove-app-726bfe44bd27d3b41da41acbe3eb231811a993f7 as builder
FROM milmove/circleci-docker:milmove-app-ab729849a08a773ea2557b19b67f378551d1ad3d as builder

ENV CIRCLECI=true

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.reviewapp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
###########

# Base builder so the ci build image hash is referenced once
FROM milmove/circleci-docker:milmove-app-726bfe44bd27d3b41da41acbe3eb231811a993f7 as builder
FROM milmove/circleci-docker:milmove-app-ab729849a08a773ea2557b19b67f378551d1ad3d as builder

ENV CIRCLECI=docker
ENV REACT_APP_NODE_ENV=development
Expand Down 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
4 changes: 2 additions & 2 deletions Dockerfile.tasks_local
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# BUILDER #
###########

FROM milmove/circleci-docker:milmove-app-726bfe44bd27d3b41da41acbe3eb231811a993f7 as builder
FROM milmove/circleci-docker:milmove-app-ab729849a08a773ea2557b19b67f378551d1ad3d as builder

ENV CIRCLECI=true

Expand All @@ -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: 1 addition & 1 deletion Dockerfile.tools_local
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# BUILDER #
###########

FROM milmove/circleci-docker:milmove-app-726bfe44bd27d3b41da41acbe3eb231811a993f7 as builder
FROM milmove/circleci-docker:milmove-app-ab729849a08a773ea2557b19b67f378551d1ad3d as builder

ENV CIRCLECI=true

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.webhook_client
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# BUILDER #
###########

FROM milmove/circleci-docker:milmove-app-726bfe44bd27d3b41da41acbe3eb231811a993f7 as builder
FROM milmove/circleci-docker:milmove-app-ab729849a08a773ea2557b19b67f378551d1ad3d as builder

# Prepare public DOD certificates.
# hadolint ignore=DL3002
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.webhook_client_dp3
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# BUILDER #
###########

FROM milmove/circleci-docker:milmove-app-726bfe44bd27d3b41da41acbe3eb231811a993f7 as builder
FROM milmove/circleci-docker:milmove-app-ab729849a08a773ea2557b19b67f378551d1ad3d as builder

# Prepare public DOD certificates.
# hadolint ignore=DL3002
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.webhook_client_local
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# BUILDER #
###########

FROM milmove/circleci-docker:milmove-app-726bfe44bd27d3b41da41acbe3eb231811a993f7 as builder
FROM milmove/circleci-docker:milmove-app-ab729849a08a773ea2557b19b67f378551d1ad3d as builder

# Prepare public DOD certificates.
# hadolint ignore=DL3002
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ pretty: gofmt ## Run code through JS and Golang formatters

.PHONY: docker_circleci
docker_circleci: ## Run CircleCI container locally with project mounted
docker run -it --pull=always --rm=true -v $(PWD):$(PWD) -w $(PWD) -e CIRCLECI=1 milmove/circleci-docker:milmove-app-726bfe44bd27d3b41da41acbe3eb231811a993f7 bash
docker run -it --pull=always --rm=true -v $(PWD):$(PWD) -w $(PWD) -e CIRCLECI=1 milmove/circleci-docker:milmove-app-ab729849a08a773ea2557b19b67f378551d1ad3d bash

.PHONY: docker_local_ssh_server_with_password
docker_local_ssh_server_with_password:
Expand Down
2 changes: 1 addition & 1 deletion cmd/ecs-deploy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func main() {
Use: "completion",
Short: "Generates bash completion scripts",
Long: "To install completion scripts run:\n\necs-deploy completion > /usr/local/etc/bash_completion.d/ecs-deploy",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
return root.GenBashCompletion(os.Stdout)
},
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/milmove-tasks/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func main() {
Use: "completion",
Short: "Generates bash completion scripts",
Long: "To install completion scripts run:\n\nmilmove-tasks completion > /usr/local/etc/bash_completion.d/milmove-tasks",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
return root.GenBashCompletion(os.Stdout)
},
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/milmove/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func main() {
Use: "completion",
Short: "Generates bash completion scripts",
Long: "To install completion scripts run:\n\nmilmove completion > /usr/local/etc/bash_completion.d/milmove",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
return root.GenBashCompletion(os.Stdout)
},
}
Expand Down
4 changes: 4 additions & 0 deletions cmd/milmove/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ func migrateFunction(cmd *cobra.Command, args []string) error {
migrationPaths := expandPaths(strings.Split(trimmedMigrationPaths, ";"))
logger.Info(fmt.Sprintf("using migration paths %q", migrationPaths))

logger.Info("migration Path from s3")

s3Migrations := false
for _, p := range migrationPaths {
if strings.HasPrefix(p, "s3://") {
Expand All @@ -190,6 +192,8 @@ func migrateFunction(cmd *cobra.Command, args []string) error {
retryMax := v.GetInt(cli.DbRetryMaxFlag)
retryInterval := v.GetDuration(cli.DbRetryIntervalFlag)

logger.Info("get db config")

dbConnection, err = cli.InitDatabase(v, logger)
if err != nil {
logger.Fatal("Invalid DB Configuration", zap.Error(err))
Expand Down
2 changes: 1 addition & 1 deletion cmd/milmove/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ func buildRoutingConfig(appCtx appcontext.AppContext, v *viper.Viper, redisPool
)
} else {
// this spins up a local test server
fakeServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
fakeServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusOK)
}))
gexSender = invoice.NewGexSenderHTTP(
Expand Down
2 changes: 1 addition & 1 deletion cmd/prime-api-client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ func main() {
Use: "completion",
Short: "Generates bash completion scripts",
Long: "To install completion scripts run:\n\nprime-api-client completion > /usr/local/etc/bash_completion.d/prime-api-client",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
return root.GenBashCompletion(os.Stdout)
},
}
Expand Down
Loading

0 comments on commit 53fe4a3

Please sign in to comment.