It was inheriting from Exception, so the rescue clause in
external_feed_aggregator.rb wasn't catching it, causing the entire
ExternalFeedAggregator.process job to fail.
Looking at the other uses of CanvasHttp, I see no reason to believe that
this was intentional.
closes CNVS-21213
Test plan: as mentioned above the problem here is that when an
ExternalFeed throws this error, it was not being caught properly and so
all external feeds afterwards in the queue would not be processed. In
order to recreate these conditions we need a feed that fails and then we
need to make sure there are more feeds afterwards in the queue.
- First add a valid rss external feed. We'll use this just to make sure
the system is working.
- Then add a url (doesn't even have to be to an rss feed) that redirects
more than 3 times before resolving. This will trigger the redirect
error, that was causing the problem. You can verify if a url will break
by running CanvasHttp.get('http://broken.redirects') in a rails console
- Then add another valid rss feed. This will be the one that comes
after the broken one, and it working successfully is what we're
looking for.
- The system loads feeds to check in order of a "refresh_date" which is
initially set to the time they were created, and then reset to the last
time they were updated. This is why the order of creation is important
above, because we'll create a refresh order that has a valid feed after
a broken feed.
- The feed import system is set up to ignore rss entries that were
created before the feed object was created. To get around this, you
can manually update the created_at time of these objects. Find a time
that is before the last entry in the two valid feeds, and run:
`ExternalFeed.update_all(created_at: 6.hours.ago)`
- Finally we're set, just run this in the console, to simulate the
delayed job that runs:
`ExternalFeedAggregator.process`
- And ensure that new entries from both the first and third feeds are
imported.
Change-Id: If60158719d1b618c1e706ea0d056bc6b08f87457
Reviewed-on: https://gerrit.instructure.com/53494
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
This is common functionality, so I pulled it out into the canvas_http
gem.
test plan: a canvadocs config using an http:// url should work, as well
as https:// urls which already worked.
Change-Id: I640445bfcf9b5c903d37aeb9db6c566430e2113d
Reviewed-on: https://gerrit.instructure.com/36760
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
they're likely already installed, and it will save a ton of trips
to rubygems.org
Change-Id: I9ccf2194619a6e8f97d7f21b4e232dac7ff20d3c
Reviewed-on: https://gerrit.instructure.com/35694
Reviewed-by: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Change-Id: I0dad5345aae75e552af97f5b54ded10bbfebbe37
Reviewed-on: https://gerrit.instructure.com/33925
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Test plan
* Upload a file using the url file upload api with a 500+ character name
* It should upload
Change-Id: I19ad272c1f5702ee5bc3c369060b3f6cea4077d7
Reviewed-on: https://gerrit.instructure.com/32890
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Change-Id: Ib90c12b99d30853a0a1a0235c9aa1b5dd645f614
fixes: CNVS-11949
Reviewed-on: https://gerrit.instructure.com/32176
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
QA-Review: August Thornton <august@instructure.com>