Add documentation for team-based asset event filtering#65690
Add documentation for team-based asset event filtering#65690vincbeck wants to merge 1 commit intoapache:mainfrom
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
45328a3 to
ae93d2c
Compare
|
@eladkal If you're interested, I gave it a shot with the documentation-frst approach you described in the dev email list. So far I like it, it makes a lot of sense. |
o-nikolas
left a comment
There was a problem hiding this comment.
Looking good! Just a few comments/suggestions.
Also can you upload a new PDF (or even better a screenshot of the rendered html doc) that has the table headers? They're cut off in the current PDF
| .. versionadded:: 3.3.0 | ||
|
|
||
| When :doc:`Multi-Team mode </core-concepts/multi-team>` is enabled, asset events are filtered by team | ||
| membership. By default, a consuming Dag only receives asset events produced by Dags within the same team. |
There was a problem hiding this comment.
Or global right? Or is that only when allow_teams is empty/not specified?
| membership. By default, a consuming Dag only receives asset events produced by Dags within the same team. | ||
| This prevents unintended cross-team triggers. | ||
|
|
||
| To allow specific other teams to produce events that trigger your Dag, use the ``allow_teams`` parameter |
There was a problem hiding this comment.
I find allow_teams a big vague. Maybe allow_producing_teams or allow_teams_to_trigger or something along those lines?
| - A consuming Dag only receives events from Dags in the same team. | ||
| - Dags with no team association (global Dags) can produce events that trigger any consumer. |
There was a problem hiding this comment.
The interplay between global produces and consumers that are team or not team, is kind of vague/confusing in this section. Is there a way we can make that a bit more clear/concrete?
| By default, a consuming Dag only receives asset events from producers within the same team. Dags with | ||
| no team association (global Dags) act as global producers and can trigger any team-bound consumer. |
There was a problem hiding this comment.
Something about the second sentence invalidating the first one I find slightly confusing. I'd maybe make them less exclusive to one another?
| By default, a consuming Dag only receives asset events from producers within the same team. Dags with | |
| no team association (global Dags) act as global producers and can trigger any team-bound consumer. | |
| By default, a consuming Dag only receives asset events from producers within the same team or from Dags with | |
| no team association, i.e. global Dags. These global Dags act as global producers and can trigger any team-bound or non-team-bound consumer. |
NOTE:
I think the second sentence could be dropped honestly, but kept it because it had some of your original wording
| Cross-Team Opt-In with ``allow_teams`` | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| To allow specific teams to produce events that trigger consumers on a given asset, use the |
There was a problem hiding this comment.
Just a nit, I think this clarifies more.
| To allow specific teams to produce events that trigger consumers on a given asset, use the | |
| To allow specific teams to produce events that trigger consumers on a given asset from another team, use the |
| Behavioral Rules | ||
| ^^^^^^^^^^^^^^^^ | ||
|
|
||
| The following truth table describes the complete filtering logic: |
There was a problem hiding this comment.
| The following truth table describes the complete filtering logic: | |
| The following table describes the complete filtering logic: |
"truth table" is an overly technical term. Many readers won't know it (and don't need to).
|
|
||
| - **Same team**: Always allowed. | ||
| - **Global (teamless) DAG producer**: Triggers all consumers regardless of team. | ||
| - **Teamless API user**: Can only trigger teamless consumers. |
There was a problem hiding this comment.
Why is a teamless API request treated differently from a teamless Dag?
| - **Same team**: Always allowed. | ||
| - **Global (teamless) DAG producer**: Triggers all consumers regardless of team. | ||
| - **Teamless API user**: Can only trigger teamless consumers. | ||
| - **Teamless consumer**: Only accepts events from teamless sources. |
There was a problem hiding this comment.
Hmm, do we need this restriction? If global dags can be a producer for any team, why do we want to stop any team from being a producer for a global consumer?
| .. image:: /img/multi_team_arch_diagram.png | ||
| :alt: Multi-Team Airflow Architecture showing resource isolation between teams | ||
|
|
||
| .. _multi-team-asset-event-filtering: |
There was a problem hiding this comment.
Can you shuffle this above the Architecture diagram? I think that overall diagram is a nice generic way to conclude the doc and a specifically targeted section should be above? Or were you trying to keep it close to the scheduling section?
Create documentation for the new feature team-based asset event filtering as described in AIP-67.
You can also see the generated documentation as PDF here:
Asset Definitions — Airflow 3.3.0 Documentation.pdf
Multi-Team — Airflow 3.3.0 Documentation.pdf
Here is the description of the feature as described in the AIP:
I'll leave this PR open in draft while working on the feature. The goal is to merge this PR once the feature is implemented.
Was generative AI tooling used to co-author this PR?
Kiro (Claude)
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.