Page MenuHomePhabricator

Test routing to Proton through API gateway
Closed, ResolvedPublic

Description

The backend is proton.discovery.wmnet

  • <domain>/v1/pdf/<title>
  • <domain>/v1/pdf/<title>/<format>
  • <domain>/v1/pdf/<title>/<format>/<type>

Event Timeline

• DAlangi_WMF renamed this task from Test Proton through REST gateway to Test routing Proton through API gateway.Apr 12 2023, 4:36 PM
• DAlangi_WMF updated the task description. (Show Details)
• DAlangi_WMF renamed this task from Test routing Proton through API gateway to Test routing to Proton through API gateway.Apr 12 2023, 4:40 PM

Change 908559 had a related patch set uploaded (by Hnowlan; author: Hnowlan):

[operations/deployment-charts@master] rest-gateway: support for proton

https://gerrit.wikimedia.org/r/908559

Change 908559 merged by jenkins-bot:

[operations/deployment-charts@master] rest-gateway: support for proton

https://gerrit.wikimedia.org/r/908559

Change 908891 had a related patch set uploaded (by Hnowlan; author: Hnowlan):

[operations/deployment-charts@master] rest-gateway: fix typo

https://gerrit.wikimedia.org/r/908891

Proton is now accessible via curl https://staging.svc.eqiad.wmnet:4113/en.wikipedia.org/v1/pdf/Tornado/a4/desktop

Change 909183 had a related patch set uploaded (by Hnowlan; author: Hnowlan):

[operations/deployment-charts@master] rest-gateway: Extend timeout to 150s

https://gerrit.wikimedia.org/r/909183

Change 908891 merged by jenkins-bot:

[operations/deployment-charts@master] rest-gateway: fix typo

https://gerrit.wikimedia.org/r/908891

Change 909183 merged by jenkins-bot:

[operations/deployment-charts@master] rest-gateway: Extend proton timeout to 150s

https://gerrit.wikimedia.org/r/909183

An example request through RESTGateway shows:

< HTTP/1.1 200 OK
< access-control-allow-origin: *,*
< access-control-allow-headers: accept, content-type, content-length, cache-control,accept, content-type, content-length, cache-control, accept-language, api-user-agent, if-match, if-modified-since, if-none-match, dnt, accept-encoding
< access-control-expose-headers: etag,etag
< access-control-allow-methods: GET,HEAD,GET,HEAD
< x-xss-protection: 1; mode=block
< x-content-type-options: nosniff
< x-frame-options: SAMEORIGIN
< x-content-security-policy: default-src 'none'; frame-ancestors 'none'
< x-webkit-csp: default-src 'none'; frame-ancestors 'none'
< cache-control: s-maxage=600, max-age=600
< referrer-policy: origin-when-cross-origin
< x-request-id: 469d8c25-8980-4605-b0ab-302a625c4b6a
< content-type: application/pdf
< content-disposition: attachment; filename="Tornado.pdf"; filename*=UTF-8''Tornado.pdf
< content-length: 1953021
< date: Tue, 16 May 2023 11:54:53 GMT
< x-envoy-upstream-service-time: 3949
< server: envoy
< x-content-type-options: nosniff
< x-frame-options: SAMEORIGIN
< referrer-policy: origin-when-cross-origin
< x-xss-protection: 1; mode=block
< content-security-policy: default-src 'none'; frame-ancestors 'none'

An example request through RESTGateway shows:

< HTTP/1.1 200 OK
< access-control-allow-origin: *,*
< access-control-allow-headers: accept, content-type, content-length, cache-control,accept, content-type, content-length, cache-control, accept-language, api-user-agent, if-match, if-modified-since, if-none-match, dnt, accept-encoding
< access-control-expose-headers: etag,etag
< access-control-allow-methods: GET,HEAD,GET,HEAD
< x-xss-protection: 1; mode=block
< x-content-type-options: nosniff
< x-frame-options: SAMEORIGIN
< x-content-security-policy: default-src 'none'; frame-ancestors 'none'
< x-webkit-csp: default-src 'none'; frame-ancestors 'none'
< cache-control: s-maxage=600, max-age=600
< referrer-policy: origin-when-cross-origin
< x-request-id: 469d8c25-8980-4605-b0ab-302a625c4b6a
< content-type: application/pdf
< content-disposition: attachment; filename="Tornado.pdf"; filename*=UTF-8''Tornado.pdf
< content-length: 1953021
< date: Tue, 16 May 2023 11:54:53 GMT
< x-envoy-upstream-service-time: 3949
< server: envoy
< x-content-type-options: nosniff
< x-frame-options: SAMEORIGIN
< referrer-policy: origin-when-cross-origin
< x-xss-protection: 1; mode=block
< content-security-policy: default-src 'none'; frame-ancestors 'none'

The duplicated headers in this example should be resolved.

Yes @hnowlan, I can confirm that the duplicate headers have been resolved. Thank you!

< x-content-security-policy: default-src 'none'; frame-ancestors 'none'
< x-webkit-csp: default-src 'none'; frame-ancestors 'none'
< cache-control: s-maxage=600, max-age=600
< x-request-id: 7f5d7372-b67a-4e0c-a131-58fc20f088c5
< content-type: application/pdf
< content-disposition: attachment; filename="Tornado.pdf"; filename*=UTF-8''Tornado.pdf
< content-length: 1992189
< date: Wed, 17 May 2023 08:28:48 GMT
< x-envoy-upstream-service-time: 3819
< server: envoy
< access-control-allow-origin: *
< access-control-allow-methods: GET,HEAD
< access-control-allow-headers: accept, content-type, content-length, cache-control, accept-language, api-user-agent, if-match, if-modified-since, if-none-match, dnt, accept-encoding
< access-control-expose-headers: etag
< x-content-type-options: nosniff
< x-frame-options: SAMEORIGIN
< referrer-policy: origin-when-cross-origin
< x-xss-protection: 1; mode=block
< content-security-policy: default-src 'none'; frame-ancestors 'none'

Change 934313 had a related patch set uploaded (by Hnowlan; author: Hnowlan):

[operations/deployment-charts@master] rest-gateway: tighten proton group capture criteria

https://gerrit.wikimedia.org/r/934313

Change 934313 merged by jenkins-bot:

[operations/deployment-charts@master] rest-gateway: tighten proton group capture criteria

https://gerrit.wikimedia.org/r/934313