You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/03/07 11:37:01 UTC

[GitHub] [airflow] frodo2000 opened a new issue #22047: Invalid quotes in json variable set by Variable.set

frodo2000 opened a new issue #22047:
URL: https://github.com/apache/airflow/issues/22047


   ### Apache Airflow version
   
   2.2.3
   
   ### What happened
   
   When 
   
   Variable.set(
   	self.variable_name,
   	self.variable_value,
   	True,
   	None
   )
   
   is used, Airflow variable contains single quotes instead of double one.
   Current workaround is to use:
   
   Variable.set(
   	self.variable_name,
   	json.dumps(self.variable_value,indent=2),
   	False,
   	None
   )
   
   ### What you expected to happen
   
   Double quotes instead of single ones in variable value
   
   ### How to reproduce
   
   _No response_
   
   ### Operating System
   
   RHEL 8
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] 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

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



[GitHub] [airflow] frodo2000 edited a comment on issue #22047: Invalid quotes in json variable set by Variable.set

Posted by GitBox <gi...@apache.org>.
frodo2000 edited a comment on issue #22047:
URL: https://github.com/apache/airflow/issues/22047#issuecomment-1060647462


   It my fault - I missed one parameter connected to Description - correct way is to use:
   
   Variable.set(
   self.variable_name,
   self.variable_value,
   serialize_json=True
   )


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



[GitHub] [airflow] frodo2000 closed issue #22047: Invalid quotes in json variable set by Variable.set

Posted by GitBox <gi...@apache.org>.
frodo2000 closed issue #22047:
URL: https://github.com/apache/airflow/issues/22047


   


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



[GitHub] [airflow] frodo2000 commented on issue #22047: Invalid quotes in json variable set by Variable.set

Posted by GitBox <gi...@apache.org>.
frodo2000 commented on issue #22047:
URL: https://github.com/apache/airflow/issues/22047#issuecomment-1060647462


   It my false - I missed one parameter


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