Comments (7)
cc: @msumit @ephraimbuddy @mik-laj ^^ -> I think we will need your opinion on that one too :).. just removing dag_id is not a huge breaking change, so I would be fine if we just explain it, personallly and explain this was really a buggy behaviour.
from airflow-client-python.
Related to #74 (both are exposed by the same test script).
from airflow-client-python.
I don't think this is a mistake. DagRun Schema has dump_only
dag_id (which seems normal). The dag_id
required for triggering a Dag Run is a path parameter, this is working on my end:
# DagRun
dag_run_api_instance = dag_run_api.DAGRunApi(api_client)
dag_id = "dynamic_task_group"
try:
api_response = dag_run_api_instance.post_dag_run(
dag_id,
dag_run_api.DAGRun(
dag_run_id="run_from_python_api_client",
),
)
pprint(api_response)
except airflow_client.client.OpenApiException as e:
print("Exception when calling DagRunApi->post_dag_run: %s\n" % e)
Note: Same problem for
external_trigger
,dump_only
. Already defaults toTrue
in the model and the applicative code, so REST API call will end up creating dagrun withextrenal_trigger
to True, you cannot set this to False for instance while triggering from the REST API. Which makes sense, those are external triggers.
from airflow-client-python.
I don't think this is a mistake. DagRun Schema has dump_only dag_id (which seems normal).
I am fine with that.
But I think that raises question - should we be adding an explanation about it in release notes ?
the problem with this is that it is not some artifficial example :).
It did work before (I used that script in the past to test it, and well it worked (I think the problem is that the new OpenAPI is more picky when it comes to validating stuff and it allows to do stuff like this :) (which I understand it should not be done):
dag_run = DAGRun(
dag_run_id='some_test_run',
dag_id=dag_id,
external_trigger=True,
)
And the thing is - the example comes from our repo:
https://github.com/apache/airflow-client-python/blob/main/dev/test_python_client.py
And this actually was added as a response to another issue #21 where dag triggering did not work at all :).
So we are facing high likelihood we are going to break workflows of the people whose problem we solved before and even gave them some examples on how to do stuff :)
Actually I am quite fine that we say now "you are doing it wrong" - I think that would be cleanest solution, but likely maybe we should explain it in release notes how to use DAG RUN triggering now at the very least ?
from airflow-client-python.
What do others think?
from airflow-client-python.
PR how it could look like here: #78
It also refreshes the infrastructure/examples a bit.
from airflow-client-python.
Nice catch @pierrejeambrun.
Since it worked before, mentioning it in #78 makes sense to me
from airflow-client-python.
Related Issues (20)
- API client configuration lack of support to pass verify_ssl for oauth based token authentication
- How to use cookies?
- why xcom api only provide read api without write api? HOT 1
- [openapi] wrong use of $ref and nullable HOT 3
- User confirmation needed HOT 2
- issue of get_task_instance HOT 1
- Error - "certificate verify failed - unable to get local issuer certificate" while using airflow_client HOT 2
- Kerberos Authentication Support HOT 1
- SLAMiss not allowing null value HOT 3
- Bug: `DAGApi.get_dag_details` fails if `DAG Run Timeout` is `None` HOT 2
- Not possible to trigger dag run HOT 3
- Basic authentication stopped working in 2.5.0 HOT 8
- Airflow Python Client 2.6.0rc1 fails with invalid type variable `execution_timeout` on get_tasks HOT 1
- Draft release announcement in the release guide HOT 1
- Airflow Python Client 2.6.2rc1 "get_tasks" errors out with execution_timeout cannot be None HOT 5
- How Create Users with role Admin? HOT 5
- [TaskInstanceApi.get_task_instances] airflow_client.client.exceptions.ApiTypeError: Invalid type for variable 'trigger' HOT 2
- TaskInstances- "get instance batch" is getting timeout after 1 minute, status code- 504 (~1000 records) HOT 4
- The logical date parameter for DAGRun is incorrect HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from airflow-client-python.