-
Notifications
You must be signed in to change notification settings - Fork 7
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
PNE-816: Make the project search endpoint to use the teams version one #974
Conversation
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.
I have a preferred solution approach, but I'm not fundamentally opposed to this solution.
src/citrine/resources/project.py
Outdated
if self.team_id is None: | ||
path = "/projects/search" | ||
else: | ||
path = format_escaped_url("/teams/{team_id}/projects/search", team_id=self.team_id) | ||
|
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.
I'd prefer to follow the existing patterns if possible, as opposed the the more local definition here. Are there any routes that still should always be using a team-agnostic project access? It seems like the better strategy here is to define _path_template
as a @property
that conditionally includes the team.
I can code that up if it doesn't make sense.
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.
It totally makes sense. For this, we might need to do some research to verify that every endpoint called has a counterpart. If you agree, I would ticket that up, as I imagine I will find a few interesting things while doing it.
I can handle that myself after some high-priority work I need to address on another topic. What do you think?
…-update PR suggestions
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.
With the merged changes, this looks good to go. Verified functionality with current e2es, but those should be updated to use team routes.
Citrine Python PR
Description
Jira ticket: https://citrine.atlassian.net/browse/PNE-816
For searching for projects in the SDK we were using a team-agnostic endpoint, causing the search to be executed in a broader scope (all of the teams visible to the user). This work switches the endpoint so the search will have the right scope.
PR Type:
Adherence to team decisions