Skip to content

Commit

Permalink
Merge branch 'main' into B-20235-MAIN
Browse files Browse the repository at this point in the history
  • Loading branch information
pambecker authored Jul 15, 2024
2 parents 55a37da + 2942719 commit 5fc9b1d
Show file tree
Hide file tree
Showing 116 changed files with 3,592 additions and 421 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ commands:
export FEATURE_FLAG_OKTA_DODID_INPUT=false
export FEATURE_FLAG_SAFETY_MOVE=false
export FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
export FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
# disable for speed, playwright tests can fail otherwise
export DB_DEBUG=false
Expand Down Expand Up @@ -905,6 +905,7 @@ commands:
FEATURE_FLAG_OKTA_DODID_INPUT: 'false'
FEATURE_FLAG_SAFETY_MOVE: 'false'
FEATURE_FLAG_MANAGE_SUPPORTING_DOCS: 'false'
FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE: 'false'
command: |
SHARD=$((${CIRCLE_NODE_INDEX}+1))
PLAYWRIGHT_JUNIT_OUTPUT_NAME=playwright-results.xml \
Expand Down
2 changes: 2 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ export FEATURE_FLAG_SAFETY_MOVE=true
# Feature flag for additional supporting documents uploaded by customer
export FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=true

# Feature flags to enable third address
export FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false

