-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAIN B-21073 #13838
MAIN B-21073 #13838
Conversation
…how circleCI likes it
…the createAddress service object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't see any issues working through workflows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left comments for myself, some I will go back and reference for reviewing Tevin's PR, you can ignore all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is different but will make sure @TevinAdams' PR matches up with integration when I review it
NOTE
I apologize in advance for this PR - it is quite a mess. There are three separate INT commits and I had to make commits only in INT due to some differences in payload/model conversions and then those were merged into
main
and had to handle dealing with those changes in here.The first INT PR also held changes for the Go upgrade, so... just do your best. If all tests are passing then all should be well, but it might be worth testing this locally just to be sure we are good to go.
This PR also contains a commit to fix a flaky test from this PR - with the addition of country checks this is always failing during CircleCI builds, so it is needed in order to pass
server-test
INT PR 1
INT PR 2
INT PR 3
Agility ticket
Summary
For the last twenty years I have been working on this BL item and its beautiful personality and quirks. After fighting a timeout issue likely due to so many concurrency issues happening when building addresses (and also adding countries to the db), I updated the
db-truncate
file to NOT clear the test db ofre_countries
data so we can retain that and avoid unnecessary inserts into the test database when building test data.OKAY.
So the point of this BL item was to add a single source of truth for country information, which required a
re_countries
table with populated data.In addition to adding that data, we had to then refactor how we are handling country data in the backend and adding the
Country
object to the struct and then making that data accessible to the UI.This PR does the following:
re_countries
table and refactors theaddresses
table to use theid
column of there_countries
in the newcountry_id
column - drops thecountry
columnEager
/EagerPreload
instances to use"Addresses.Country"
now that theCountry
object holds the necessary dataAddress
definition for Swagger to only be two characters (we will handle this later on when international rolls out)US
countryHow to test
make server_run
and see the migrations runre_countries
table, as well as theaddresses
table having a removedcountry
column and addedcountry_id
columnCountry
object attached to the addressesCountry
is importantAgility ticket
Summary
This is adding a little cleanup + one missed oopsie of validating the country when the Prime attempts to create an address that contains a country code that is not supported.
Since we do not support international moves at this time, I added in a check that IF the Prime provides a country code that is not
US
, then we are going to send back an error message saying the country code they provided is not supported.How to test
/prime/v3/mto-shipments
Country
value of something that is NOTUS
- should get back a validation errorAgility ticket
Summary
Discovered that the service member profile creation/update flow does not use the expected service objects and instead uses a function in the models file. Updating that function to include
country_id
when saving the service member.How to test
addresses
table and ensure that thecountry_id
is populated