Skip to content
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

B-20229 refactor fuel pricer #12974

Merged
merged 20 commits into from
Jun 10, 2024
Merged

B-20229 refactor fuel pricer #12974

merged 20 commits into from
Jun 10, 2024

Conversation

deandreJones
Copy link
Contributor

@deandreJones deandreJones commented Jun 6, 2024

B-20229

Summary

Update FRA weekly effective period

Background

the app pulls the diesel prices every day looking for newly published prices
EIA publishes new prices generally every Monday, before this change they would just be effective until the next publication.
This change makes it so that when new diesel prices are published they are only valid from tueday( or the day after they are published0 through the following Monday

to test

  1. run make tasks_save_ghc_fuel_price_data to get the latest pricing data for your test
  2. create a new move
  3. approve move
  4. access prime and create a payment request for fuel surcharge
  5. login as TIO - review the payment request
  6. validate that it selected the correct price based on the actual pickup date being between the effective and End dates in the DB GHC_DIESEL_FUEL_PRICES
  • may want to manually enter a few extra rows verify it works and making the actual pickup date land on the effecting and end dates
Screenshot 2024-06-07 at 2 26 11 PM Screenshot 2024-06-07 at 2 57 05 PM image

@deandreJones deandreJones marked this pull request as ready for review June 7, 2024 20:09
@deandreJones deandreJones requested a review from a team as a code owner June 7, 2024 20:09
@deandreJones deandreJones changed the title initial B-20229 B-20229 refactor fuel pricer Jun 7, 2024
@deandreJones deandreJones added Mountain Movers Movin' Mountains 1 Sprint at a time INTEGRATION Slated for Integration Testing labels Jun 10, 2024
Comment on lines 49 to 51
fi
#gotest_args+=("-ldflags=-extldflags=-Wl,-ld_classic")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

golang/go#61229 (comment)

ill add more to the line- but in short-
our (Mac) build is broken for the go linker on the go version we are using- this forces the use of the older linker

Copy link
Contributor

@cameroncaci cameroncaci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After creating a new move as a customer (Origin MacDill AFB FL, destination Patrick SFB FL), logging into officelocal as HAFC GBLOC multirole, selecting to become a service counselor, and then attempting to view and edit orders, I'm encountering errors.

This was encountered on the Chrome browser

image

image
image

@danieljordan-caci
Copy link
Contributor

After creating a new move as a customer (Origin MacDill AFB FL, destination Patrick SFB FL), logging into officelocal as HAFC GBLOC multirole, selecting to become a service counselor, and then attempting to view and edit orders, I'm encountering errors.

This was encountered on the Chrome browser

image

image image

I ran through the same scenario and do not get this error.

@TevinAdams
Copy link
Contributor

I had a pickup date 2 days after the latest ghc_diesel_fuel_prices. So my pick-up date was 06-12-2024 and in the DB the latest record had an effective date of 2024-06-04 and an end date of 2024-06-10. This records fuel_price_in_milicents was selected even though the pick up date was after its end date. It looks like in this case it picked the latest. Is that expected? Also how do we get these updated prices? If June 12th is 2 days from now but there is no ghc_diesel_fuel_prices with that date in its range what is that a likely situation and what do we expect to happen in that case?

@deandreJones
Copy link
Contributor Author

deandreJones commented Jun 10, 2024

I had a pickup date 2 days after the latest ghc_diesel_fuel_prices. So my pick-up date was 06-12-2024 and in the DB the latest record had an effective date of 2024-06-04 and an end date of 2024-06-10. This records fuel_price_in_milicents was selected even though the pick up date was after its end date. It looks like in this case it picked the latest. Is that expected? Also how do we get these updated prices? If June 12th is 2 days from now but there is no ghc_diesel_fuel_prices with that date in its range what is that a likely situation and what do we expect to happen in that case?

Yes- this is what it should do-
if there isn't a published rate for a pickup date, then it should grab the last published

@TevinAdams
Copy link
Contributor

I changed the pickup date to 06/02/2024 and it chose the ghc fuel price for date range 2020-07-21 - 2020-07-27. Not sure If thats expected.
image

Copy link
Contributor

@danieljordan-caci danieljordan-caci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and seems good to go. You have some failing tests, but I'd bet they're flaky.

@deandreJones
Copy link
Contributor Author

I changed the pickup date to 06/02/2024 and it chose the ghc fuel price for date range 2020-07-21 - 2020-07-27. Not sure If thats expected. image

if that is the greatest publication date- and your pickup date doesn't fall in any

Copy link
Contributor

@TevinAdams TevinAdams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and worked as expected.

Copy link
Contributor

@traskowskycaci traskowskycaci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replicated your results locally, looks good!

@deandreJones deandreJones merged commit 4880f5c into integrationTesting Jun 10, 2024
28 of 29 checks passed
@deandreJones deandreJones deleted the B-20229-int branch June 10, 2024 18:27
@deandreJones deandreJones mentioned this pull request Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
INTEGRATION Slated for Integration Testing Mountain Movers Movin' Mountains 1 Sprint at a time
Development

Successfully merging this pull request may close these issues.

5 participants