# Feature flags to disable certain shipment types
export FEATURE_FLAG_PPM=true
Expand Down
2 changes: 1 addition & 1 deletion cmd/ecs-deploy/task_def.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ func buildContainerEnvironment(environmentName string, dbHost string, variablesF
// These variables should always be preferred over env vars
if len(variablesFile) > 0 {
if _, err := os.Stat(variablesFile); os.IsNotExist(err) {
log.Fatal(fmt.Errorf("File %q does not exist: %w", variablesFile, err))
log.Fatal(fmt.Errorf("file %q does not exist: %w", variablesFile, err))
}
// Read contents of variables file into vars
vars, readFileErr := os.ReadFile(filepath.Clean(variablesFile))
Expand Down
8 changes: 4 additions & 4 deletions cmd/prime-api-client/utils/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ func ParseFlags(cmd *cobra.Command, v *viper.Viper, args []string) error {

errParseFlags := cmd.ParseFlags(args)
if errParseFlags != nil {
return fmt.Errorf("Could not parse args: %w", errParseFlags)
return fmt.Errorf("could not parse args: %w", errParseFlags)
}
flags := cmd.Flags()
errBindPFlags := v.BindPFlags(flags)
if errBindPFlags != nil {
return fmt.Errorf("Could not bind flags: %w", errBindPFlags)
return fmt.Errorf("could not bind flags: %w", errBindPFlags)
}
v.SetEnvKeyReplacer(strings.NewReplacer("-", "_"))
v.AutomaticEnv()
Expand Down Expand Up @@ -100,7 +100,7 @@ func DecodeJSONFileToPayload(filename string, isStdin bool, payload interface{})
if filename != "" {
file, err := os.Open(filepath.Clean(filename))
if err != nil {
return fmt.Errorf("File open failed: %w", err)
return fmt.Errorf("file open failed: %w", err)
}
reader = bufio.NewReader(file)
} else if isStdin { // Uses std in if "-"" is provided instead
Expand All @@ -115,7 +115,7 @@ func DecodeJSONFileToPayload(filename string, isStdin bool, payload interface{})
// Read the json into the mto payload
err := jsonDecoder.Decode(payload)
if err != nil {
return fmt.Errorf("File decode failed: %w", err)
return fmt.Errorf("file decode failed: %w", err)
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion cmd/webhook-client/utils/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (wr *WebhookRuntime) Post(data []byte, url string) (*http.Response, []byte,

defer func() {
if closeErr := resp.Body.Close(); closeErr != nil {
fmt.Println(fmt.Errorf("Failed to close connection: %w", closeErr).Error())
fmt.Println(fmt.Errorf("failed to close connection: %w", closeErr).Error())
}
}()

Expand Down
8 changes: 4 additions & 4 deletions cmd/webhook-client/utils/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ func ParseFlags(cmd *cobra.Command, v *viper.Viper, args []string) error {

errParseFlags := cmd.ParseFlags(args)
if errParseFlags != nil {
return fmt.Errorf("Could not parse args: %w", errParseFlags)
return fmt.Errorf("could not parse args: %w", errParseFlags)
}
flags := cmd.Flags()
errBindPFlags := v.BindPFlags(flags)
if errBindPFlags != nil {
return fmt.Errorf("Could not bind flags: %w", errBindPFlags)
return fmt.Errorf("could not bind flags: %w", errBindPFlags)
}
v.SetEnvKeyReplacer(strings.NewReplacer("-", "_"))
v.AutomaticEnv()
Expand All @@ -54,7 +54,7 @@ func DecodeJSONFileToPayload(filename string, isStdin bool, payload interface{})
if filename != "" {
file, err := os.Open(filepath.Clean(filename))
if err != nil {
return fmt.Errorf("File open failed: %w", err)
return fmt.Errorf("file open failed: %w", err)
}
reader = bufio.NewReader(file)
} else if isStdin { // Uses std in if "-"" is provided instead
Expand All @@ -69,7 +69,7 @@ func DecodeJSONFileToPayload(filename string, isStdin bool, payload interface{})
// Read the json into the mto payload
err := jsonDecoder.Decode(payload)
if err != nil {
return fmt.Errorf("File decode failed: %w", err)
return fmt.Errorf("file decode failed: %w", err)
}

return nil
Expand Down
1 change: 1 addition & 0 deletions config/env/demo.app-client-tls.env
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ FEATURE_FLAG_MOVE_LOCK=false
FEATURE_FLAG_OKTA_DODID_INPUT=false
FEATURE_FLAG_SAFETY_MOVE=false
FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
1 change: 1 addition & 0 deletions config/env/demo.app.env
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ FEATURE_FLAG_MOVE_LOCK=false
FEATURE_FLAG_OKTA_DODID_INPUT=false
FEATURE_FLAG_SAFETY_MOVE=false
FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
1 change: 1 addition & 0 deletions config/env/exp.app-client-tls.env
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ FEATURE_FLAG_MOVE_LOCK=false
FEATURE_FLAG_OKTA_DODID_INPUT=false
FEATURE_FLAG_SAFETY_MOVE=false
FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
1 change: 1 addition & 0 deletions config/env/exp.app.env
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ FEATURE_FLAG_MOVE_LOCK=false
FEATURE_FLAG_OKTA_DODID_INPUT=false
FEATURE_FLAG_SAFETY_MOVE=false
FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
1 change: 1 addition & 0 deletions config/env/loadtest.app-client-tls.env
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ FEATURE_FLAG_MOVE_LOCK=false
FEATURE_FLAG_OKTA_DODID_INPUT=false
FEATURE_FLAG_SAFETY_MOVE=false
FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
1 change: 1 addition & 0 deletions config/env/loadtest.app.env
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ FEATURE_FLAG_MOVE_LOCK=false
FEATURE_FLAG_OKTA_DODID_INPUT=false
FEATURE_FLAG_SAFETY_MOVE=false
FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
1 change: 1 addition & 0 deletions config/env/prd.app-client-tls.env
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ FEATURE_FLAG_MOVE_LOCK=false
FEATURE_FLAG_OKTA_DODID_INPUT=false
FEATURE_FLAG_SAFETY_MOVE=false
FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
1 change: 1 addition & 0 deletions config/env/prd.app.env
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ FEATURE_FLAG_MOVE_LOCK=false
FEATURE_FLAG_OKTA_DODID_INPUT=false
FEATURE_FLAG_SAFETY_MOVE=false
FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
1 change: 1 addition & 0 deletions config/env/stg.app-client-tls.env
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ FEATURE_FLAG_MOVE_LOCK=false
FEATURE_FLAG_OKTA_DODID_INPUT=false
FEATURE_FLAG_SAFETY_MOVE=false
FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
1 change: 1 addition & 0 deletions config/env/stg.app.env
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ FEATURE_FLAG_MOVE_LOCK=false
FEATURE_FLAG_OKTA_DODID_INPUT=false
FEATURE_FLAG_SAFETY_MOVE=false
FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
8 changes: 8 additions & 0 deletions config/flipt/storage/development.features.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ flags:
distributions:
- variant: one
rollout: 100
- key: third_address_available
name: Third Address Available
type: BOOLEAN_FLAG_TYPE
enabled: true
rollouts:
- segment:
key: mil-app
value: true
segments:
- key: mil-app
name: Mil App
Expand Down
1 change: 1 addition & 0 deletions migrations/app/migrations_manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,7 @@
20240515164336_ignore_locked_columns_in_moves_table_for_history_log.up.sql
20240516143952_add_pricing_estimate_to_mto_service_items.up.sql
20240516184021_import_pricing_data_ghc.up.sql
20240516230021_add_third_address_shipments.up.sql
20240521160335_backfill_LOA_FY_TX.up.sql
20240521184834_add_standalone_field_to_service_items.up.sql
20240522124339_add_csr_to_roles.up.sql
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-- Adds tertiary addresses to ppm_shipments.
-- Only adds if the columns don't exist
ALTER TABLE ppm_shipments
ADD COLUMN IF NOT EXISTS tertiary_pickup_postal_address_id UUID NULL,
ADD COLUMN IF NOT EXISTS tertiary_destination_postal_address_id UUID NULL,
ADD COLUMN IF NOT EXISTS has_tertiary_pickup_address bool NULL,
ADD COLUMN IF NOT EXISTS has_tertiary_destination_address bool NULL;

COMMENT ON COLUMN ppm_shipments.tertiary_pickup_postal_address_id IS 'The tertiary destination address for this shipment.';
COMMENT ON COLUMN ppm_shipments.tertiary_destination_postal_address_id IS 'The tertiary destination address for this shipment.';
COMMENT ON COLUMN ppm_shipments.has_tertiary_pickup_address IS 'False if the ppm shipment does not have a tertiary pickup address. This column exists to make it possible to tell whether a shipment update should delete an address or not modify it.';
COMMENT ON COLUMN ppm_shipments.has_tertiary_destination_address IS 'False if the ppm shipment does not have a tertiary destination address. This column exists to make it possible to tell whether a shipment update should delete an address or not modify it.';

ALTER TABLE ppm_shipments ADD CONSTRAINT ppm_shipments_pickup_postal_address_id_fkey FOREIGN KEY (tertiary_pickup_postal_address_id) REFERENCES addresses(id);
ALTER TABLE ppm_shipments ADD CONSTRAINT ppm_shipments_destination_postal_address_id_fkey FOREIGN KEY (tertiary_destination_postal_address_id) REFERENCES addresses(id);

ALTER TABLE mto_shipments
ADD COLUMN IF NOT EXISTS tertiary_pickup_address_id UUID NULL,
ADD COLUMN IF NOT EXISTS tertiary_delivery_address_id UUID NULL,
ADD COLUMN IF NOT EXISTS has_tertiary_pickup_address bool NULL,
ADD COLUMN IF NOT EXISTS has_tertiary_delivery_address bool NULL;

COMMENT ON COLUMN mto_shipments.tertiary_pickup_address_id IS 'The secondary pickup address for this shipment.';
COMMENT ON COLUMN mto_shipments.tertiary_delivery_address_id IS 'The secondary delivery address for this shipment.';
COMMENT ON COLUMN mto_shipments.has_tertiary_pickup_address IS 'False if the ppm shipment does not have a tertiary pickup address. This column exists to make it possible to tell whether a shipment update should delete an address or not modify it.';
COMMENT ON COLUMN mto_shipments.has_tertiary_delivery_address IS 'False if the ppm shipment does not have a tertiary pickup address. This column exists to make it possible to tell whether a shipment update should delete an address or not modify it.';

ALTER TABLE mto_shipments ADD CONSTRAINT mto_shipments_pickup_postal_address_id_fkey FOREIGN KEY (tertiary_pickup_address_id) REFERENCES addresses(id);
ALTER TABLE mto_shipments ADD CONSTRAINT mto_shipments_destination_postal_address_id_fkey FOREIGN KEY (tertiary_delivery_address_id) REFERENCES addresses(id);
2 changes: 1 addition & 1 deletion pkg/edi/segment/fa1.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (s *FA1) StringArray() []string {
func (s *FA1) Parse(elements []string) error {
expectedNumElements := 1
if len(elements) != expectedNumElements {
return fmt.Errorf("FA1: Wrong number of elements, expected %d, got %d", expectedNumElements, len(elements))
return fmt.Errorf("fA1: Wrong number of elements, expected %d, got %d", expectedNumElements, len(elements))
}

s.AgencyQualifierCode = elements[0]
Expand Down
2 changes: 1 addition & 1 deletion pkg/edi/segment/fa2.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (s *FA2) StringArray() []string {
func (s *FA2) Parse(elements []string) error {
expectedNumElements := 2
if len(elements) != expectedNumElements {
return fmt.Errorf("FA2: Wrong number of elements, expected %d, got %d", expectedNumElements, len(elements))
return fmt.Errorf("fA2: Wrong number of elements, expected %d, got %d", expectedNumElements, len(elements))
}

s.BreakdownStructureDetailCode = FA2DetailCode(elements[0])
Expand Down
Loading

0 comments on commit 5fc9b1d

Please sign in to comment.