Vasu-Madaan commented on PR #53477:
URL: https://github.com/apache/airflow/pull/53477#issuecomment-3515440555

   checks added on pod creation and tested with test cases:
   
   Labels in actual pod:
   ```
   Start Time:       Tue, 11 Nov 2025 13:26:26 +0530
   Labels:           a=
                     airflow_kpo_in_cluster=False
                     airflow_version=3.2.0
                     dag_id=kpo_none_label_bug_report
                     foo=bar
                     kubernetes_pod_operator=True
                     run_id=manual__2025-11-11T0756220000-6fb3e7376
                     task_id=kpo_with_none_label
                     try_number=1
   ```
   
   Test cases before:
   ```
   FAILED 
providers/cncf/kubernetes/tests/unit/cncf/kubernetes/operators/test_pod.py::TestKubernetesPodOperator::test_labels[True]
 - AssertionError: assert equals failed
     {                                         {                                
        
       'airflow_kpo_in_cluster': 'True',         'airflow_kpo_in_cluster': 
'True',      
       'airflow_version': '3.2.0',               'airflow_version': <ANY>,      
        
       'dag_id': 'dag',                          'dag_id': 'dag',               
        
       'foo': 'bar',                             'foo': 'bar',                  
        
       'kubernetes_pod_operator': 'True',        'kubernetes_pod_operator': 
'True',     
       'none_value': None,                       'none_value': '',              
        
       'run_id': 'test',                         'run_id': 'test',              
        
       'task_id': 'task',                        'task_id': 'task',             
        
       'try_number': '0',                        'try_number': <ANY>,           
        
     }                                         }
   FAILED 
providers/cncf/kubernetes/tests/unit/cncf/kubernetes/operators/test_pod.py::TestKubernetesPodOperator::test_labels[False]
 - AssertionError: assert equals failed
     {                                         {                                
        
       'airflow_kpo_in_cluster': 'False',        'airflow_kpo_in_cluster': 
'False',     
       'airflow_version': '3.2.0',               'airflow_version': <ANY>,      
        
       'dag_id': 'dag',                          'dag_id': 'dag',               
        
       'foo': 'bar',                             'foo': 'bar',                  
        
       'kubernetes_pod_operator': 'True',        'kubernetes_pod_operator': 
'True',     
       'none_value': None,                       'none_value': '',              
        
       'run_id': 'test',                         'run_id': 'test',              
        
       'task_id': 'task',                        'task_id': 'task',             
        
       'try_number': '0',                        'try_number': <ANY>,           
        
   ```
   
   Test cases after:
   ```
   
providers/cncf/kubernetes/tests/unit/cncf/kubernetes/operators/test_pod.py::TestKubernetesPodOperator::test_labels[True]
 PASSED [ 50%]
   
providers/cncf/kubernetes/tests/unit/cncf/kubernetes/operators/test_pod.py::TestKubernetesPodOperator::test_labels[False]
 PASSED [100%]
   ````
   


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