-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
datetime in parameters cause "TypeError: Object of type set is not JSON serializable" #19519
Comments
@ajbosco, can you provide a DAG that reproduces this? The DAGs I have handy that use set and datetime params work. |
could not repro with this task |
Try pendulum datetime @dstandish |
|
no luck
|
We need example then @ajbosco :) |
Yup, let's just wait until then. Also please double-check with the Airflow version in the Footer of the webserver or airflow CLI to confirm that you are using 2.2.2rc1 |
Welp....I think there was some issue in the database I was using. I started over from scratch and cannot reproduce this error either. My bad! |
@ajbosco Awesome, can you change your vote on the mailing list too, please :) |
@ajbosco, it's not impossible that you encountered some kind of issue with upgrade, deserializing dags that were serialized prior to 2.2.0. If that's what you were seeing, it would be really good if you could let us know. I.e. we try to be backwards compatible but if there was an issue then that would be great if we could try to repro and fix. If you think that might be what was going on and you can repro LMK. I can try to check this too. What version are you upgrading from? |
Also I think we have a new "dags reserialize" coming - #19471 - which is really good idea because the "serialized" form of DAGs is pretty safe to delete and recreate. I just wonder if this is not something that we should always do after/during upgrade "just in case". It might slow-down initial dag refresh, but at least we can be sure that everything in serialized dags is "correct". |
Exception being likely DAGs tha have been deleted already. |
This I agree with completely |
Looks like it's back? Or at least something very similar (in this case a timedelta not being json serializable). Should I create a new ticket for this or just add my log here?
Ooops!
Something bad has happened.
Airflow is used by many users, and it is very likely that others had similar problems and you can easily find Consider following these steps:
Python version: 3.9.14
|
it's not clear that this this is from params. can you include minimal dag file example |
Huh, strangely, without changing anything config-wise, it now works. I did encounter it on a dag that just changed (I added a task, which hadn't run yet). Could that have caused it? |
dunno 🤷 |
Apache Airflow version
2.2.2rc1
Operating System
Debian Buster (docker)
Versions of Apache Airflow Providers
n/a
Deployment
Other 3rd-party Helm chart
Deployment details
No response
What happened
The DAG parses and runs fine on 2.1.3, but when we upgrade to the latest version it fails to import:
What you expected to happen
No response
How to reproduce
No response
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: