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

[v2.9] GitHub Auth Provider: allow to search teams #45162

Merged

Conversation

pmatseykanets
Copy link
Contributor

@pmatseykanets pmatseykanets commented Apr 17, 2024

Issue:

#44907

Problem

GitHub auth provider uses GH users search API that only returns users and orgs. Therefore it's impossible to search for teams.

Solution

Given the list of orgs the user has access to pull teams for each org and do a simple prefix search on their names and add them to the search results.

Testing

Engineering Testing

Manual Testing

Automated Testing

  • Test types added/modified:
    • Unit
    • Integration (Go Framework)
    • Integration (v2prov Framework)
    • Validation (Go Framework)
    • Other - Explain: EXPLAIN
    • None
    • REMOVE NOT APPLICABLE BULLET POINTS ABOVE
  • If "None" - Reason: EXPLAIN THE REASON
  • If "None" - GH Issue/PR: LINK TO GH ISSUE/PR TO ADD TESTS

Summary: TODO

QA Testing Considerations

Regressions Considerations

TODO

Existing / newly added automated tests that provide evidence there are no regressions:

  • TODO

@pmatseykanets pmatseykanets self-assigned this Apr 17, 2024
@pmatseykanets pmatseykanets marked this pull request as ready for review April 18, 2024 19:31
bigkevmcd
bigkevmcd previously approved these changes Apr 19, 2024
JonCrowther
JonCrowther previously approved these changes Apr 22, 2024
Copy link
Contributor

@JonCrowther JonCrowther left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@crobby crobby left a comment

Choose a reason for hiding this comment

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

I think the change is solid.
Even though there's currently no tests for this provider, can you maybe add something to at least test the new functionality?

@pmatseykanets pmatseykanets requested a review from crobby May 2, 2024 19:06
Copy link
Contributor

@crobby crobby left a comment

Choose a reason for hiding this comment

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

I like the testing tweaks. Not overly invasive imho.

@pmatseykanets pmatseykanets merged commit 052adb3 into rancher:release/v2.9 May 3, 2024
2 checks passed
@pmatseykanets pmatseykanets deleted the github-provider-search-teams branch May 3, 2024 16:25
rohitsakala pushed a commit to rohitsakala/rancher that referenced this pull request May 13, 2024
rohitsakala pushed a commit to rohitsakala/rancher that referenced this pull request May 14, 2024
pmatseykanets added a commit that referenced this pull request May 20, 2024
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.

None yet

4 participants