Skip to content

Commit ebc9b52

Browse files
authored
Update airbyte_cdk/cli/airbyte_cdk/_secrets.py
1 parent 5a7c2be commit ebc9b52

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

airbyte_cdk/cli/airbyte_cdk/_secrets.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,12 +327,13 @@ def _write_secret_file(
327327
Returns:
328328
Optional[str]: Error message if no enabled version is found, None otherwise
329329
"""
330-
# List all enabled versions of the secret
331-
# This ensures versions[0] will be the most recently created enabled version
330+
# List all enabled versions of the secret.
332331
response = client.list_secret_versions(
333332
request={"parent": secret.name, "filter": "state:ENABLED"}
334333
)
335334

335+
# The API returns versions pre-sorted in descending order, with the
336+
# 0th item being the latest version.
336337
versions = list(response)
337338

338339
if not versions:

0 commit comments

Comments
 (0)