UI: Allow scoping plugin tabs to specific Dags by tag or id#69148
UI: Allow scoping plugin tabs to specific Dags by tag or id#69148dheerajturaga wants to merge 1 commit into
Conversation
Plugin external views and React apps that target the Dag, Dag run, task, or task instance pages previously appeared on every Dag, with no way to limit a tab to the Dags it is relevant to. This adds optional dag_tags, dag_ids, and dag_id_pattern filters so a tab is shown only on Dags that match (combined with OR), while omitting them preserves the show-everywhere default. The current Dag is also passed to React app plugins so they can tailor their own content.
There was a problem hiding this comment.
It is possible to pass all those attributes to the plugin already. (dagId, taskInstanceId, runId).
Always displaying the tab, and let the Plugin display 'nothing' or a specific message depending on the relevant parameters, so everything is still self contained in the plugin, and the plugin remains responsible for displaying whatever it feels like depending on the params.
This adds complexity just for the sake of 'hiding the tab', I don't think it's worth it.
|
Actually I think this can make sense. If you want a plugin to only work for one dag or task. Then adding an empty tab to hundreds of other tasks or dags is not a great UX. I can definitely see that a plugin would be only relevant to a certain operator. |
|
That's possible and make sense, the thing I don't like is that it reverses the dependency from core to plugin, to decide what to do instead of having plugin self contained, deciding for themselves what they should display. And that's added complexity and code for something that isn't really harmfull. (showing a plugin tab that will render, "Plugin not available for this operator...." is fine to me. (instead of having people wonder where the plugin tab is, why it's not displaying there, I find it actually more confusing) But if we want this in I'm fine. |
Plugin external views and React apps that target the Dag, Dag run, task, or task instance pages previously appeared on every Dag, with no way to limit a tab to the Dags it is relevant to. This adds optional dag_tags, dag_ids, and dag_id_pattern filters so a tab is shown only on Dags that match (combined with OR), while omitting them preserves the show-everywhere default. The current Dag is also passed to React app plugins so they can tailor their own content.
Plugin showing on all dags:

Plugins showing only for tutorial dag:

plugins showing for example_* dags:

Was generative AI tooling used to co-author this PR?
ClaudeCode Opus 4.8