You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "kkeiichi (via GitHub)" <gi...@apache.org> on 2024/10/09 17:15:13 UTC

[I] xcom saved value of type numpy.bool_ is changed from False to True [airflow]

kkeiichi opened a new issue, #42868:
URL: https://github.com/apache/airflow/issues/42868

   ### Apache Airflow version
   
   2.10.2
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   A `False` value of `numpy.bool_` type pushed to xcom is changed to `True` on pull. A `True` `numpy.bool_` value stays `True`.
   A regular Python `bool` value works fine.
   
   
   ### What you think should happen instead?
   
   `False` value of `numpy.bool_` type pushed to xcom should stay `False`.
   
   ### How to reproduce
   
       from datetime import datetime
       import logging
       from airflow.models.dag import DAG
       from airflow.operators.python import PythonOperator
       import numpy
       
       
       def xcom_test(ti):
           value_in = numpy.bool_(False)
           ti.xcom_push(key="test_value", value=value_in)
           value_out = ti.xcom_pull(key="test_value", task_ids="xcom_test")
           logging.info("In: " + str(value_in))
           logging.info("Out: " + str(value_out))
       
       
       with DAG(
               "test",
               start_date=datetime(2024, 8, 27),
               schedule=None,
               catchup=False,
               max_active_runs=1
       ) as dag:
           PythonOperator(
               task_id="xcom_test",
               python_callable=xcom_test
           )
   
   Logs:
   
       [2024-10-09, 18:56:12 CEST] {test.py:12} INFO - In: False
       [2024-10-09, 18:56:12 CEST] {test.py:13} INFO - Out: True
   
   ### Operating System
   
   Ubuntu 24.04
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] xcom saved value of type numpy.bool_ is changed from False to True [airflow]

Posted by "gopidesupavan (via GitHub)" <gi...@apache.org>.
gopidesupavan commented on issue #42868:
URL: https://github.com/apache/airflow/issues/42868#issuecomment-2403193794

   hm, strange, looking into that.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] xcom saved value of type numpy.bool_ is changed from False to True [airflow]

Posted by "kkeiichi (via GitHub)" <gi...@apache.org>.
kkeiichi commented on issue #42868:
URL: https://github.com/apache/airflow/issues/42868#issuecomment-2403443569

   No reason. It just seemed odd to me. I intended to use a regular bool, but accidentally used numpy. I was surprised by the result.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] xcom saved value of type numpy.bool_ is changed from False to True [airflow]

Posted by "gopidesupavan (via GitHub)" <gi...@apache.org>.
gopidesupavan commented on issue #42868:
URL: https://github.com/apache/airflow/issues/42868#issuecomment-2403305431

   Alright the value numpy type not supported currently in xcom. any reason your using xcom for numpy types?


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] xcom saved value of type numpy.bool_ is changed from False to True [airflow]

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #42868:
URL: https://github.com/apache/airflow/issues/42868#issuecomment-2402874978

   Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] xcom saved value of type numpy.bool_ is changed from False to True [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk closed issue #42868: xcom saved value of type numpy.bool_ is changed from False to True
URL: https://github.com/apache/airflow/issues/42868


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org