1fanwang commented on issue #75865:
URL: https://github.com/apache/airflow/issues/75865#issuecomment-6490494336

   > Please let us know by checking the box / commenting if the change is 
addressed in the latest RC.
   
   @vatsrahul1001 Both of my changes work as expected in 3.4.0rc1, compared 
against 3.3.2.
   
   https://github.com/apache/airflow/pull/71529: with OTEL_CONFIG_FILE set, a 
real scheduler now exports through the file's exporter and view. 3.3.2 discards 
them.
   
   https://github.com/apache/airflow/pull/71251: with only PyMySQL installed, 
db migrate and a Dag run succeed on MySQL 8.4. 3.3.2 raises the mysqlclient 
RuntimeError.
   
   <details><summary>Evidence</summary>
   
   apache-airflow 3.4.0rc1 and task-sdk 1.4.0rc1 from PyPI with the 3.4.0rc1 
constraints file, Python 3.12, macOS arm64. The control is apache-airflow 
3.3.2, the latest 3.3.x release.
   
   71529: opentelemetry-instrument airflow scheduler for 35 s with otel_on=True 
and an OTEL_CONFIG_FILE that declares a console exporter and a *_duration view 
with explicit bounds.
   
   ```
   3.3.2     console exports: 0
             [error] Failed to export metrics batch code: None, reason: Failed 
to parse: http://None:None/v1/metrics
   3.4.0rc1  console exports: 9
             [info] OTEL_CONFIG_FILE is set; using the MeterProvider it built.
             airflow.scheduler.scheduler_loop_duration  explicit_bounds=[0.5, 
1, 2, 4, 8]  bucket_counts=[0, 0, 0, 0, 0, 5]
             same bounds on critical_section_duration, 
critical_section_query_duration, executor_heartbeat_duration
   ```
   
   The repro script from the PR (bootstrap, then get_otel_logger()):
   
   ```
   3.3.2     declarative views: ['None']        same provider object? False   
RESULT: declarative view was DISCARDED
   3.4.0rc1  declarative views: ['*_duration']  same provider object? True    
RESULT: declarative view survived
   ```
   
   Without OTEL_CONFIG_FILE the re-init path is unchanged on both versions: the 
provider is replaced and a post-fork counter still exports.
   
   71251: MySQL 8.4.13 on localhost, PyMySQL 1.1.3 and aiomysql installed, 
mysqlclient not installed.
   
   ```
   3.3.2     $ airflow db migrate
             RuntimeError: You do not have `mysqlclient` package installed. 
Please install it with `pip install mysqlclient` ...
   3.4.0rc1  $ airflow db migrate
             [info] Running stamp_revision  -> b4f1a7d2c903
             [info] Database migration done!
             $ airflow db check
             [info] Connection successful.
             $ airflow standalone, then airflow dags trigger mysql_smoke (two 
tasks passing an XCom)
             DagRun Finished: dag_id=mysql_smoke, ..., run_duration=2.945011, 
state=success
   ```
   
   Neither driver installed, 3.4.0rc1:
   
   ```
   RuntimeError: You have a MySQL connection string but neither `mysqlclient` 
nor `PyMySQL` is installed. Install one of them, ...
   ```
   
   Both drivers installed, 3.4.0rc1 with mysqlclient 2.3.0: airflow db check 
prints "Connection successful." with both mysql+mysqldb and mysql+pymysql URLs.
   
   </details>
   
   ---
   Drafted-by: GitHub Copilot CLI (Claude Sonnet 5.5); reviewed by @1fanwang 
before posting
   


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