junyeong0619 commented on code in PR #66022:
URL: https://github.com/apache/airflow/pull/66022#discussion_r3215499294
##########
task-sdk/src/airflow/sdk/definitions/variable.py:
##########
@@ -67,6 +67,23 @@ def set(cls, key: str, value: Any, description: str | None =
None, serialize_jso
except AirflowRuntimeError as e:
log.exception(e)
+ @classmethod
+ def keys(cls, prefix: str | None = None) -> list[str]:
+ """
+ Return Variable keys that start with the given prefix.
+
+ The keys are fetched lazily on first access (iteration, indexing, len,
etc.)
+ and cached for subsequent access. Only keys stored in the metadata
database
+ are returned — secrets backends are not consulted.
Review Comment:
Added a `.. note::` block to `Variable.keys()` docstring linking to #61166
for context.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]