Skip to content

Let plugin views be scoped to specific Assets - #74609

Merged
bbovenzi merged 1 commit into
apache:mainfrom
astronomer:pr/plugins-applies-to-assets
Oct 13, 2026
Merged

bbovenzi merged 1 commit into
apache:mainfrom
astronomer:pr/plugins-applies-to-assets

Conversation

@bbovenzi

@bbovenzi bbovenzi commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Let plugin applies_to work on asset attribute. Examples: group, scheduled_dags.dag_id, watchers.name, aliases.name producing_tasks.task_id


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)
    Claude Opus 5

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {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.

Asset pages could not be scoped at all. `asset` resolved no record, so every
`applies_to` path on an asset view was unevaluable and skipped, and skipping
does not narrow anything -- an asset view configured with scoping showed on
every asset, which is the opposite of what its author asked for.

The asset is already fetched for those pages, so it costs nothing to make it a
root an `applies_to` path can name, alongside the Dag, Dag Run, Task and Task
Instance records. `AssetResponse` joins the models paths are validated against,
so an asset path gets the same misspelling check as any other.
@bbovenzi bbovenzi added the skip newsfragment check Skip the newsfragment PR number check label Oct 12, 2026
@boring-cyborg boring-cyborg Bot added area:plugins area:UI Related to UI/UX. For Frontend Developers. kind:documentation labels Oct 12, 2026

@pierrejeambrun pierrejeambrun left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, nice and small! Tiny note in the PR description: a bare aliases path stops on objects, so it never matches. I think the example wants aliases.name.

@pierrejeambrun pierrejeambrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meant to approve

@bbovenzi bbovenzi added this to the Airflow 3.4.0 milestone Oct 13, 2026
@bbovenzi
bbovenzi merged commit 230cd8a into apache:main Oct 13, 2026
99 checks passed
@bbovenzi
bbovenzi deleted the pr/plugins-applies-to-assets branch October 13, 2026 18:50
@bbovenzi bbovenzi added the backport-to-v3-4-test Backport to v3-4-test label Oct 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Backport failed to create: v3-4-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
❌ v3-4-test Commit Link

You can attempt to backport this manually by running:

cherry_picker 230cd8a v3-4-test

This should apply the commit to the v3-4-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

vatsrahul1001 added a commit that referenced this pull request Oct 18, 2026
Asset pages could not be scoped at all. `asset` resolved no record, so every
`applies_to` path on an asset view was unevaluable and skipped, and skipping
does not narrow anything -- an asset view configured with scoping showed on
every asset, which is the opposite of what its author asked for.

The asset is already fetched for those pages, so it costs nothing to make it a
root an `applies_to` path can name, alongside the Dag, Dag Run, Task and Task
Instance records. `AssetResponse` joins the models paths are validated against,
so an asset path gets the same misspelling check as any other.

(cherry picked from commit 230cd8a)

Co-authored-by: Brent Bovenzi <brent@astronomer.io>
vatsrahul1001 added a commit that referenced this pull request Oct 20, 2026
Asset pages could not be scoped at all. `asset` resolved no record, so every
`applies_to` path on an asset view was unevaluable and skipped, and skipping
does not narrow anything -- an asset view configured with scoping showed on
every asset, which is the opposite of what its author asked for.

The asset is already fetched for those pages, so it costs nothing to make it a
root an `applies_to` path can name, alongside the Dag, Dag Run, Task and Task
Instance records. `AssetResponse` joins the models paths are validated against,
so an asset path gets the same misspelling check as any other.

(cherry picked from commit 230cd8a)

Co-authored-by: Brent Bovenzi <brent@astronomer.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:plugins area:UI Related to UI/UX. For Frontend Developers. backport-to-v3-4-test Backport to v3-4-test kind:documentation skip newsfragment check Skip the newsfragment PR number check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants