22956 - Verify update legal filings job to use new db versioning #3105
+10
−8
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.
Issue #: /bcgov/entity#22956
Description of changes:
update-legal-filings-job doesn't directly operate in lear db, instead, it's calling legal-api and colin-api endpoints. And there isn't any existing code initialize a db instance in this job. As per discussion I have removed FF for update-legal-filings in multiple flags.json files.
Verification 1 - Running local legal-api and check behaviours
Keep the local lear-db's colin_last_update table remain the same for 3 runs in different scenarios.
In summary, there is no behaviour differences between these 3 scenarios:
Verification 2 - Running local legal-api and verify the endpoints the job used
{{url}}/api/v2/businesses/internal/filings/colin_id
105911836
{{url}}/api/v2/businesses/:identifier
{{url}}/api/v2/businesses/internal/filings/colin_id/:event_id
As this event/filing is not yet updated, it's not found in lear-db
{{url}}/api/v2/businesses/:identifier/filings
After fixing the data-type for
goodStanding
andadminFreeze
{{url}}/api/v2/businesses/internal/filings/colin_id/:new_max_event_id
{{url}}/api/v2/businesses/internal/filings/colin_id/:event_id
And since it's updated to lear-db now, we can find it
Other findings
Found this job is already not really working properly, and might be like this for a while. I left some details here: bcgov/entity#22956 (comment)
May need to cut another ticket to address this issue.
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).