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

PDF: Switch to using Proton #1090

Closed
wants to merge 1 commit into from

Conversation

d00rman
Copy link
Contributor

@d00rman d00rman commented Dec 20, 2018

We are sunsetting Electron and switchng fully to Proton. Therefore, adjust the code to use Proton only if new_uri is specified (and consequently get rid of new_probability and new_pdf). However, for the sake of backwards compatibility, keep the code using Electron around.

Bug: T210651

if (req.query.new_pdf) {
return newResult;
}
));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to do more - change the public API to allow for changing the hardcoded /a4/desktop. Optional parameters with defaults should not break backwards compatibility.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, damn, forgot that part. Very good point. Will change.

`${options.new_uri}/${rp.domain}/v1/`
+ `pdf/${encodeURIComponent(rp.title)}/a4/desktop`
))
.catch((e) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd still keep logging

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't throwing the error here make RB log it automatically? We don't want to end up with duplicate log entries.

@@ -47,11 +47,7 @@ default_project: &default_project
pdf:
# Cache PDF for 5 minutes since it's not purged
cache_control: s-maxage=600, max-age=600
uri: https://pdfrender-beta.wmflabs.org
new_uri: https://proton-beta.wmflabs.org
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe let's rename new_uri to uri?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about it, but to keep it backwards compatible, I opted with leaving it as-is. Perhaps we could go with this now and revisit in the future?

@d00rman
Copy link
Contributor Author

d00rman commented Dec 20, 2018

@Pchelolo updated the URI

We are sunsetting Electron and switchng fully to Proton. Therefore,
adjust the code to use Proton only if `new_uri` is specified (and
consequently get rid of `new_probability` and `new_pdf`). However, for
the sake of backwards compatibility, keep the code using Electron
around.

Bug: T210651
@d00rman
Copy link
Contributor Author

d00rman commented May 21, 2019

Superseded by #1126

@d00rman d00rman closed this May 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants