Skip to content
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

'external_trigger' in OpenAPI specs has a default value which as a result, will be always included in the request body by the generated OpenAPI specs #22365

Open
2 tasks done
omarsmak opened this issue Mar 18, 2022 · 3 comments
Assignees
Labels
affected_version:2.2 Issues Reported for 2.2 area:API Airflow's REST/HTTP API area:core good first issue kind:bug This is a clearly a bug Stale Bug Report

Comments

@omarsmak
Copy link
Member

Apache Airflow version

2.2.4 (latest released)

What happened

We have this in the DAGRun model:

      external_trigger:
          type: boolean
          default: true
          readOnly: true

We use the same model for both getting the dagrun details and trigging dagrun. However, since we include a default value, the generated OpenAPI client will include the default value nevertheless during POST /dags/{dag_id}/dagRuns which as a result the request will be failed in the validation process on Airflow side since this is a read only property and was set nevertheless by the default value.
For honesty, I am not sure if this shall be an Airflow bug or an OpenAPI generator bug (I think readOnly should be respected during and it should ignore the default value) but in the other hand, I don't really understand why has to be a default value for read only external_trigger 🤔 .
Removing the default value shall fix this issue.

What you think should happen instead

No response

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 you guys think this can be fixed on Airflow side, I will be happy to provide a PR .

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@omarsmak omarsmak added area:core kind:bug This is a clearly a bug labels Mar 18, 2022
@potiuk
Copy link
Member

potiuk commented Mar 21, 2022

Feel free to fix it.

@eladkal eladkal added area:API Airflow's REST/HTTP API good first issue affected_version:2.2 Issues Reported for 2.2 labels Feb 26, 2023
@eladkal
Copy link
Contributor

eladkal commented Feb 26, 2023

@omarsmak are you still working on this issue?

Copy link

This issue has been automatically marked as stale because it has been open for 365 days without any activity. There has been several Airflow releases since last activity on this issue. Kindly asking to recheck the report against latest Airflow version and let us know if the issue is reproducible. The issue will be closed in next 30 days if no further activity occurs from the issue author.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affected_version:2.2 Issues Reported for 2.2 area:API Airflow's REST/HTTP API area:core good first issue kind:bug This is a clearly a bug Stale Bug Report
Projects
None yet
Development

No branches or pull requests

3 participants