-
Notifications
You must be signed in to change notification settings - Fork 44
feat(cli): improve secrets fetch to handle disabled versions #540
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
Aaron ("AJ") Steers (aaronsteers)
merged 12 commits into
main
from
devin/1746805954-improved-secrets-fetch
May 9, 2025
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
aeae3af
feat(cli): improve secrets fetch to handle disabled versions
devin-ai-integration[bot] bb59d97
refactor: simplify exception class with kw_only=True and remove post_…
devin-ai-integration[bot] f6cba7e
refactor: create helper function for secret URL generation
devin-ai-integration[bot] 8790285
style: fix formatting issues
devin-ai-integration[bot] 2fd59c9
Update airbyte_cdk/cli/airbyte_cdk/_secrets.py
aaronsteers 5a7c2be
docs: add comment explaining version ordering in Secret Manager API
devin-ai-integration[bot] ebc9b52
Update airbyte_cdk/cli/airbyte_cdk/_secrets.py
aaronsteers 36bb330
style: update type hints to use modern lowercase syntax
devin-ai-integration[bot] ed1e60a
remove exception inheritance
aaronsteers a8cd0e7
refactor: create robust helper function for secret name extraction
devin-ai-integration[bot] 64fc46a
style: fix formatting issues in _extract_secret_name docstring
devin-ai-integration[bot] 18a112e
refactor: update exception handling to raise directly in inner function
devin-ai-integration[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Copyright (c) 2025 Airbyte, Inc., all rights reserved. | ||
| """Exceptions for the Airbyte CDK CLI.""" | ||
|
|
||
| from dataclasses import dataclass | ||
|
|
||
|
|
||
| @dataclass(kw_only=True) | ||
| class ConnectorSecretWithNoValidVersionsError(Exception): | ||
| """Error when a connector secret has no valid versions.""" | ||
|
|
||
| connector_name: str | ||
| secret_name: str | ||
| gcp_project_id: str | ||
|
|
||
| def __str__(self) -> str: | ||
| """Return a string representation of the exception.""" | ||
| from airbyte_cdk.cli.airbyte_cdk._secrets import _get_secret_url | ||
|
|
||
| url = _get_secret_url(self.secret_name, self.gcp_project_id) | ||
| return ( | ||
| f"No valid versions found for secret '{self.secret_name}' in connector '{self.connector_name}'. " | ||
| f"Please check the following URL for more information:\n- {url}" | ||
| ) |
Oops, something went wrong.
Oops, something went wrong.
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.