kaxil commented on issue #56426:
URL: https://github.com/apache/airflow/issues/56426#issuecomment-3371713633

   For anyone running into this issue, you can do one of the following things 
temporarily until 3.1.1 is out:
   
   ## 1. Apply the official patch (Recommended)
   
   Use the patch from the [backport PR 
#56431](https://github.com/apache/airflow/pull/56431):
   
   ```dockerfile
   FROM astrocrpublic.azurecr.io/runtime:3.1
   
   USER root
   RUN apt update && apt install -y patch curl patchutils
   
   RUN set -ex; \
       cd /usr/local/lib/python3.12/site-packages/airflow; \
       curl -L 
https://patch-diff.githubusercontent.com/raw/apache/airflow/pull/56431.patch \
       | filterdiff -p1 -i 'airflow-core/src/airflow/*' | patch -p4 -u --verbose
   
   USER astro
   ```
   
   ## 2. Use sed/replace (Simpler alternative)
   
   Similar to (1), but uses sed instead of patch:
   
   ```dockerfile
   FROM astrocrpublic.azurecr.io/runtime:3.1
   
   USER root
   
   RUN set -ex; \
       cd /usr/local/lib/python3.12/site-packages/airflow; \
       sed -i 's/EmailNotificationRequest/EmailRequest/g' \
           callbacks/callback_requests.py \
           dag_processing/processor.py \
           jobs/scheduler_job_runner.py; \
       echo -e '\n# Backwards compatibility alias\nEmailNotificationRequest = 
EmailRequest' >> callbacks/callback_requests.py
   
   USER astro
   ```
   
   ## 3. Increase column size (Database change)
   
   Modify the `callback_type` column in the `callback_request` table to allow 
longer names:
   
   ```sql
   -- PostgreSQL
   ALTER TABLE callback_request ALTER COLUMN callback_type TYPE VARCHAR(50);
   
   -- MySQL
   ALTER TABLE callback_request MODIFY callback_type VARCHAR(50) NOT NULL;
   
   -- SQLite (requires table recreation via Alembic or manual process)
   ```
   
   **Note:** This requires database migration and may need downtime.
   
   ---
   
   ## Recommendations
   
   - **For Docker/containerized deployments**: Use option 1 or 2 (code patch)
   - **For production systems with database access**: Use option 3 (increase to 
50)
   
   


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