-
Notifications
You must be signed in to change notification settings - Fork 12
Update Marshmallow and SQLAlchemy dependencies #1678
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
Draft
ccostino
wants to merge
12
commits into
main
Choose a base branch
from
update-marshmallow-deps
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
Conversation
This file contains hidden or 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
This changeset gets all of our Marshmallow and SQLAlchemy dependencies updated and accounts for recent major version changes. Signed-off-by: Carlo Costino <[email protected]>
Signed-off-by: Carlo Costino <[email protected]>
This was referenced May 1, 2025
Closed
Closed
Signed-off-by: Carlo Costino <[email protected]>
This is due to a change in marshmallow 4.0.0: https://marshmallow.readthedocs.io/en/latest/upgrading.html#validates-accepts-multiple-field-names Signed-off-by: Carlo Costino <[email protected]>
Signed-off-by: Carlo Costino <[email protected]>
…ion field Signed-off-by: Carlo Costino <[email protected]>
Signed-off-by: Carlo Costino <[email protected]>
Signed-off-by: Carlo Costino <[email protected]>
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.
A note to PR reviewers: it may be helpful to review our code review documentation to know what to keep in mind while reviewing pull requests.
SPECIAL NOTE
There are quite a few things with this PR that will need to be investigated, researched, and addressed; this isn't a simple matter of "fix a bunch of broken tests" - we have to make sure the app itself is still working properly, including in the way it's handling data and passing it around and externally to the Admin app.
Already this has required debugging the tests and stepping through the running code with the debugger to go up and down the call stack to see what's calling what, what's referencing what, and what's being expected vs. what's actually flowing through.
Case in point: I uncovered the issue with how the enums were being serialized by inspecting the data and seeing that the value being used was an enum's name versus it's actual value; e.g., serializing
TemplateType.SMS
was returningSMS
(the name of the enum property) instead of its actual string value, which issms
. Once I figured that piece out, that led me to looking through a host of changelog information and finally tracking down what was likely doing it, a change withmarshmallow-sqlalchemy
1.3.0: https://marshmallow-sqlalchemy.readthedocs.io/en/latest/changelog.html#id5 - this changed how enums were being serialized, and I had to enforce it to go by value (literally an argument in a field type,by_value=True
) as that change was in conjunction with amarshmallow
4.0.0 change of no longer defining fields implicitly.To accomplish this, the easiest thing to do is to run the tests directly with a few different options:
poetry run pytest --pdb -x
- that'll cause the tests to stop and open Python's debugger (pdb
) at the point of a failure/error being thrown so you can start debugging, and once you're done it'll stop running the tests immediately. I created a separate make command calledmake test-debug
to provide a shortcut for that command in this PR, too.I've also kept the PR up-to-date with the
main
branch, so this is working off of the latest code. We'll have to be methodical in how we approach this and make sure we're accounting for all possible changes and breaks that need to be addressed. To help, these are some places to start looking and checking on:Description
This changeset gets all of our Marshmallow and SQLAlchemy dependencies updated and accounts for recent major version changes.
TODO (optional)
Security Considerations