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

fix: return all workspaces in system for owner users #3343

Conversation

frascuchon
Copy link
Member

@frascuchon frascuchon commented Jul 5, 2023

Description

This PR changes the GET /api/v1/users/:user_id/workspaces endpoint introduced in #3308 to return all workspaces for owner users

Also, returns 404 if provided user id does not exist

Type of change

(Please delete options that are not relevant. Remember to title the PR according to the type of change)

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested

(Please describe the tests that you ran to verify your changes. And ideally, reference tests)

  • Test A
  • Test B

Checklist

  • I added relevant documentation
  • follows the style guidelines of this project
  • I did a self-review of my code
  • I made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I filled out the contributor form (see text above)
  • I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/)

@frascuchon frascuchon added this to the v1.13 milestone Jul 5, 2023
@frascuchon frascuchon self-assigned this Jul 5, 2023
@frascuchon frascuchon marked this pull request as ready for review July 5, 2023 11:37
@frascuchon frascuchon changed the title fix: allow to owner users list all workspaces from apiv1usersuser idworkspaces fix: allow to owner users list all workspaces in system Jul 5, 2023
@frascuchon frascuchon changed the title fix: allow to owner users list all workspaces in system fix: return all workspaces in system for owner users Jul 5, 2023
@codecov
Copy link

codecov bot commented Jul 5, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01 ⚠️

Comparison is base (f076e1e) 90.45% compared to head (55d724c) 90.45%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3343      +/-   ##
===========================================
- Coverage    90.45%   90.45%   -0.01%     
===========================================
  Files          239      239              
  Lines        12823    12828       +5     
===========================================
+ Hits         11599    11603       +4     
- Misses        1224     1225       +1     
Impacted Files Coverage Δ
src/argilla/server/apis/v1/handlers/users.py 100.00% <100.00%> (ø)
src/argilla/server/contexts/accounts.py 96.15% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@gabrielmbmb gabrielmbmb merged commit 6a6996b into develop Jul 5, 2023
16 checks passed
@gabrielmbmb gabrielmbmb deleted the 3339-allow-to-owner-users-list-all-workspaces-from-apiv1usersuser_idworkspaces branch July 5, 2023 12:08
leiyre pushed a commit that referenced this pull request Jul 5, 2023
* develop:
  fix: return all workspaces in system for owner users (#3343)
  fix: `rg.init` with argilla user using quickstart images raise an unexpected error (#3341)
  feat: add `Suggestion` endpoints (#3304)
  feat: add `list_user_workspaces` and `User.workspaces` property (#3334)
  refactor: add `HuggingFaceDatasetMixIn` under `integrations` (#3326)
  feat: add list user workspaces endpoint (#3308)
  ci: Stop linking issues to team work project
  chore: add missing `greenlet` dependency in `server` extra (#3330)
  docs: update developer docs (#3314)
  Docs/3312 docs 112 is not building correctly (#3313)
  fix: unit test failing if not local db (#3307)
  ci: Optimize build + test pipeline (#3300)
  refactor: simplify old bulk endpoints to avoid create datasets if does not exists (#3306)
leiyre pushed a commit that referenced this pull request Jul 5, 2023
* develop:
  fix: return all workspaces in system for owner users (#3343)
  fix: `rg.init` with argilla user using quickstart images raise an unexpected error (#3341)
  feat: add `Suggestion` endpoints (#3304)
  feat: add `list_user_workspaces` and `User.workspaces` property (#3334)
  docs: update developer docs (#3314)
  Docs/3312 docs 112 is not building correctly (#3313)
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.

Allow to owner users list all workspaces from /api/v1/users/:user_id/workspaces
2 participants