Skip to content

Log when a Snowpark container job returns no logs - #73011

Merged
potiuk merged 1 commit into
apache:mainfrom
justinpakzad:snowpark-containers-log-when-no-logs-fetched
Sep 20, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
justinpakzad:snowpark-containers-log-when-no-logs-fetched

Conversation

@justinpakzad

@justinpakzad justinpakzad commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

In the SnowparkContainerJobOperator, the _log_container_outputs silently skips when a job produces no logs. This might leave users thinking that the log collection process was skipped or didn't work as expected, when it did and there was just nothing to return. This PR adds a new line which logs that no logs were returned from the job. The existing test was updated to align with the new behavior.

Was generative AI tooling used to co-author this PR?
  • No (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@boring-cyborg boring-cyborg Bot added area:providers provider:snowflake Issues related to Snowflake provider labels Sep 11, 2026
@justinpakzad
justinpakzad force-pushed the snowpark-containers-log-when-no-logs-fetched branch from 2288504 to 72498e6 Compare September 12, 2026 13:06
@justinpakzad
justinpakzad marked this pull request as ready for review September 12, 2026 13:07

@potiuk potiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds a single log.info("No logs returned for instance_id %d", ...) before the early continue in SnowparkContainerJobOperator._log_container_output, so an empty SYSTEM$GET_SERVICE_LOGS result is visible in the task log instead of being silently skipped, and updates the one test that pinned the old silent behaviour.

Checked against main: the new line sits inside the existing if not response: block without touching anything around it, and the updated test_log_container_output_no_logs fails without the source change and passes with it. The helper is reached from the timeout, terminal-status and deferrable execute_complete paths, so the message appears wherever logs are collected.

Smaller observations

  • The modified test is the intended change here (the old assertion pinned exactly the silent skip this PR removes), so no concern; noting it because the review guidelines ask reviewers to check that case explicitly.
  • Design question, not a blocker: the new line is always INFO, including when the job ended FAILED or timed out (where existing output is logged at ERROR a few lines below). If you think a failed job with no output deserves a WARNING there, it would be a one-line tweak; fine as-is.

This review was drafted by an AI-assisted tool and
confirmed by an Apache Airflow maintainer. The maintainer
approving this PR has read the findings and signed off. If
something feels off, please reply on the PR and a maintainer
will follow up.

More on how Apache Airflow handles maintainer review:
contributing-docs/05_pull_requests.rst.

@potiuk
potiuk merged commit fcdbf2d into apache:main Sep 20, 2026
109 of 119 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:snowflake Issues related to Snowflake provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants