Skip to content
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

GitHub schema inconsistencies cause ValidationError on some API calls #1241

Closed
sentry-io bot opened this issue Sep 25, 2023 · 2 comments · Fixed by #1247
Closed

GitHub schema inconsistencies cause ValidationError on some API calls #1241

sentry-io bot opened this issue Sep 25, 2023 · 2 comments · Fixed by #1247
Assignees
Labels
bug Something isn't working

Comments

@sentry-io
Copy link

sentry-io bot commented Sep 25, 2023

Sentry Issue: SERVER-AQ

ValidationError: 2 validation errors for ParsingModel[OrganizationFull]
__root__ -> name
  none is not an allowed value (type=type_error.none.not_allowed)
__root__ -> blog
  none is not an allowed value (type=type_error.none.not_allowed)
(18 additional frame(s) were not displayed)
...
  File "polar/integrations/github/service/organization.py", line 196, in populate_org_metadata
    return await self._populate_github_org_metadata(session, org)
  File "polar/integrations/github/service/organization.py", line 204, in _populate_github_org_metadata
    gh = github_org.parsed_data
  File "pydantic/tools.py", line 82, in pydantic.tools.parse_raw_as
    return parse_obj_as(type_, obj, type_name=type_name)
  File "pydantic/tools.py", line 38, in pydantic.tools.parse_obj_as
    return model_type(__root__=obj).__root__
  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
    raise validation_error

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog :^)
Fund with Polar
@frankie567
Copy link
Member

Problem caused by an inconsistency between schema and GitHub output.

Talk about it here: yanyongyu/githubkit#47

@frankie567 frankie567 self-assigned this Sep 25, 2023
@frankie567 frankie567 changed the title ValidationError: 2 validation errors for ParsingModel[OrganizationFull] GitHub schema inconsistencies cause ValidationError on some API calls Sep 25, 2023
@frankie567 frankie567 reopened this Sep 25, 2023
@frankie567
Copy link
Member

(reopening because only a temporary fix)

@frankie567 frankie567 added bug Something isn't working 3rd party labels Sep 25, 2023
@birkjernstrom birkjernstrom changed the title GitHub schema inconsistencies cause ValidationError on some API calls [POL-44] GitHub schema inconsistencies cause ValidationError on some API calls Sep 27, 2023
ashharr pushed a commit to ashharr/polar that referenced this issue Sep 27, 2023
@birkjernstrom birkjernstrom changed the title [POL-44] GitHub schema inconsistencies cause ValidationError on some API calls GitHub schema inconsistencies cause ValidationError on some API calls Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants