Thumbnails will now have namespace column which will be populated with
its attachments namespace on save. Old thumbnails will have null
namespace and should behave as they used to. New thumbnails will work
like boss.
Fixes CNV-12380
Test Plan
=========
Prerequisites
-------------
- S3 storage
- **Sharding**
- multiple users with the same ID on different shards
- profile photos on all the users with the same fileID
Details
-------
Before the fix the last uploaded avatar will be the *thumbnail* for
all user avatars that collide with each other.
After the code is updated all avatars will be blank.
After `bundle exec rake db:migrate` avatars should display correctly.
Change-Id: Iec533086308da352f317cda60b404327b14516e3
Reviewed-on: https://gerrit.instructure.com/39108
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
refs CNVS-13987
what was called CanvasUuid was *not* generating UUIDs. it was generating
slugs. by default, its generate method only creates 4 character slugs.
these should obviously not be used as UUIDs. the misnomer already caused
a bug in EventStream where it used these slugs as UUIDs, causing
collisions. to fix:
(1) rename canvas_uuid gem to canvas_slug, and rename it's primary
class CanvasUuid to CanvasSlug
(2) create new canvas_uuid gem, with class CanvasUUID, extracted from
lib/uuid_singleton for actual UUID generation
(3) fix event stream use CanvasUUID, rather than following the rename
of CanvasUuid to CanvasSlug
test-plan:
- have cassandra set up for audit logs
- create an audit log entry (e.g. change a grade)
- look at the generated audit log entry's id field; it should be a UUID
value, not a 4 character slug
Change-Id: I19758fff4433cd6cb2e21219217dced19ee05c5a
Reviewed-on: https://gerrit.instructure.com/37506
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
Change-Id: Ic226e61e900532cc3acf08444b316b6e2bb6b368
Reviewed-on: https://gerrit.instructure.com/30049
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
basically, s3 needs path_prefix, and refactor authenticated_s3_url for
local storage so that dynamic attachment fu backend switching works
for thumbnail as well
Change-Id: I321560f4d01099000997cd5af379b87aaea75d86
Reviewed-on: https://gerrit.instructure.com/18604
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
QA-Review: Clare Hetherington <clare@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
closes CNVS-4248
this gains us EU region support, and no longer using a forked aws-s3 gem
in the process, setting bucket_name via a plugin is no longer supported
test plan:
* should be able to upload new files via various methods
* should be able to download old and new files still
Change-Id: If32fa5f381f5a4ac493948fa32230175a695f51e
Reviewed-on: https://gerrit.instructure.com/18282
QA-Review: Clare Hetherington <clare@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Thumbnails should come over https if the page is being viewed over https.
Change-Id: Id934c3ce3668cc5a72d90ee01e632bfe6dd0515b
Reviewed-on: https://gerrit.instructure.com/17053
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
test plan:
* enable s3 storage
* configure plugin settings to a different bucket than s3.yml
* ensure that avatar thumbnails are uploaded and retrieved from
the different bucket
Change-Id: I7fbf09fa8423c7a916d3b0a602606e2370b7837c
Reviewed-on: https://gerrit.instructure.com/10942
Tested-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>