BasPH commented on code in PR #59224:
URL: https://github.com/apache/airflow/pull/59224#discussion_r2601667581


##########
airflow-core/src/airflow/models/variable.py:
##########
@@ -173,7 +173,7 @@ def get(
         if var_val is None:
             if default_var is not cls.__NO_DEFAULT_SENTINEL:
                 return default_var
-            raise KeyError(f"Variable {key} does not exist")
+            raise KeyError(f"Variable {key} does not exist. Try using a full 
path to your secret if you have one.")

Review Comment:
   This applies to all variables, regardless of how they're fetched (secrets 
backend/DB/etc.), would remove.



##########
airflow-core/src/airflow/models/variable.py:
##########
@@ -487,6 +487,7 @@ def get_variable_from_secrets(key: str) -> str | None:
                 )
 
         SecretCache.save_variable(key, var_val)  # we save None as well
+        # should I change this return file to include error message?

Review Comment:
   This also applies to all variables, would limit changes to the 
Vault-specific code only.



-- 
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]

Reply via email to