-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat: modify csv uploader job to remove dupe keywords #426
Conversation
There's some kind of unrelated new problem with the uploader where `json.dumps()` can't serialize the `Url` objects created by Pydantic. Nothing changed in the uploader so I don't know if this is due to upgrading Pydantic or what. This PR fixes that too.
Hey @0c0w3 ! Pydantic V2 introduced a lot of changes and a significant portion of out of the box functionality is not as it was. The way values are serialized changed considerably and the way in which json data is serialized means there are some new methods that can be implemented. Urls for instance function differently when you dump them to dicts of json strings. It's well after hours for me, but we can discuss this tomorrow and I could recommend a few things. I don't think you need to import |
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.
Looks good, thanks!
Thanks @taddes. I'm looking at https://docs.pydantic.dev/latest/concepts/serialization/ and I wondered why the tests didn't catch this and it's because the chunked uploader test uses suggestion objects with a single |
Ah |
OK, this is good! It's exposed a few related problems:
|
|
@0c0w3 it's green now. Are you login on CircleCI? You should be able to trigger retry there. I noticed that you are not a member of the "mozilla-services" org on Github, maybe that's why you can't assign contextual-services as the reviewer. To fix those quirks, we can ask GH admins to add you to "mozilla-services" if you don't mind, let me know :) |
@ncloudioj That would be fine, thanks! |
References
Dupe keyword discussion
Description
There's some kind of unrelated new problem with the uploader where
json.dumps()
can't serialize theUrl
objects created by Pydantic. Nothing changed in the uploader so I don't know if this is due to upgrading Pydantic or what. This PR fixes that too.PR Review Checklist
Put an
x
in the boxes that apply[DISCO-####]
, and has the same title (if applicable)[load test: (abort|warn)]
keywords are applied (if applicable)