Page MenuHomePhabricator

The ops-maint-gcal.js script is missing support for some vendors
Open, Needs TriagePublic

Description

List of missing parses or that need to be updated:

  • Facebook
  • Telxius
  • Arelion: Throws a 400 with the following message: Your client has issued a malformed or illegal request. That’s all we know..
  • Digital Realty: Depending on the email contents invoking the addLinks() function doesn't generate the work button and shows the email contents in the console or the following errors are shown in the console:
VM198:23 Uncaught RangeError: Invalid time value
    at Date.toISOString (<anonymous>)
    at Work.gcalendarLink (<anonymous>:23:46)
    at <anonymous>:411:21
    at Array.forEach (<anonymous>)
    at addLinks (<anonymous>:409:8)
    at <anonymous>:1:1

Details

Event Timeline

Scott_French subscribed.

I was able to reproduce the Arelion issue with https://groups.google.com/u/0/a/wikimedia.org/g/ops-maintenance/c/TGXNGkB-gSo (yes, this is a reminder for a maintenance that's already on the calendar).

If I manually truncate the details field, the link works, so this is potentially either an encoding or length issue. I'll try to sort out which.

Edit: I'm pretty sure it's an overall URL path length issue, since (1) bisecting that "accepted" length of details does not reveal any unusual characters / encoding at the critical length and (2) length of details and other fields (e.g., text) trade off. Experimentally, keeping the overall path + query string less than ~ 16384 characters (post-encoding) seems to do the trick.

Moving this to SRE-Unowned, but cross-linking to the Maintain the maintenance calendar section of the clinic-duty docs where the script is referenced.

Thank you @Scott_French! I'm happy to help with ops-maint-gcal.js changes, feel free to send reviews my way

Change #1104727 had a related patch set uploaded (by Scott French; author: Scott French):

[operations/software@master] ops-maint-gcal.js: truncate message details

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

Change #1104727 merged by jenkins-bot:

[operations/software@master] ops-maint-gcal.js: truncate message details

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

Aklapper assigned this task to Scott_French.
Aklapper added a project: SRE.

Assuming this is resolved per Scott's previous comment and the merged patch. If not, please reopen.

Scott_French removed Scott_French as the assignee of this task.

Alas, my patch only fixed the Arelion details-too-large issue. Unless someone has done so in the interim, the are still two parses that need updated. IMO, adding a parse for Meta doesn't seem strictly necessary, since there's not a clear scenario (AFAIK) where a maintenance on a peering with them would have a significant effect on capacity.

@Scott_French Today I got a 400 Content-Too-Large from Google for an Arelion event, I tried to manually decrease MAX_PATH_QUERY_LEN = 14384; (instead of 16384) and I was able to add the event. Any specific reason why you picked 16384 besides being power-of-two friendly? I am wondering what limit works best. Thanks for the code anyway!

@elukey - Ah, I wonder if Google might have changed something. The 16384 number was based entirely on bisection with a small number of test events. It seemed to consistently be the "too large" threshold at the time, but something might have changed in the interim.

Devil's advocate here: Is it possible we are spending more time on fixing parse issues (that are expected to keep happening because upstreams will always change email formats etc) compared to manually adding a few calendar events once a week?