-
Notifications
You must be signed in to change notification settings - Fork 74
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
22955 - Verify update-colin-filings job to use new db versioning #3112
22955 - Verify update-colin-filings job to use new db versioning #3112
Conversation
Quality Gate passedIssues Measures |
@@ -287,7 +287,8 @@ def _set_shares(primary_or_holding_business, amalgamation_filing, transaction_id | |||
share_classes = VersionedBusinessDetailsService.get_share_class_revision(transaction_id, | |||
primary_or_holding_business.id) | |||
amalgamation_filing['shareStructure'] = {'shareClasses': share_classes} | |||
business_dates = [item.resolution_date.isoformat() for item in primary_or_holding_business.resolutions] | |||
resolutions = Resolution.get_resolution_by_business_id(primary_or_holding_business.id) |
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 is a temporary fix to handle the missing relationship in versioned objects.
I've tested both scenarios (FF ON/OFF), and everything works fine.
But I'm not sure if this approach is acceptable.
I only found this issue in this ticket and am unsure if it exists elsewhere. (Didn't find this issue from the previous submissions of tickets)
Should we:
- Investigate and fix our db versioning to handle relationships properly
- Consider how this change might impact our already completed tickets that use versioning
@leodube-aot would appreciate your thoughts on this!
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.
Seems like this is an issue we have been aware of, but I don't think it is too prevalent in the code.
I created a ticket to investigate and fix the issue. I don’t think it is super high priority, but would be nice to have. We can use the workaround for now (and then clean it up in the new ticket). bcgov/entity#24754
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.
LGTM
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.
LGTM 🛩️
Nice workaround for the issue!
Issue #: /bcgov/entity#22955
Description of changes:
Investigated the job's functionality:
Conclusions:
Findings of db versioning relationship issue:
Resolutions
)BusinessVersion
lacks theresolutions
relationship that exists in the original Business model_set_shares
method to handle both versioned and non-versioned casesDebug logs showing the issue:
When the FF is ON:
When the FF is OFF:
Verification steps:
ScreenShots:
Created a new FED filing (Change of Address) - Filing ID: 151265
Verified filing exists in the local DB
Updated filing status to COMPLETED for testing
Then run the job locally again and confirm the filing(Filing ID: 151265) was successfully updated
Verified passed all unit test
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the lear license (Apache 2.0).