Comments (4)
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
from airflow.
@mobuchowski would love your thoughts on this one
from airflow.
I don't think this is about defaults. We need to know the history of what happened to the airflow.cfg you refer to @merobi-hub ? and where the values were taken from - but this is not about "defaults".
From what I see, default for this parameter is empty. And you have to manually set it. And example explaining it changed in #37620 to include the endpoint.
When you run:
airflow config list --defaults
You get this:
# Pass OpenLineage Client transport configuration as JSON string. It should contain type of the
# transport and additional options (different for each transport type). For more details see:
# https://openlineage.io/docs/client/python/#built-in-transport-types
#
# Currently supported types are:
#
# * HTTP
# * Kafka
# * Console
# * File
#
# Example: transport = {"type": "http", "url": "http://localhost:5000", "endpoint": "api/v1/lineage"}
#
# Variable: AIRFLOW__OPENLINEAGE__TRANSPORT
#
# transport =
So the "endpoint" is mentioned in example, but defaults are empty. Previously indeed the example did not have endpoint and previous versions of openlineage provider accepted it this way.
So I presume (@merobi-hub?) that this is all about "What do we do if the users used previous version of the openlineage, configured it and now with the new version of openlineage it does not work" - so it's more of a migration issue ?
My suggestion would be - if really "endpoint" is needed - to add it automatically if missing and raise a warning that confiiguration should be updated.
We did something similar with auth_backends
parameter of api
session - where in new version of it we expect "session" backend to be explicitly added, but in some old versions it was not needed, so we add it automatically if missing and raise a warning for the user to update their configuration.
def _upgrade_auth_backends(self):
"""
Ensure a custom auth_backends setting contains session.
This is required by the UI for ajax queries.
"""
old_value = self.get("api", "auth_backends", fallback="")
if old_value in ("airflow.api.auth.backend.default", ""):
# handled by deprecated_values
pass
elif old_value.find("airflow.api.auth.backend.session") == -1:
new_value = old_value + ",airflow.api.auth.backend.session"
self._update_env_var(section="api", name="auth_backends", new_value=new_value)
self.upgraded_values[("api", "auth_backends")] = old_value
# if the old value is set via env var, we need to wipe it
# otherwise, it'll "win" over our adjusted value
old_env_var = self._env_var_name("api", "auth_backend")
os.environ.pop(old_env_var, None)
warnings.warn(
"The auth_backends setting in [api] has had airflow.api.auth.backend.session added "
"in the running config, which is needed by the UI. Please update your config before "
"Apache Airflow 3.0.",
FutureWarning,
stacklevel=1,
)
from airflow.
I'm not sure if the empty endpoint is the issue here, as it has a default value of api/v1/lineage
defined in HttpConfig in OpenLineageClient (added two years ago). So no matter if you provide {"type": "http", "url": "http://localhost:5000/"}
or {"type": "http", "url": "http://localhost:5000", "endpoint": "api/v1/lineage"}
, it should create exactly the same transport (it's reading the transport and directly calling OL client here, then the default factory is creating the HttpConfig).
I was able to successfully receive event on http://127.0.0.1:5000/api/v1/lineage
when specyfying the transport as {"type": "http", "url": "http://127.0.0.1:5000"}
using apache-airflow-providers-openlineage==1.5.0
Could you please verify what is being that transport created in both scenarios is actually different (when it's working and not working, as I'm unable to reproduce this)? Something like:
from airflow.providers.openlineage.plugins.openlineage import get_openlineage_listener
print(get_openlineage_listener().adapter._client.transport)
from airflow.
Related Issues (20)
- Add deferrable support to `LambdaInvokeFunctionOperator` HOT 10
- OpenLineage Provider issue: scheduler shuts down after pickle of OpenLineageListener fails HOT 5
- Version 2.9.2 airflow db migrate unsupported queries for mysql HOT 8
- Mismatched Xcom Map Index when Dynamic Mapping over TaskGroup and not all mapped tasks have run
- After deleting a dag from the dags directory, it is still displayed in the UI HOT 3
- Syntax highlight and copy button for entries in XCom tab
- Deferred task behaviour is different from normal task HOT 1
- Request to Reintroduce Tasks Duration Multi Line Graph HOT 1
- The task was stuck, but when marking it as successful, it continues to run the remaining part of the job. HOT 2
- Mark Success but remote task continue running HOT 4
- Add on_kill to SSHOperator HOT 4
- Airflow scheduler crashes with a psycopg2.errors.GroupingError due to an incorrect SQL query when detecting orphaned datasets
- Support extraInitContainers for migrateDatabaseJob HOT 1
- ObjectStoragePath should be template-able HOT 2
- After deleting a dag from the dags directory, it is still displayed in the UI HOT 2
- values.yaml `dags.gitSync.containerLifecycleHooks` Does not working HOT 2
- Improve SFTPOperator with directory transfer and DELETE operation HOT 1
- add ower to TaskInstance class HOT 1
- Status of testing Providers that were prepared on June 22, 2024 HOT 38
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.