mtsadler-branch commented on PR #34446:
URL: https://github.com/apache/airflow/pull/34446#issuecomment-2100884831

   > Who are the offenders here?
   
   Issue #34419 mentions `google_cloud_platform` as an offender.
   
   I see that the latest code still has this 
[logging.warn()](https://github.com/apache/airflow/blob/main/airflow/models/connection.py#L274-L278)
 message.
   
   **Issue:**
   From my perspective:
   - Updating `GCP's scheme` to an RFC3986 compliant name feels like a breaking 
change
   - But I also want to silence these warnings, without messing around with the 
`logging_level`
   
   My task logs get cluttered with:
   ```
   {connection.py:269} WARNING - Connection schemes (type: 
google_cloud_platform) shall not contain '_' according to RFC3986.
   ```
   
   **Potential Solutions:**
   - Option 1:
   We filter out `google_cloud_platform` from the warning, by changing [this 
line](https://github.com/apache/airflow/blob/main/airflow/models/connection.py#L274-L278)
 from:
   ```
   if self.conn_type and "_" in self.conn_type:
   ```
   to:
   ```
   if self.conn_type and self.conn_type != "google_cloud_platform" and "_" in 
self.conn_type:
   ```
   
   - Option 2:
   We add a configurable param to `airflow.cfg` to silence certain warnings.
   ```
   logging.ignored_warnings = ["RFC3986"]
   ```
   
   CC: @potiuk @kuikeelc @uranusjr 


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