-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Fix rendering parameters in PapermillOperator #28979
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
Fix rendering parameters in PapermillOperator #28979
Conversation
|
cc: @TPapajCin @marvinfretly @nicnguyen3103 |
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.
may be we should also make this fields mandatory
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 think it's OK to check their existence in the constructor.
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.
Previously it checked in execute, no idea why, just assume that is somehow related to Linage
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.
| template_fields: ClassVar = {*File.template_fields, "parameters"} | |
| template_fields: ClassVar[str] = {*File.template_fields, "parameters"} |
(I don’t think the annotation is actually needed at all though, it should inherit the type from File.)
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 guess you mean ClassVar[Sequence[str]] instead of just ClassVar[str]
However even with with this annotation I got
error: Incompatible types in assignment (expression has type "Set[str]", variable has type "Sequence[str]") [assignment]So I change wrap value to tuple
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.
Can’t use sequence, you need Collection[str]. But changing it to tuple works as well, the difference is minimal.
6957f2f to
e607c90
Compare
uranusjr
left a comment
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.
Looks good, but I want one of the users in the original issue to actually test against real Papermill.
+1 |
|
How can I try it? I'm currently using airflow using docker image |
There is different ways, however according to the fact that changes relevant only for single file you could:
Another options:
|
Thank you. Everything is working properly now. Using v2.5.0 |
e607c90 to
b79b9c2
Compare
|
Rebased it as for some reason there was only 1 mergable check. |
|
Well seems like broken compatibility with 2.3.x, I will check later on as well as will change wrong message for error in the CI (point to 2.2.0 but actually we test on 2.3.0) |
Not updated when we bumped it :) |
I have a look and also found that we have environment variable |
I believe this is correct (but would be great to verify the logic - so please take a look) - in a number of steps in CI we install airflow and providers from pre-built wheels (to simulate the behaviour of installing wheels from PyPI) |
Yes it is. I filtered only |
b79b9c2 to
37cbb15
Compare

Add missing "parameters" into
NoteBook's templated fields and remove redundant loop on inlets/outletsrelated: #28977