Add filtering option for listing sandboxes#235
Merged
Conversation
Contributor
There was a problem hiding this comment.
Key Issues
The current implementation is inefficient as it iterates over instanceInfo multiple times for each filter key, which could significantly impact performance on large datasets; consider optimizing by combining filter checks into a single pass.
jakubno
commented
Jan 10, 2025
Co-authored-by: callstackai[bot] <186726322+callstackai[bot]@users.noreply.github.com>
Member
|
The next steps here:
|
Member
Author
|
Everything should be ready
|
ValentaTomas
approved these changes
Jan 17, 2025
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.
Description
Allow users to filter out sandbox based on metadata
✨
Description by Callstackai
This PR introduces a filtering option for listing sandboxes based on metadata, allowing users to specify query parameters to filter results.
Diagrams of code changes
sequenceDiagram Client->>+API: GET /sandboxes?query=user%3Dabc%26app%3Dprod API->>API: Parse query parameter API->>API: URL unescape query string API->>Orchestrator: GetSandboxes() Orchestrator-->>API: Return all sandboxes alt Has query parameter API->>API: Parse filters into key-value pairs API->>API: Filter sandboxes based on metadata API->>API: Keep only sandboxes matching all filters end API-->>-Client: Return filtered sandboxesFiles Changed
GetSandboxesmethod signature to accept filtering parameters.GetSandboxesParamsto define parameters for theGetSandboxesmethod.GetSandboxesmethod based on query parameters.This PR includes files in programming languages that we currently do not support. We have not reviewed files with the extensions
.yml. See list of supported languages.