fix(evals): update multitenant eval tests for OGX rename#5637
Open
varshaprasad96 wants to merge 2 commits intoogx-ai:mainfrom
Open
fix(evals): update multitenant eval tests for OGX rename#5637varshaprasad96 wants to merge 2 commits intoogx-ai:mainfrom
varshaprasad96 wants to merge 2 commits intoogx-ai:mainfrom
Conversation
- Fix imports: llama_stack -> ogx, llama_stack_api -> ogx_api - Fix bench scripts: rename CLI args and comments - Fix conftest: use EmbeddedChunk for add_chunks (API change) - Fix PUBLIC_MODEL: use owner=None for unowned resources - Add chunk_id to Chunk constructor (now required) - Make bench scripts executable (pre-commit requirement) All 51 tests pass. Signed-off-by: Varsha Prasad Narsing <vnarsing@redhat.com> Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com>
| PUBLIC_MODEL = _MockResource( | ||
| resource_type="model", | ||
| identifier="llama-3-base", | ||
| owner=User(principal="system", attributes={}), |
Collaborator
There was a problem hiding this comment.
why change this test?
Contributor
Author
There was a problem hiding this comment.
IIUC - there is a "resource is unowned" rule (
) which checks "not resource.owner". With the old owner=User(principal="system", attributes={}), theresource is truthy (owned but with empty attributes), so it doesn't match the unowned rule or any attribute matching rules (which is why we get access gets denied for everyone). Setting owner=None makes it correctly match the resource is unowned rule, which permits access to all authenticated users.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Update the multitenant security eval tests in
tests/evals/multitenant/for the OGX rename.Changes
llama_stack→ogx,llama_stack_api→ogx_apiEmbeddedChunkforadd_chunks(API change), addchunk_idtoChunkconstructorPUBLIC_MODELto useowner=Nonefor unowned resources--llama-stack-url→--ogx-url, update commentsVerified
Signed-off-by: Varsha Prasad Narsing varshaprasad96@gmail.com
🤖 Generated with Claude Code