We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a7c2be commit ebc9b52Copy full SHA for ebc9b52
airbyte_cdk/cli/airbyte_cdk/_secrets.py
@@ -327,12 +327,13 @@ def _write_secret_file(
327
Returns:
328
Optional[str]: Error message if no enabled version is found, None otherwise
329
"""
330
- # List all enabled versions of the secret
331
- # This ensures versions[0] will be the most recently created enabled version
+ # List all enabled versions of the secret.
332
response = client.list_secret_versions(
333
request={"parent": secret.name, "filter": "state:ENABLED"}
334
)
335
+ # The API returns versions pre-sorted in descending order, with the
336
+ # 0th item being the latest version.
337
versions = list(response)
338
339
if not versions:
0 commit comments