Skip to content
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: Private images in PDFs from background jobs (backport #24980) #25245

Merged
merged 3 commits into from
Mar 6, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Mar 6, 2024

This is an automatic backport of pull request #24980 done by Mergify.
Cherry-pick of 718b5b8 has failed:

On branch mergify/bp/version-14-hotfix/pr-24980
Your branch is up to date with 'origin/version-14-hotfix'.

You are currently cherry-picking commit 718b5b8bee.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   frappe/core/doctype/file/test_file.py
	modified:   frappe/core/doctype/file/utils.py
	modified:   frappe/tests/test_pdf.py
	modified:   frappe/utils/response.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   frappe/utils/pdf.py

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

* refactor: Private images rendering in PDFs

Private images currently render fine if PDF is generated during a
request as we pass the cookiejar to WKHTML.

Background jobs however fail completeley because they can't retrieve
private images without cookiejar.

This PR converts all image types to base64 encoded sources in HTML
itself, so wkhtmltopdf doesn't have to a fire a request.

* test: private images in pdf

(cherry picked from commit 718b5b8)

# Conflicts:
#	frappe/utils/pdf.py
@mergify mergify bot requested a review from a team March 6, 2024 03:34
@mergify mergify bot added the conflicts label Mar 6, 2024
@mergify mergify bot requested review from akhilnarang and removed request for a team March 6, 2024 03:34
Copy link
Contributor Author

mergify bot commented Mar 6, 2024

Cherry-pick of 718b5b8 has failed:

On branch mergify/bp/version-14-hotfix/pr-24980
Your branch is up to date with 'origin/version-14-hotfix'.

You are currently cherry-picking commit 718b5b8bee.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   frappe/core/doctype/file/test_file.py
	modified:   frappe/core/doctype/file/utils.py
	modified:   frappe/tests/test_pdf.py
	modified:   frappe/utils/response.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   frappe/utils/pdf.py

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot assigned ankush Mar 6, 2024
@ankush ankush enabled auto-merge March 6, 2024 07:21
@ankush ankush merged commit 8dd8e38 into version-14-hotfix Mar 6, 2024
10 checks passed
@ankush ankush deleted the mergify/bp/version-14-hotfix/pr-24980 branch March 6, 2024 07:38
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 14.67.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants