Skip to content

33247 legal api dep upgrade#4387

Open
kialj876 wants to merge 10 commits into
bcgov:feature-legal-api-python3.13from
kialj876:33247-legal-api-dep-upgrade
Open

33247 legal api dep upgrade#4387
kialj876 wants to merge 10 commits into
bcgov:feature-legal-api-python3.13from
kialj876:33247-legal-api-dep-upgrade

Conversation

@kialj876
Copy link
Copy Markdown
Collaborator

@kialj876 kialj876 commented May 13, 2026

Issue #: /bcgov/entity#33247

Description of changes:

  • upgrade legal-api to 3.13 and all major deps
  • replace model with common model
  • see below comments for specific notes on things

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).

Copy link
Copy Markdown
Collaborator Author

@kialj876 kialj876 May 13, 2026

Choose a reason for hiding this comment

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

NOTE: I am planning to remove all the model tests before merging as they should be secured in the common model tests.
I didn't want to do this before verifying that they were all passing here with minimal changes in case there were unknown differences etc

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

NOTE: updates in here follow what was accepted in the common model - I think this is okay, but let me know if you disagree

Copy link
Copy Markdown
Collaborator Author

@kialj876 kialj876 May 13, 2026

Choose a reason for hiding this comment

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

NOTE: these updates and other naics related test changes were already applied and approved in the common model as well and are just due to the test data populated being a little different in the migrations of the common model

Comment thread legal-api/src/legal_api/logging.conf Outdated
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

NOTE: logging is setup via our structured logging dependency - we removed this in our newer projects as well - I didn't dive too deep into whether or not to keep the older logging stuff around so let me know if you think I should bring it back

Comment thread legal-api/src/legal_api/version.py Outdated
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

NOTE: we use the version in the toml file instead now (same as newer projects)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

NOTE: similar changes made here that I made in the common model recently (full rollback of all transactions between each test) with one separate change needed for app_request

kialj876 added 9 commits May 13, 2026 11:04
…esting, unit tests setup broken

Signed-off-by: Kial Jinnah <kialj876@gmail.com>
Signed-off-by: Kial Jinnah <kialj876@gmail.com>
Signed-off-by: Kial Jinnah <kialj876@gmail.com>
Signed-off-by: Kial Jinnah <kialj876@gmail.com>
Signed-off-by: Kial Jinnah <kialj876@gmail.com>
Signed-off-by: Kial Jinnah <kialj876@gmail.com>
Signed-off-by: Kial Jinnah <kialj876@gmail.com>
Signed-off-by: Kial Jinnah <kialj876@gmail.com>
Signed-off-by: Kial Jinnah <kialj876@gmail.com>
@kialj876 kialj876 force-pushed the 33247-legal-api-dep-upgrade branch from 37594a6 to 3322a8e Compare May 13, 2026 15:09
@kialj876 kialj876 self-assigned this May 13, 2026
return headers


@contextmanager
def jwt_request_context(app,
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

NOTE: there was a breaking change in the upgraded version of our flask-jwt-oidc package where we need to pass in custom request context data to some of the functions we use regularly in this API so this ensures that specific request context data is available for tests that skip over the client

Signed-off-by: Kial Jinnah <kialj876@gmail.com>
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
10.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@kialj876
Copy link
Copy Markdown
Collaborator Author

kialj876 commented May 13, 2026

Not sure why the CI isn't running the lint or unit tests here. It's supposed to run against 'feature*' branches. Below are my local runs:

Screenshot 2026-05-13 at 11 20 37 AM Screenshot 2026-05-13 at 11 23 52 AM

I've also tested the major functionality locally:

  • getting business/address/party/filing/tasks data
  • posting filings+drafts
  • removing drafts
  • getting filing document lists
  • getting filing pdfs
  • getting permissions
  • will expand on this

@loneil loneil requested a review from Copilot May 14, 2026 22:33

This comment was marked as outdated.

Copy link
Copy Markdown
Collaborator

@loneil loneil left a comment

Choose a reason for hiding this comment

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

Can't see any obvious blockers or fundamental issues. I've never had a chance to need to dig into migrations but assume that part of it is handled from the note here.
Probably comes down to regression testing then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants