Page MenuHomePhabricator

[Regression] Cannot add automatic citation from Beta Cluster because of HTTP -> HTTPS redirect
Closed, ResolvedPublic0 Estimated Story Points

Description

Steps to reproduce:

  1. Go to Citation>Automatic
  2. Type a valid URL
  3. Click on "Generate"

Citation does not get added. Following error appears in console:

XMLHttpRequest cannot load http://citoid.wikimedia.org/api?action=query&format=mediawiki&search=http%3A%2F%2Fbbc%2Ecom&basefields=true. Response for preflight is invalid (redirect)

Event Timeline

Jdforrester-WMF renamed this task from [Regression pre-wmf.4] Cannot add automatic citation to [Regression] Cannot add automatic citation from Beta Cluster because of HTTP -> HTTPS redirect.May 31 2016, 7:26 PM
Jdforrester-WMF triaged this task as High priority.
Jdforrester-WMF set the point value for this task to 0.
Jdforrester-WMF moved this task from To Triage to TR0: Interrupt on the VisualEditor board.

It can't load successfully from the production citoid? Are you sure this is Beta-Cluster-Infrastructure, James?

It can't load successfully from the production citoid? Are you sure this is Beta-Cluster-Infrastructure, James?

HTTP -> HTTPS redirect is caused by how Beta Cluster's infrastructure is configured, right? Citoid uses a protocol-relative URL so doesn't seem to break in production. Should be a quick config patch.

I guess you could say it's because of how the beta cluster lacks expected forcing of HTTPS. You can use an http URL on beta instead of HTTPS and your browser will try to request the page unencrypted from production citoid, but then get caught by HSTS on the citoid domain, and for some reason fails the request instead of following the redirect to HTTPS (not quite sure why, beta died while I was trying to debug. now looking into that instead)

for some reason fails the request instead of following the redirect to HTTPS (not quite sure why, beta died while I was trying to debug. now looking into that instead)

Okay, that turned out to be the last thing I merged catching up with me and completely breaking beta. I've unbroken it.
I think this issue was caused (perhaps 'revealed'?) by https://gerrit.wikimedia.org/r/#/c/289865/

Change 292068 had a related patch set uploaded (by Alex Monk):
Follow-up abd14947: Use HTTPS URL to citoid instead of protocol-relative

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

Do we already have a tracker task for general HTTPS support for deployment-prep?

Do we already have a tracker task for general HTTPS support for deployment-prep?

T50501: beta: Get SSL certificates for *.{projects}.beta.wmflabs.org

Change 292068 merged by jenkins-bot:
Follow-up abd14947: Use HTTPS URL to citoid instead of protocol-relative

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

Mentioned in SAL [2016-06-01T23:10:14Z] <dereckson@tin> Synchronized wmf-config/CommonSettings.php: Use HTTPS URL to citoid instead of protocol-relative (T136423) (duration: 00m 32s)