-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't crash if operator_extra_links is a property #25332
Conversation
This makes operators that implement this as an instance property compatible for task-mapping. We still can't show those extra links (since they are only available against a concrete task), but at least they are runnable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thin k we should make a note about it somewhere in BaseOperatorLink docs and add warning.
We might fix it permanently in the future, but it might take some time. But if we cherry-pick that one to 2.3.4 or 2.4.0 will not have a long-term base operator link treatment improved, this will be an equal (and even worse) surprise to our users if it is not documented.
Right now, the tasks crash and it's easy to see/report, but when the user will stop seeing the links where it is supposed to be, still an issue they will open and we need to explain to them it is intended (with docs link explaining it).
Also a Warning in log in this case sounds very appropriate, as this is pretty surprising behaviour.
We can always update the docs later when we fix it properly and remove the warning - but this commit should have them IMHO.
+1 on a warning or some active notification (maybe even a grayed out link button and a tooltip in the Task Instance modal) so functionality isn't "missing" silently. |
What do y’all think should be a good way to communicate this? This needs to be done during the DAG parcing phase so a log might not be as noticable, but showing a DagWarning feels a bit excessive to me. |
BTW, does any of Extra Links work on mapped tasks? Or it just only on my side it won't work at all on mapped task. |
What does not work for you? Open a new issue for that, please. |
UI information (exactly as @josh-fell mentioned) where we see that links are there but not working (grayed out) with comment. This could be a separate PR @bbovenzi @pierrejeambrun ? |
I like Josh's suggestion. We can do that if we add an extra error case in the webserver |
So essentially, we invent a “fake” extra link class, and use that if the mapped operator fails to access the real extra link attribute, and return some warning information from the webserver when the special extra link class is accessed? |
If we can't do "real" extra link easily, that's kinda the best way to implement it. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
See issues like #25243, #24676, and #25215.
This makes operators that implement this as an instance property compatible for task-mapping. We still can't show those extra links (since they are only available against a concrete task), but at least they are runnable.