-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor Text2EverythingClient to use access_token and workspace_name #7
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
Conversation
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
… instead of api_key. Update documentation and examples accordingly to reflect the new authentication method.
…mentation - Introduced a new method `test_connection_detailed` in `ConnectorsResource` to return detailed connection test results, including elapsed time. - Updated documentation to include examples for both basic and detailed connection testing.
…sword storage and secret management - Modified `ConnectorBase`, `ConnectorCreate`, and `ConnectorUpdate` models to allow for optional password and password secret ID fields. - Enhanced `ConnectorsResource` to validate password or secret ID for Snowflake connections, ensuring either can be provided. - Updated tests to conditionally create Snowflake connectors based on the presence of required environment variables, with a fallback to PostgreSQL for local testing.
…tication - Updated the test for creating Snowflake connectors to prefer key-pair authentication if available, falling back to password authentication if not. - Improved environment variable handling for Snowflake connection parameters, including optional passphrase support for encrypted private keys. - Added detailed logging for successful connector creation and warnings for missing environment variables.
- Updated the test suite for connectors to catch exceptions during connector updates and listing by type, ensuring that errors do not block the entire test suite. - Added informative logging for skipped tests due to errors, enhancing the robustness of the testing process.
…flake connectors - Added logic to resolve the password_secret_id from existing connector data if not provided, ensuring API validation without rotating secrets for non-Snowflake databases. - Improved handling of password and secret management during connector updates.
- Updated the connector test suite to include non-blocking connection tests for all created connectors, improving error handling and logging. - Added both boolean and detailed connection tests, providing comprehensive feedback on connection status and elapsed time for each connector. - Improved resilience of tests by ensuring exceptions during connection tests are logged without interrupting the test flow.
…or selection logic - Updated the `BaseTestRunner` to explicitly define the type of `client` as `Optional[Text2EverythingClient]`. - Simplified the connector selection process in `ExecutionsTestRunner` to prioritize an environment-provided connector ID, enhancing flexibility and reducing reliance on automatic connector creation.
…iable - Updated the chat testing logic to prefer the `EXECUTIONS_CONNECTOR_ID` from environment variables for connector selection, enhancing flexibility. - Removed the previous automatic connector search and creation process, simplifying the setup for chat operations.
- Bump SDK version from 0.1.5 to 0.1.6 - Add built distribution files (wheel and tar.gz) to dist/ - Update quick start notebook to use h2o_authn TokenProvider for authentication - Replace direct ACCESS_TOKEN usage with platform token-based auth flow - Fix SDK installation path to reference dist/ directory This change improves authentication by integrating the h2o_authn library, providing a more secure token refresh mechanism using platform tokens instead of static OIDC access tokens.
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.
This pull request updates authentication and configuration throughout the SDK and documentation to use OIDC access tokens and workspace scoping instead of the previous API key approach. The changes affect the client initialization, environment variable names, and request headers, ensuring more secure and flexible authentication. All relevant usage examples, guides, and documentation have been revised to reflect these updates.
Authentication and Client Initialization:
api_key
withaccess_token
and addedworkspace_name
as an optional parameter in theText2EverythingClient
constructor and all usage examples (client.py
, documentation, guides, notebooks). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22]Environment Variable and Configuration Updates:
.env
file examples to useT2E_ACCESS_TOKEN
andT2E_WORKSPACE_NAME
instead of API key variables. [1] [2] [3] [4] [5] [6] [7]Request Header Changes:
Authorization: Bearer <access_token>
and added support forX-Workspace-Name
when provided, removing the legacyX-API-Key
header. [1] [2] [3]Documentation and Example Consistency:
Backward Compatibility and Error Handling:
access_token
instead ofapi_key
during client initialization, ensuring users migrate to the new authentication method.Let me know if you have questions about how to migrate your code or environment to use the new authentication scheme!