Repository navigation
Conversation
…ationClass Follows the operator-rs change: OpenLineage backend auth is a static bearer token, so drop the AuthenticationClass resolution and read the api key from the connection's `credentialsSecretName` Secret (key `apiKey`) directly. See stackabletech/decisions#90 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…h API group Follow the operator-rs rename of OpenLineageJob.app_name to job_name (serialized appName -> jobName) and the move of the OpenLineageConnection CRD to the lineage.stackable.tech API group: - update the job_name field access and the "ignored by Airflow" debug log - update the operator RBAC ClusterRole apiGroup - update kuttl test manifests (apiVersion, jobName) and the usage-guide docs - regenerate extra/crds.yaml (appName -> jobName) Verified with cargo check/clippy/test and CRD regeneration against a local operator-rs checkout carrying the rename. Committed with --no-verify because the cargo/regenerate-charts pre-commit hooks would otherwise build against the un-pushed operator-rs branch; those checks were run manually instead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rename the lineage-emission configuration field from `openLineage` to `lineage` across the CRD and operator internals: - spec.clusterConfig.openLineage -> spec.clusterConfig.lineage (Rust field cluster_config.open_lineage -> lineage; the validated ValidatedClusterConfig.open_lineage -> lineage) - rename operator-internal identifiers: module controller/build/openlineage.rs -> lineage.rs, ResolvedOpenLineageConfig -> ResolvedLineageConfig, resolved_open_lineage_config -> resolved_lineage_config - update usage-guide docs and the kuttl test manifest - regenerate extra/crds.yaml (openLineage -> lineage) The OpenLineage technology name is kept in prose, in the operator-rs types (OpenLineageJob, OpenLineageConnection) and their connection-named identifiers, and in the OPENLINEAGE__* client env var names. Verified with cargo check/clippy/test and CRD regeneration against a local operator-rs checkout. Committed with --no-verify because the cargo/regenerate pre-commit hooks would build against the un-pushed operator-rs branch; those checks were run manually instead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… namespace Bump the operator-rs pin to pick up the reworked `crd::openlineage` module: - `OpenLineageJob` is renamed to `OpenLineageConfig`. - `OpenLineageConnectionSpec` now selects an `OpenLineageTransport` (currently only `http`) instead of carrying host/port/tls/credentialsSecretName directly. - `HttpTransport` gained a `path` field, defaulting to `/api/v1/lineage`, which now drives `OPENLINEAGE__TRANSPORT__ENDPOINT` instead of a hardcoded constant. The leading slash is stripped since the client joins base URL and endpoint. - `OpenLineageConfig::namespace` is now a required `String` defaulting to `default`, so the operator-side fallback to the workload's Kubernetes namespace is gone. NOTE: this changes behaviour for users who did not set `namespace` explicitly - lineage is now reported under `default` rather than the cluster's Kubernetes namespace. The pin also brings in operator-rs' removal of `product-config`. Update the usage guide, the kuttl OpenLineageConnection manifest and extra/crds.yaml for the nested transport schema. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
adwk67
left a comment
There was a problem hiding this comment.
Some comments. I'm looking at the test now.
| &connection(no_tls()), | ||
| &job(connection(no_tls()), NAMESPACE), | ||
| ) | ||
| .unwrap(); |
There was a problem hiding this comment.
I know we are inconsistent with the use of unwrap vs. expect, but the code style guide states we should use expect wherever possible in test code.
There was a problem hiding this comment.
There are still unrwap() calls out there unrelated with this pr. I didn't want to inflate this more than needed.
| //! injected from a Secret via `secretKeyRef` instead of being embedded in a plaintext JSON value. | ||
| //! | ||
| //! The Python client's HTTP transport has no CA-path option (only a boolean `verify`), so a | ||
| //! SecretClass-provided CA is trusted by mounting it and pointing `REQUESTS_CA_BUNDLE` at it. |
There was a problem hiding this comment.
Claude points out that REQUESTS_CA_BUNDLE is read by the requests library for every call made with verify=True, so it replaces the default certifi bundle used elsewhere (DAGs, OIDC login etc.) with the single CA for lineage. The user can override this with envOverrides by setting the env-var to point to CAs that they themselves bundle and maintain, or we can build a combined bundle at container start, so that e.g. the certifi bundle is not discarded. For now we should at least clearly document the knock-on effect this can have.
There was a problem hiding this comment.
Good catch. I guess this will be a problem with every product. I added a warning bd0285d
| /// [`Self::from_config`] so it can be unit tested without a client. | ||
| fn build( | ||
| connection: &ResolvedOpenLineageConnection, | ||
| lineage: &OpenLineageConfig, |
There was a problem hiding this comment.
nit: We only use the namespace from the config, so maybe just pass that?
| let crds_and_handlers = vec![( | ||
| AirflowCluster::merged_crd(AirflowClusterVersion::V1Alpha2).context(MergeCrdSnafu)?, | ||
| AirflowCluster::try_convert, | ||
| AirflowCluster::try_convert as fn(ConversionReview) -> ConversionReview, |
There was a problem hiding this comment.
Do we need this change if we only have one fn (with its own type)? main compiles without it.
| @@ -0,0 +1,20 @@ | |||
| {% if test_scenario['values']['executor'] == 'kubernetes' %} | |||
There was a problem hiding this comment.
Can't we use the script commons/cleanup-executor-pods.sh for this (which is basically the same plus a condition to behave differently if using --skip-delete)?
| tracing = "0.1" | ||
|
|
||
| [patch."https://github.com/stackabletech/operator-rs.git"] | ||
| # TODO: Switch back to a release tag once operator-rs#1250 (crd::openlineage) has been released. |
| } | ||
| } | ||
|
|
||
| fn plain_env(name: &str, value: &str) -> EnvVar { |
There was a problem hiding this comment.
This is used internally only with internal constants so it would be better to use the pattern in env_vars.rs of defining them with constant! as EnvVarName and then using EnvVarSet (once we have parsed the name with_value etc. on EnvVarSet are infallible and the expect in lineage_env_vars can be removed).
| } | ||
| } | ||
|
|
||
| fn env_var_from_secret(name: &str, secret_name: &str, secret_key: &str) -> EnvVar { |
There was a problem hiding this comment.
Similar to plain_env above, but credentials_secret_name is user input and needs to be parsed into a SecretName (with an associated error) and then it can also be added to the EnvVarSet infallibly with with_secret_key_ref).
Co-authored-by: Andrew Kenworthy <1712947+adwk67@users.noreply.github.com>
Description
Airfow can emit OpenLineage events for DAGs. This PR makes essential properties configurable. The operator uses sensible defaults where possible.
Depends on:
Part of stackabletech/issues#856
Decision: https://github.com/stackabletech/decisions/issues/90
Definition of Done Checklist
Author
Reviewer
Acceptance
type/deprecationlabel & add to the deprecation scheduletype/experimentallabel & add to the experimental features tracker