-
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
B-21938 Entitlement Refactor #14505
Draft
cameroncaci
wants to merge
29
commits into
main
Choose a base branch
from
b-21938-entitlement-refactor-main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
B-21938 Entitlement Refactor #14505
+3,024
−1,487
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bundle StatsHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset No files were changed View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
B-21938
Integration PR
Summary
Removed
pkg/models/entitlements.go
, moving the static weight allowances to the database. Includes enhancements along the way to help accomplish this, see details below.Service changes
Weight Allotment Fetcher
New service. Can get a normal weight allotment, get all weight allotments, and weight allotment by orders type (See UB Specific Student Travel HHG Allowance section)
Weight Restrictor
New service. Enables downstreams by enabling the adding or removing of weight restrictions to entitlements
Enhanced services
Added new db lookup construction to the following service objects
Factory changes
UB Specific Student Travel HHG Allowance
#14271 / B-21578 introduced student travel HHG allowance which is a max allowance set per orders type. This was moved to the
application_parameters
table as JSONWeight Allotments
Maintained existing struct that is constructed on an as needed basis - eventually we'll want to drop this too and go to full db allotment handling. This can be done either during or after the UB portion of allowance database refactoring.
Flaky fixes
Increased timeouts on a bunch of playwright tests to try and fight the flaky
Deprecated code removal
Removed internalapi move queue item handler and payload func as it was completely unused within the application. This was done because the move queue item queries were not functional, presumably broken sometime between the introduction of #14271 thru January 2025. Thankfully this code was also unused within the app.
Unaccompanied Baggage (UB)
Moved UB functionality from
pkg/models/entitlements.go
topkg/models/ghc_entitlements.go
Misc
Fixed misc code along the way from typos to missing err or nil checks
DB Changes
is_weight_restricted
andweight_restriction
columns to entitlements table for downstream features.application_parameters
pkg/models/entitlements.go
)pkg/models/entitlements.go
)How to test
Think of edge case uses of weight allotments and attempt to break them / make sure they function within the application. The removal of static pay grades and moving it over to the DB is exceptionally easy to miss without thorough e2e testing.
Ask
Please attempt breaking upwards of 5 times at different spots within the application - e2e code coverage is not the same as our frontend and backend so this refactor introduces a greater chance of breaking something and being missed by automated tests.