Validate dbt trigger_reason field to be less than 255 characters#38896
Validate dbt trigger_reason field to be less than 255 characters#38896josh-fell merged 4 commits intoapache:mainfrom
trigger_reason field to be less than 255 characters#38896Conversation
|
Hey @josh-fell, would greatly appreciate your thoughts and suggestions on this! |
9885b54 to
284da2a
Compare
|
Hi @dirrao, did you have a chance to look at this PR again? Would appreciate your comments! |
josh-fell
left a comment
There was a problem hiding this comment.
Nice work here!
I do think though that this logic should live in the DbtCloudHook instead. Moving the logic to the hook would cover both scenarios of folks using the operator and the DbtCloudHook.trigger_job_run() method explicitly (as part of a TaskFlow function for example).
284da2a to
89943cf
Compare
Thanks for your review @josh-fell, I have updated accordingly! I have a question about testing. I have only implemented a test for the |
Agreed. Adding the test to |
* Validate dbt `trigger_reason` field to be less than 255 characters * Rename function to better reflect the behavior * Move validation of cause parameter to DbtCloudHook * Add stacklevel to dbt `cause` warning
Validate and truncate
trigger_reasonfield if it is longer than the limit of 255 characters.closes: #34676