-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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(enqueue): pass the original method argument here (backport #25719) #25722
Merged
ankush
merged 1 commit into
version-15-hotfix
from
mergify/bp/version-15-hotfix/pr-25719
Mar 29, 2024
Merged
fix(enqueue): pass the original method argument here (backport #25719) #25722
ankush
merged 1 commit into
version-15-hotfix
from
mergify/bp/version-15-hotfix/pr-25719
Mar 29, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Don't pass the stringified version - this is what goes to RQ, and the string we construct isn't always "correct" For example, https://github.com/frappe/frappe/blob/87d121f47a4afc507442a97bf1854bb3d17f42c6/frappe/email/doctype/email_queue/email_queue.py#L735-L736 generates `frappe.email.doctype.email_queue.email_queue.QueueBuilder.send_emails` which will result in `ModuleNotFoundError: No module named 'frappe.email.doctype.email_queue.email_queue.QueueBuilder'; 'frappe.email.doctype.email_queue.email_queue' is not a package` Signed-off-by: Akhil Narang <me@akhilnarang.dev> (cherry picked from commit 8658196)
github-actions
bot
added
the
add-test-cases
Add test case to validate fix or enhancement
label
Mar 29, 2024
@Mergifyio backport version-15 |
✅ Backports have been created
|
mergify bot
added a commit
that referenced
this pull request
Mar 29, 2024
Don't pass the stringified version - this is what goes to RQ, and the string we construct isn't always "correct" For example, https://github.com/frappe/frappe/blob/87d121f47a4afc507442a97bf1854bb3d17f42c6/frappe/email/doctype/email_queue/email_queue.py#L735-L736 generates `frappe.email.doctype.email_queue.email_queue.QueueBuilder.send_emails` which will result in `ModuleNotFoundError: No module named 'frappe.email.doctype.email_queue.email_queue.QueueBuilder'; 'frappe.email.doctype.email_queue.email_queue' is not a package` Signed-off-by: Akhil Narang <me@akhilnarang.dev> (cherry picked from commit 8658196) Co-authored-by: Akhil Narang <me@akhilnarang.dev> (cherry picked from commit 2c14450)
ankush
pushed a commit
that referenced
this pull request
Mar 29, 2024
Don't pass the stringified version - this is what goes to RQ, and the string we construct isn't always "correct" For example, https://github.com/frappe/frappe/blob/87d121f47a4afc507442a97bf1854bb3d17f42c6/frappe/email/doctype/email_queue/email_queue.py#L735-L736 generates `frappe.email.doctype.email_queue.email_queue.QueueBuilder.send_emails` which will result in `ModuleNotFoundError: No module named 'frappe.email.doctype.email_queue.email_queue.QueueBuilder'; 'frappe.email.doctype.email_queue.email_queue' is not a package` Signed-off-by: Akhil Narang <me@akhilnarang.dev> (cherry picked from commit 8658196) Co-authored-by: Akhil Narang <me@akhilnarang.dev> (cherry picked from commit 2c14450) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
frappe-pr-bot
pushed a commit
that referenced
this pull request
Mar 29, 2024
## [15.19.1](v15.19.0...v15.19.1) (2024-03-29) ### Bug Fixes * **enqueue:** pass the original method argument here ([#25722](#25722)) ([#25723](#25723)) ([adfd8eb](adfd8eb)), closes [/github.com/frappe/frappe/blob/87d121f47a4afc507442a97bf1854bb3d17f42c6/frappe/email/doctype/email_queue/email_queue.py#L735-L736](https://github.com//github.com/frappe/frappe/blob/87d121f47a4afc507442a97bf1854bb3d17f42c6/frappe/email/doctype/email_queue/email_queue.py/issues/L735-L736)
frappe-pr-bot
pushed a commit
that referenced
this pull request
Apr 2, 2024
# [15.20.0](v15.19.1...v15.20.0) (2024-04-02) ### Bug Fixes * advertise insights to system manager only ([7046320](7046320)) * cint -> avoid precision loss if already integer ([#25735](#25735)) ([#25737](#25737)) ([6c822e0](6c822e0)) * **enqueue:** pass the original method argument here ([#25722](#25722)) ([2c14450](2c14450)), closes [/github.com/frappe/frappe/blob/87d121f47a4afc507442a97bf1854bb3d17f42c6/frappe/email/doctype/email_queue/email_queue.py#L735-L736](https://github.com//github.com/frappe/frappe/blob/87d121f47a4afc507442a97bf1854bb3d17f42c6/frappe/email/doctype/email_queue/email_queue.py/issues/L735-L736) * **event:** clear message after handling exception ([eb9e88e](eb9e88e)) * fieldname extraction (backport [#24411](#24411)) ([#25670](#25670)) ([ed4e1b3](ed4e1b3)), closes [#22892](#22892) * incorrect status on data import (backport [#25660](#25660)) ([#25703](#25703)) ([0165c75](0165c75)) * incorrect UI icon for desc sort ([#25687](#25687)) ([#25689](#25689)) ([f7f2849](f7f2849)) * invalid filter on email acccount ([#25674](#25674)) ([#25676](#25676)) ([c15b47a](c15b47a)) * let's colored tags in listview ([#25552](#25552)) ([4e17959](4e17959)) * make ads translatable ([217ef0b](217ef0b)) * make insights ad translatable ([43e6734](43e6734)) * message update in custom app if is_standard ([#25754](#25754)) ([86ad2e6](86ad2e6)) * non-html notifications from files ([a35e9ba](a35e9ba)) * preserve original error message ([#25682](#25682)) ([#25685](#25685)) ([3d364b7](3d364b7)) * reserved keywords as col name ([#25718](#25718)) ([#25726](#25726)) ([fca1c1a](fca1c1a)) * **restore:** check backup directory and bench directory if we can't find the file ([e6e4258](e6e4258)) * translatable web footer ([99bbd94](99bbd94)) * Use CssParser to correctly pass options to wkhtmltopdf ([e9811ea](e9811ea)) * Use doctype setting to set auto-extracted file as private (backport [#24828](#24828)) ([#25673](#25673)) ([14ccbe7](14ccbe7)) ### Features * allow skipping msgprint ([59813db](59813db)), closes [/github.com/frappe/frappe/blob/version-15/frappe/desk/doctype/event/event.py#L398](https://github.com//github.com/frappe/frappe/blob/version-15/frappe/desk/doctype/event/event.py/issues/L398) * **customize_form:** allow setting `creation` as a default sort field ([#25760](#25760)) ([d540c72](d540c72)) * **notification:** specify message type (html, md, txt) ([e9a8a14](e9a8a14)) ### Reverts * Revert "fix: message update in custom app if is_standard (#25754)" (#25767) ([f5a17f7](f5a17f7)), closes [#25754](#25754) [#25767](#25767)
🎉 This PR is included in version 15.20.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
add-test-cases
Add test case to validate fix or enhancement
released
Skip CI
Doesn't run Ci for this PR.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Don't pass the stringified version - this is what goes to RQ, and the string we construct isn't always "correct"
For example,
frappe/frappe/email/doctype/email_queue/email_queue.py
Lines 735 to 736 in 87d121f
frappe.email.doctype.email_queue.email_queue.QueueBuilder.send_emails
which will result inModuleNotFoundError: No module named 'frappe.email.doctype.email_queue.email_queue.QueueBuilder'; 'frappe.email.doctype.email_queue.email_queue' is not a package
We can't just
getattr(package, method)
for the methods within a class, we'll have togetattr(class, method)
frappe.get_attr()
breaks with the above string, it'll work if we just passfrappe.email.doctype.email_queue.email_queue.QueueBuilder
and then usegetattr()
with that andsend_emails
Broke in #25610
This is an automatic backport of pull request #25719 done by [Mergify](https://mergify.com).