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

Feature/data manager user fix #514

Merged
merged 4 commits into from
May 10, 2024

Conversation

solomon-negusse
Copy link
Member

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side). Don't request your master!
  • Make sure you are making a pull request against the develop branch (left side). Also you should start your branch off our develop.
  • Check the commit's or even all commits' message styles matches our requested structure.
  • Check your code additions will fail neither code linting checks nor unit test.

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

The pydantic model for the user doesn't match the response of {rw-api}/auth/check-logged response

What is the new behavior?

Does this introduce a breaking change?

  • Yes
  • No

Other information

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.88%. Comparing base (1796f60) to head (d80fcfc).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@                  Coverage Diff                  @@
##           feature/data_manager     #514   +/-   ##
=====================================================
  Coverage                 81.87%   81.88%           
=====================================================
  Files                       125      125           
  Lines                      5562     5563    +1     
=====================================================
+ Hits                       4554     4555    +1     
  Misses                     1008     1008           
Flag Coverage Δ
unittests 81.88% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -20,7 +20,8 @@ class User(StrictBaseModel):
email: EmailStr
createdAt: datetime
role: str
applications: List[str]
provider: str
providerId: str
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see providerId listed in https://resource-watch.github.io/doc-api/reference.html#get-lt-base-api-url-gt-auth-check-logged . Is that documentation out of date? If it is not being returned by 'check-logged', can you put a comment in on why you're adding it?

Also, it looks like 'updatedAt' is returned by 'checked-logged'. Do you want to include that for completeness?

Copy link
Member Author

Choose a reason for hiding this comment

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

I had one unpushed commit that makes providerId optional as it's only present when provider represents third party auth (facebook, google, etc). Thanks for catching it.
Also updatedAt is not present in the actual response.
The documentation looks incorrect/incomplete in both cases.

@solomon-negusse solomon-negusse merged commit 0c3f5f8 into feature/data_manager May 10, 2024
1 of 2 checks passed
@solomon-negusse solomon-negusse deleted the feature/data_manager_user_fix branch May 10, 2024 17:13
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.

4 participants