Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 10
SK-2522: Fix Python SDK v2 issues reported in Bug Bash#231
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
Merged
saileshwar-skyflow
merged 5 commits into
release/26.1.4
from
saileshwar/SK-2522-fix-bugs-identified-in-bug-bashFeb 5, 2026
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a306f16
SK-2522: fix identified bugs
saileshwar-skyflow 48c5b7b
SK-2522: fix unit tests
saileshwar-skyflow a19fb00
SK-2522: add unit tests
saileshwar-skyflow 1a5d51d
SK-2522: Merge branch 'release/26.1.4' into saileshwar/SK-2522-fix-bu…
saileshwar-skyflow b6e83c6
SK-2522: resolve copilot comments
saileshwar-skyflow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -9,7 +9,7 @@ | ||
| from skyflow.utils.constants import ( | ||
| ApiKey, ResponseField, RequestParameter, | ||
| FileUploadField, | ||
| DeidentifyFileRequestField, RequestOperation, ConfigType, SqlCommand, ConfigField, OptionField, CredentialField | ||
| DeidentifyFileRequestField, RequestOperation, ConfigType, SqlCommand, ConfigField, OptionField, CredentialField, Detect | ||
| ) | ||
| from skyflow.utils.logger import log_info, log_error_log | ||
| from skyflow.vault.detect import DeidentifyTextRequest, ReidentifyTextRequest, TokenFormat, Transformations, \ | ||
| @@ -142,8 +142,8 @@ def validate_credentials(logger, credentials, config_id_type=None, config_id=Non | ||
| ) | ||
| if is_expired(credentials.get(CredentialField.TOKEN), logger): | ||
| raise SkyflowError( | ||
| SkyflowMessages.Error.INVALID_CREDENTIALS_TOKEN.value.format(config_id_type, config_id) | ||
| if config_id_type and config_id else SkyflowMessages.Error.INVALID_CREDENTIALS_TOKEN.value, | ||
| SkyflowMessages.Error.EXPIRED_BEARER_TOKEN.value | ||
| if config_id_type and config_id else SkyflowMessages.Error.EXPIRED_BEARER_TOKEN.value, | ||
| invalid_input_error_code | ||
| ) | ||
| elif CredentialField.API_KEY in credentials: | ||
| @@ -247,10 +247,8 @@ def validate_connection_config(logger, config): | ||
| SkyflowMessages.Error.INVALID_CONNECTION_URL.value.format(connection_id) | ||
| ) | ||
| if ConfigField.CREDENTIALS not in config: | ||
| raise SkyflowError(SkyflowMessages.Error.EMPTY_CREDENTIALS.value.format(ConfigType.CONNECTION, connection_id), invalid_input_error_code) | ||
| validate_credentials(logger, config.get(ConfigField.CREDENTIALS), ConfigType.CONNECTION, connection_id) | ||
| if "credentials" in config: | ||
| validate_credentials(logger, config.get("credentials"), "connection", connection_id) | ||
| return True | ||
| @@ -408,7 +406,7 @@ def validate_deidentify_file_request(logger, request: DeidentifyFileRequest): | ||
| if hasattr(request, DeidentifyFileRequestField.WAIT_TIME) and request.wait_time is not None: | ||
| if not isinstance(request.wait_time, (int, float)): | ||
| raise SkyflowError(SkyflowMessages.Error.INVALID_WAIT_TIME.value, invalid_input_error_code) | ||
| if request.wait_time < 0 and request.wait_time > 64: # noqa: PLR2004 | ||
| if request.wait_time < 0 or request.wait_time > Detect.WAIT_TIME: | ||
| raise SkyflowError(SkyflowMessages.Error.WAIT_TIME_GREATER_THEN_64.value, invalid_input_error_code) | ||
| def validate_insert_request(logger, request): | ||
| @@ -432,9 +430,6 @@ def validate_insert_request(logger, request): | ||
| if key is None or key == "": | ||
| log_error_log(SkyflowMessages.ErrorLogs.EMPTY_OR_NULL_KEY_IN_VALUES.value.format(RequestOperation.INSERT), logger = logger) | ||
| if value is None or value == "": | ||
| log_error_log(SkyflowMessages.ErrorLogs.EMPTY_OR_NULL_VALUE_IN_VALUES.value.format(RequestOperation.INSERT, key), logger = logger) | ||
| if request.upsert is not None and (not isinstance(request.upsert, str) or not request.upsert.strip()): | ||
| log_error_log(SkyflowMessages.ErrorLogs.EMPTY_UPSERT.value(RequestOperation.INSERT), logger = logger) | ||
| raise SkyflowError(SkyflowMessages.Error.INVALID_UPSERT_OPTIONS_TYPE.value, invalid_input_error_code) | ||
| @@ -592,8 +587,8 @@ def validate_get_request(logger, request): | ||
| raise SkyflowError(SkyflowMessages.Error.INVALID_COLUMN_VALUE.value.format(type(column_values)), invalid_input_error_code) | ||
| if column_name and not column_values: | ||
| log_error_log(SkyflowMessages.ErrorLogs.COLUMN_NAME_IS_REQUIRED.value.format(RequestOperation.GET), logger = logger) | ||
| SkyflowError(SkyflowMessages.Error.INVALID_COLUMN_NAME.value.format(type(column_name)), invalid_input_error_code) | ||
| log_error_log(SkyflowMessages.ErrorLogs.COLUMN_NAME_IS_REQUIRED.value.format("GET"), logger = logger) | ||
| raise SkyflowError(SkyflowMessages.Error.INVALID_COLUMN_VALUES.value, invalid_input_error_code) | ||
saileshwar-skyflow marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| if (column_name or column_values) and skyflow_ids: | ||
| log_error_log(SkyflowMessages.ErrorLogs.BOTH_IDS_AND_COLUMN_NAME_PASSED.value.format(RequestOperation.GET), logger = logger) | ||
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Uh oh!
There was an error while loading. Please reload this page.