google: warn when remote_log_conn_id is configured but not found#67510
Open
potiuk wants to merge 1 commit into
Open
google: warn when remote_log_conn_id is configured but not found#67510potiuk wants to merge 1 commit into
potiuk wants to merge 1 commit into
Conversation
``GCSRemoteLogIO.hook`` silently swallowed ``AirflowNotFoundException`` when the configured ``remote_log_conn_id`` did not exist, falling back to Application Default Credentials without any signal. That made a misconfigured remote-log connection (logs effectively going through the wrong credentials) invisible to operators — a security-control failure with no operational indication. Replace the silent ``pass`` with a ``self.log.warning`` mentioning the unresolved conn_id so the fallback is visible in worker logs. The behaviour (falling back to ADC) is unchanged for the case where no ``remote_log_conn_id`` is configured.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
GCSRemoteLogIO.hooksilently swallowedAirflowNotFoundExceptionwhen the configuredremote_log_conn_iddid not exist, falling back to Application Default Credentials without any signal. That made a misconfigured remote-log connection (logs effectively going through the wrong credentials) invisible to operators — a security-control failure with no operational indication.Reported as F-008 in the
apache/tooling-agentsL3 providers/google sweepb1aec75.Change
Replace the silent
passatgcs_task_handler.py:97-98withself.log.warningmentioning the unresolvedconn_idso the fallback is visible in worker logs. Behaviour (falling back to ADC) is unchanged when noremote_log_conn_idis configured.Test plan
test_hook_warns_when_remote_log_conn_id_missing— patchesGCSHookto raiseAirflowNotFoundException, asserts the warning is emitted with the unresolved conn_id name andhook is None.test_hook_silent_when_no_remote_log_conn_id_configured— empty conn_id means silent fall-through to ADC, no warning emitted.prek run ruffclean.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.7) following the guidelines