Skip to content

Fix issues #13569, #6077, and #13080 - #14541

Open
manish08k wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
manish08k:fix/issues-13569-6077-13080
Open

Fix issues #13569, #6077, and #13080#14541
manish08k wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
manish08k:fix/issues-13569-6077-13080

Conversation

@manish08k

Copy link
Copy Markdown

Description

This PR addresses the following issues:

Changes

  • Updated the Airflow database cleanup sample.
  • Updated Endpoints JWT audience configuration.
  • Updated the Text-to-Speech streaming WAV sample.

Testing

  • Verified the changes against the current main branch.
  • Ran git diff --check.

Related Issues

Fixes #13569
Fixes #6077
Fixes #13080

@manish08k
manish08k requested review from a team as code owners August 26, 2026 08:31
@product-auto-label product-auto-label Bot added samples Issues that are directly related to samples. api: composer Issues related to the Managed Service for Apache Airflow API. api: endpoints Issues related to the Cloud Endpoints API. api: texttospeech Issues related to the Text-to-Speech API. labels Aug 26, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Airflow DB cleanup workflow, adds commented-out configuration instructions for custom JWT audiences in the Bookstore gRPC endpoints, and updates the Text-to-Speech streaming quickstart snippet to write the audio stream into a playable WAV file. In airflow_db_cleanup.py, removing + [None] prevents rows with a NULL dag_id from being cleaned up. A suggestion was made to use a list comprehension that preserves None as None and only converts non-null values to strings.

session.commit()

list_dags = [str(list(dag)[0]) for dag in dags] + [None]
list_dags = [str(list(dag)[0]) for dag in dags]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

By removing + [None], any database rows with a NULL dag_id (which are common in tables like Log) will never be cleaned up. Furthermore, converting None to a string (str(None)) results in "None", which causes a useless query for a DAG literally named "None".

Using a list comprehension that preserves None as None and only converts non-null values to strings solves both issues: it correctly cleans up NULL dag_id rows when they exist, avoids querying for the literal string "None", and avoids running redundant None queries for tables that do not contain any NULL dag_ids.

Suggested change
list_dags = [str(list(dag)[0]) for dag in dags]
list_dags = [str(dag[0]) if dag[0] is not None else None for dag in dags]

@leahecole leahecole removed their assignment Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: composer Issues related to the Managed Service for Apache Airflow API. api: endpoints Issues related to the Cloud Endpoints API. api: texttospeech Issues related to the Text-to-Speech API. samples Issues that are directly related to samples.

Projects

None yet

2 participants