Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve warning in Dataset Alias migration #43421

Merged
merged 1 commit into from
Oct 28, 2024

Commits on Oct 28, 2024

  1. Resolve warning in Dataset Alias migration

    This PR resolves an SQLAlchemy warning in the migration by correctly setting the `alias_id` column as part of the primary key in the `dag_schedule_dataset_alias_reference` table. Previously, only dag_id was marked as the primary key, causing a mismatch with the local definition, which triggered an SAWarning.
    
    Example: https://github.com/apache/airflow/actions/runs/11526187767/job/32090094094?pr=43243#step:6:745
    
    ```
    /opt/airflow/airflow/migrations/versions/0026_2_10_0_dag_schedule_dataset_alias_reference.py:46 SAWarning: Table 'dag_schedule_dataset_alias_reference' specifies columns 'dag_id' as primary_key=True, not matching locally specified columns 'alias_id', 'dag_id'; setting the current primary key columns to 'alias_id', 'dag_id'. This warning may become an exception in a future release
    ```
    
    I verified that both columns are marked as primary keys already in 2.10.
    kaxil authored and Lee-W committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    fbe7c3c View commit details
    Browse the repository at this point in the history