-
Notifications
You must be signed in to change notification settings - Fork 40
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
OLS-1379: Forward user's token #2214
base: main
Are you sure you want to change the base?
Conversation
@onmete: This pull request references OLS-1379 which is a valid jira issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@onmete: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
/assign @tisnik |
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.
looks ok in overall, having some nitpicks
""" | ||
user_token = "" # no-op auth yield no token |
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.
NO_TOKEN or something similar stored in constants perhaps?
|
||
# Check if the correct user info has been returned | ||
assert user_uid == user_id_in_request | ||
assert username == DEFAULT_USER_NAME | ||
assert skip_user_id_check is True | ||
assert token == "" |
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.
dtto (as DEFAULT_USER_NAME
) might be more readable
@@ -163,7 +165,7 @@ def conversation_request( | |||
def process_request( | |||
auth: Any, llm_request: LLMRequest | |||
) -> tuple[ | |||
str, str, str, list[CacheEntry], list[Attachment], bool, dict[str, float], str | |||
str, str, str, list[CacheEntry], list[Attachment], bool, dict[str, float], str, str |
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.
hmm sooner or later it would be valuable to create a model class for this tuple
|
||
# Check if the correct user info has been returned | ||
assert user_uid == DEFAULT_USER_UID | ||
assert username == DEFAULT_USER_NAME | ||
assert skip_user_id_check is True | ||
assert token == "" |
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.
see below please
|
||
# Check if the correct user info has been returned | ||
assert user_uid == DEFAULT_USER_UID | ||
assert username == DEFAULT_USER_NAME | ||
assert skip_user_id_check is True | ||
assert token == "" |
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.
see below please
Description
Forward user's token for future use in agent/tool
Type of change