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/18 09:13:44 UTC
[GitHub] [airflow] omarsmak opened a new issue #22358: ScheduleInterval schema in OpenAPI specs should have "nullable: true" otherwise generated OpenAPI client will throw an error in case of nullable "schedule_interval"
omarsmak opened a new issue #22358:
URL: https://github.com/apache/airflow/issues/22358
### Apache Airflow version
2.2.4 (latest released)
### What happened
Currently we have this schema definition in the OpenAPI specs:
```
ScheduleInterval:
description: |
Schedule interval. Defines how often DAG runs, this object gets added to your latest task instance's
execution_date to figure out the next schedule.
readOnly: true
oneOf:
- $ref: '#/components/schemas/TimeDelta'
- $ref: '#/components/schemas/RelativeDelta'
- $ref: '#/components/schemas/CronExpression'
discriminator:
propertyName: __type
```
The issue with above is, when using an OpenAPI generator for Java for example (I think is same for other languages as well), it will treat `ScheduleInterval` as **non-nullable** property, although what is returned under `/dags/{dag_id}` or `/dags/{dag_id}/details` in case of a `None` `schedule_interval` is `null` for `schedule_interval`.
### What you think should happen instead
We should have `nullable: true` in `ScheduleInterval` schema which will allow `schedule_interval` to be parsed as `null`.
### How to reproduce
_No response_
### Operating System
Linux
### Versions of Apache Airflow Providers
_No response_
### Deployment
Official Apache Airflow Helm Chart
### Deployment details
_No response_
### Anything else
If the maintainers think is a valid bug, I will be more than happy to submit a PR :)
### 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] kianelbo commented on issue #22358: ScheduleInterval schema in OpenAPI specs should have "nullable: true" otherwise generated OpenAPI client will throw an error in case of nullable "schedule_interval"
Posted by GitBox <gi...@apache.org>.
kianelbo commented on issue #22358:
URL: https://github.com/apache/airflow/issues/22358#issuecomment-1086819214
Does adding `allow_none=True` argument to [schedule_interval field](https://github.com/apache/airflow/blob/main/airflow/api_connexion/schemas/dag_schema.py#L64) suffice?
If so, may I open the PR?
--
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] uranusjr commented on issue #22358: ScheduleInterval schema in OpenAPI specs should have "nullable: true" otherwise generated OpenAPI client will throw an error in case of nullable "schedule_interval"
Posted by GitBox <gi...@apache.org>.
uranusjr commented on issue #22358:
URL: https://github.com/apache/airflow/issues/22358#issuecomment-1072233709
Good catch. Pull request would be very welcomed!
--
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] uranusjr commented on issue #22358: ScheduleInterval schema in OpenAPI specs should have "nullable: true" otherwise generated OpenAPI client will throw an error in case of nullable "schedule_interval"
Posted by GitBox <gi...@apache.org>.
uranusjr commented on issue #22358:
URL: https://github.com/apache/airflow/issues/22358#issuecomment-1072233709
Good catch. Pull request would be very welcomed!
--
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] boring-cyborg[bot] commented on issue #22358: ScheduleInterval schema in OpenAPI specs should have "nullable: true" otherwise generated OpenAPI client will throw an error in case of nullable "schedule_interval"
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #22358:
URL: https://github.com/apache/airflow/issues/22358#issuecomment-1072219332
Thanks for opening your first issue here! Be sure to follow the issue template!
--
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] omarsmak commented on issue #22358: ScheduleInterval schema in OpenAPI specs should have "nullable: true" otherwise generated OpenAPI client will throw an error in case of nullable "schedule_interval"
Posted by GitBox <gi...@apache.org>.
omarsmak commented on issue #22358:
URL: https://github.com/apache/airflow/issues/22358#issuecomment-1086825445
I think it doesn't really help, the issue will be on the generated client side.
Feel free to open a PR as I haven't get the time yet
--
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] boring-cyborg[bot] commented on issue #22358: ScheduleInterval schema in OpenAPI specs should have "nullable: true" otherwise generated OpenAPI client will throw an error in case of nullable "schedule_interval"
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #22358:
URL: https://github.com/apache/airflow/issues/22358#issuecomment-1072219332
Thanks for opening your first issue here! Be sure to follow the issue template!
--
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