Commit Graph

1703 Commits

Author SHA1 Message Date
Jake Oeding 7c8e8fa84f Revert "remove WeakParameters"
This reverts commit 149236d656.

cache badness

Change-Id: Idb2e55d085b313a99bfb97b7a7decc37301eff53
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/357033
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2024-09-11 21:01:15 +00:00
Imre Foldes 04b1721474 Use ON CONFLICT DO NOTHING when creating a Favorite
refs BUDA-7
flag=none

test plan:
- all tests should work

Change-Id: Ia6ecda055361c165fc0a6b12c0c14805dd402794
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/352819
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Imre Foldes <imre.foldes@instructure.com>
Product-Review: Imre Foldes <imre.foldes@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
2024-08-30 15:25:39 +00:00
jake.oeding bc11b3a9a6 remove WeakParameters
closes AE-1021
flag=none

test plan: n/a

Change-Id: Ibd40a09a65a6d96418f3a47826a2f5dece197661
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/356294
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
2024-08-30 12:30:25 +00:00
Jackson Howe 4f397cf25e Remove all references to UserNote
Note: this doesn't yet drop the tables/columns associated with this
feature, but every reference in application code is removed.

refs LX-157
flag = none
[skip-crystalball]

Test plan:
 - Navigate to the following places in Canvas and verify that there's
   no references to Faculty Journal anywhere:
   - account settings (link removed from sidebar)
   - account permissions (removed permission)
   - student detail page (/accounts/:id/users/:id - no FJ button)
   - activity report (/users/:id/teacher_activity/courses/:id - no
     column for FJ)
   - user show page (/users/:id - no FJ button)
   - inbox (FJ checkbox removed from create message modal)

Change-Id: I698b4c572b577501b7a9fe8b00f9c44608487558
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/355523
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-08-21 21:45:27 +00:00
Cody Cutrer 1aa7b89c68 reduce connection-establishment queries
skip them if we know the server has been pre-configured with our
preset values

Change-Id: Iad078f9812033056a6862720fbae55b954d1d195
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/355350
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-08-20 20:42:19 +00:00
August Thornton 5fb281aa1a Refactor permission registration
closes FOO-4659
flag = none

test plan |
- permissions should behave as before
- we now have a single source of truth for permissions
  that is much more obvious and understandable
- don't clutter role overrides with permissions
- registration has be refactored to be more DRY
- /permissions should work as before and plugins should
  be able to register permissions in the same way,
  however we settled on one uniform way to do it

Change-Id: I9e2f541643713065dfada692b4eb30230a9896e7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/355239
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2024-08-19 18:58:40 +00:00
Jacob Burroughs 9cd3b0706a Fix attachments cron typo
fixes gh-2383
fixes CANVAS-MN3K

Change-Id: I791edeea22a58b39e6fc3a072e12cd9b68f57def
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/354524
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-08-07 15:45:01 +00:00
Imre Foldes b65657745c Switch from bulk_insert to insert_all in StreamItem
closes BUDA-17

[skip-crystalball]

flag=none

test plan:
- there are no regressions in this CR, all tests should pass as before

Change-Id: Ic3a9eaf6c8ccdbf8c2d8b5af51de402ca0dc18c6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/353980
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Mario Hegyi <mario.hegyi@instructure.com>
2024-08-06 07:46:53 +00:00
Imre Foldes bb34bb3302 Use ON CONFLICT DO NOTHING when creating a StreamItem
refs BUDA-1

[skip-crystalball]

flag=none

test plan:
- all test should work

Change-Id: I27a33cad894e2d16286d55534f34c10a2d539fca
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/352469
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Endre Berki <endre.berki@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Endre Berki <endre.berki@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-07-29 13:46:42 +00:00
Adrian Gruber 7e60eb9c15 add monitor to update/delete_all functions
the limit clause got ignored intermittently for
the above functions

refs BUDA-26
flag=none

Change-Id: I7c0bbc896aa395ede258df398ec396913dcf3f37
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/353453
QA-Review: Adrián Grúber <adrian.gruber@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-07-29 08:10:23 +00:00
Isaac Moore 2c4499f81a Add ability to enable sentry-ruby code profiling
closes AE-985
flag=none

test plan:
- when traces and profiles are both enabled,
  profiles are collected and sent to Sentry

Change-Id: I4f401056128a47556f5b56bfb731dfc6c06fbd46
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348756
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
Build-Review: Isaac Moore <isaac.moore@instructure.com>
2024-07-24 16:05:49 +00:00
Mysti Lilla 6972e59f14 Fix ActiveRecord::Base.clear_active_connections! deprecation
flag=none

Test plan
- Specs pass

Change-Id: I772b1ffa0157242f93d2810ec9e14fd30085c30e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/352515
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
2024-07-15 16:55:26 +00:00
Cody Cutrer c50cab6c98 drop Rails 7.0 support
closes AE-882

Change-Id: I6d1205e826f3bf83528c957592fbf677a03ab508
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/350884
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-07-05 15:30:54 +00:00
Cody Cutrer 2164036e5b remove Psych patch for Ruby 2.x
Change-Id: Idf0741281612676111eb3116add16bcfaa99cda3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/350872
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2024-06-26 21:16:37 +00:00
Cody Cutrer e8b6adf242 rails 7.1: fix saving custom data with legacy data
Change-Id: Ie7654fee636e28b040e9a965295a6e5a37158c51
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/350870
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-06-24 16:34:56 +00:00
Cody Cutrer eac802cbbb rails 7.1: fix re-entrancy issue with marginalia and new connections
new connections run queries to populate the PG type map. if we've
recently cleared the columns cache (like when creating a new shard),
then calling an attribute method in order to add a marginalia comment
will consult the columns hash, and cause a new query... within the
configure_connection method, before it has actually been fully
configured, and thus will fail trying to access the pg_type_map field
for that inner query. avoid the re-entrancy by using direct attribute
access, which doesn't need to check the columns_hash

Change-Id: Ia98cca14d33d69a552f9c7e40704bc5ef6e4250e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/350762
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-06-21 20:03:18 +00:00
murilo.paiva 28bed562db Fix Course File Quotas are set in Mebibytes, not Megabytes
fixes RCX-1833
flag=none

Test plan:
- Create a new course
- In course settings, check the file storage
- If it is an old account, it will show 524MB
- If it is a new account, it will show 500MB

Change-Id: Idea02d4b12f1fcb3e1754d990f44dfb7ee575a39
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/349916
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob DeWar <jacob.dewar@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
Product-Review: Murilo Paiva <murilo.paiva@instructure.com>
2024-06-14 18:11:12 +00:00
Cody Cutrer 1cf0303abd rubocop: Rails/Output
Change-Id: I2e444385e38acfbabbdc0836af59b6fe27e33aa4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/349836
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-06-12 14:58:02 +00:00
Cody Cutrer 669c4cabac remove Cassandra support for page views
closes AE-280

[skip-stages=Flakey]

also vastly simplified the EventStream gem that no longer has to deal
with Cassandra

a pre-deploy migration is added that will migrate data from Cassandra
back to Postgres if you're currently using Cassandra. this means the
actual Cassandra gem dependencies can't be removed until that migration
is squashed

Change-Id: I0246ad9c058416e373ed4118a378bd640ace9c98
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/349182
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
2024-06-05 15:15:34 +00:00
Cody Cutrer 69e5ebc777 bundle update rubocop
and apply new cop 99% Style/SuperArguments

and a couple Layout/EmptyComment and Style/ArgumentsForwarding that
are found by fixes in those cops

Change-Id: Icc0af9c8065f035bca43868b564f73e8776052f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348626
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
2024-05-30 16:20:52 +00:00
Cody Cutrer 93494dde71 bundle update rubocop-rails
applying Rails/HttpStatus and Rails/WhereRange

Change-Id: Ib65d7896343e69501086cddbb75a231009c567d9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/347820
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
2024-05-29 16:33:01 +00:00
AJ Esa 7fac90d8aa map astana timezone to Asia/Almaty
Astana and Almaty map to the same timezone as of march 1, 2024

closes FOO-4337
flag=none

test plan:
- check that user, course and account settings time zone picker shows
  +5:00 for Astana

Change-Id: I2c3159ae2c0d49a43785a1703299cf600df24003
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/347583
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ajmal Esa <ajmal.esa@instructure.com>
Product-Review: Ajmal Esa <ajmal.esa@instructure.com>
2024-05-16 22:32:25 +00:00
rzana c7469e46e6 add REST backend support for discussion summary prototype
refs ADV-49

flag = discussion_summary

[fsc-timeout=45]

Test plan:
- tests pass

Change-Id: I4bb93c7e91091f3ef1634bc5598fcbe91a839165
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/347003
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Richard Zana <rzana@instructure.com>
Product-Review: Richard Zana <rzana@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
2024-05-10 15:05:33 +00:00
rzana ec3b5dbb32 add migrations and models for discussion summary prototype
refs ADV-49

flag = none

Test plan:
- tests pass

Change-Id: I834e1d7720686d59da9a5f2cdcdee1cb1fe850e8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/346722
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Richard Zana <rzana@instructure.com>
Product-Review: Richard Zana <rzana@instructure.com>
2024-05-06 15:46:51 +00:00
rzana 31744b6b3a add llm_config for discussion summary prototype
refs ADV-49

flag=none

Test plan:
- tests pass

Change-Id: I672c4d48534700fb99b00db3c412e8914640ffc3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/346442
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Richard Zana <rzana@instructure.com>
Product-Review: Richard Zana <rzana@instructure.com>
2024-05-03 07:01:25 +00:00
Aaron Ogata 74fa32018c remove deprecated initializer from graphql 1.13.x
Change-Id: I467fd6174915e670d3318ab489f03306d7a00d1c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345257
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2024-04-15 20:06:23 +00:00
Cody Cutrer 4c5d598a0d rails 7.1: rework canvas_rails_switcher for shuffle sharding
Change-Id: I91eb14289c188fdc376ce3bc3bfc8e9f7068acd8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345244
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-04-15 17:21:56 +00:00
Cody Cutrer 7c3b10e9e3 bundle update rubocop
[skip-stages=Flakey]

mostly Style/MapIntoArray (and then additional autocorrects enabled
after that was done). besides dynamo_query.rb and localized cop
disabling, everything was autocorrects

Change-Id: I9d663a6921d778bba38db2d179732964b4a26437
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/344905
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
2024-04-10 16:31:10 +00:00
Cody Cutrer 839b1a2547 bundle update rubocop
Change-Id: Ie122b2161e3ffb4a712653b967c18bc9eb57b0a5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342900
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-03-14 17:14:12 +00:00
Cody Cutrer 62b23fff58 migrations: "fix" db:migrate:redo and db:migrate:rollback
to undo the last actually dated migration, ignoring any migrations
that are "dated" far in the future that are integrity checks

Change-Id: I297dd27f5f6c39af5057d809bf6b89c558f7def0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342870
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-03-13 22:48:05 +00:00
Cody Cutrer 48cfe93459 migrations: remove accidental extra excessive update triggers
Change-Id: If1bba729e0ccd8939f99a0ad416daf5e80b8b5a6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342856
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-03-13 18:19:48 +00:00
Cody Cutrer 875f7f7609 migrations: support deferrable in inline foreign keys
Change-Id: I7a799b2f496ef28e91f3b2d044bd4f0302e95d81
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342799
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-03-12 21:09:41 +00:00
Cody Cutrer 3c91d24f79 migrations: don't waste a query checking if excessive update triggers exist
Change-Id: I4c8543517fd4d5b3c2fe19838907c7ebc74ad318
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342768
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-03-12 21:09:28 +00:00
Cody Cutrer 9f50dffebd prefer TableDefinition replica identity index method
Change-Id: Ia62c3fd15276bd083d309055becaf120ad996062
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342499
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Migration-Review: Aaron Ogata <aogata@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-03-09 06:30:01 +00:00
Jeremy Stanley 9a89ade898 split Smart Search from general AI functionality
soon SmartSearch will make use of our forthcoming LLM gem

test plan:
 - smoke test search feature

flag=smart_search
closes ADV-55

Change-Id: I9d837528c28c5acfdb0ded817cf0cc2259dd44b8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342407
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2024-03-08 21:17:24 +00:00
Cody Cutrer 7399e78b35 remove `add_replica_identity`
(and `remove_replica_identity`) in favor of `replica_identity_index`
and `set_replica_identity`. `add_replica_identity` required a model, not
just tables, and was written for migrating old tables to adding a replica
identity, instead of for new tables, where you can assume the column is
already null

Change-Id: Ie2db8b1e6859fc30a58c1e474c27f4d11e866f18
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342497
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-03-08 20:36:36 +00:00
Cody Cutrer b2f34557d3 ensure all PG collations exist during every migration run
since we could have added new locales. it's a single query that we
often run anyway to find the available collations, and then ones
that already exist are skipped. so fast and safe enough to run on
every migration run

Change-Id: I1cd93982a255646ccba911ae3cf4ab78c71ce27f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342469
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-03-08 18:13:48 +00:00
Cody Cutrer eb28d1b8ce squash old migrations 202103
Change-Id: I17f18f397e1d7cec151b080c410bfad402d69871
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342373
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-03-08 15:28:19 +00:00
Cody Cutrer 34e15bed91 squash old migrations 202011
Change-Id: I0d61a84cb08a2a0bd4e1e9f597e74898c1c3a14d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342362
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-03-08 15:22:42 +00:00
Isaac Moore 618304832b Prioritize PG service from ENV if specified
closes AE-795
flag=none

test plan:
- verify that if RAILS_DATABASE_SERVICE is specified, it takes
  priority over RAILS_DATABASE_USER
- verify that if RAILS_DATABASE_SERVICE is unspecified,
  RAILS_DATABASE_USER is used instead
- verify that if the service specified by RAILS_DATABASE_SERVICE
  is invalid, RAILS_DATABASE_USER is used instead

Change-Id: Ic8fa1fde3412db048a884c4c651f46d014d6208f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341762
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
2024-03-04 16:49:55 +00:00
Jacob Burroughs e89feee11e Improve ignored_columns handling
- Actually enumerate columns when any are ignored to avoid loading unknown attributes
- Remove old ignored_columns so we don't unnecessary bloat queries when not ignoring
- Various minor fixes for places we do unusual AR things to ensure they work with explicit columns
- Tweak some migrations to clear column information so future migrations are happy

refs AE-747

Change-Id: I60b1c3eae73f4fa9f0b6b6ab4d2b00abd8f8395f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339971
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2024-03-01 01:10:34 +00:00
Cody Cutrer 697cf3308e rails 7.1: various fixes
Change-Id: Id294a5bca9ba25ba601b4da91206e47b59cf0524
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341440
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-02-26 22:59:06 +00:00
Cody Cutrer 8e7c761798 spec: don't raise an error about slow AJAX requests when debugging
Change-Id: I1ac1830fb9ed1a2ac806138c0cd51a770c5f2776
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341418
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-02-26 20:02:09 +00:00
Omar Gerardo Soto-Fortuño 15aefaf5f6 Add discussion_entry.reply to permission cache blacklist
fixes VICE-4115
flag=react_discussions_post

test plan:
 - Specs pass
 - Follow steps on the ticket
 - Make sure reply buttons appear or disappear
     for students as expected.

Change-Id: Ie1c0b6c465f9835d68e52cd9abee4ca3bd923553
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341183
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
2024-02-26 16:15:36 +00:00
Cody Cutrer 75673a24d4 rails 7.1: spec/lib
closes AE-778

[skip-stages=Flakey]

Change-Id: Ie7143a47c5bd38ca55391a530f7e1b3673ffb4fc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340746
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-02-21 17:51:31 +00:00
Cody Cutrer 920dd72906 avoid STI conditions when updating/deleting with subqueries
it can lead to strange results where more rows were updated than were expected

also make sure to lock rows from the appropriate table when doing a subquery
update with a join in it

Change-Id: I16d0fee65a1d2b31ef72fd1933737b3715c441db
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340620
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-02-20 17:51:20 +00:00
Cody Cutrer 6f9ac0e9bd simplify inspect output of PostgreSQLAdapter
otherwise if you happen to see it in console or specs, it's way too
massive filled with nested objects and you can't see _anything_

Change-Id: I8fca49650b5175a8a29e6ab9de48d9a7c4409578
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339939
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-02-07 17:27:17 +00:00
Cody Cutrer f9f9f8423c rails 7.1: spec/models/active_record_base_spec.rb
Change-Id: I8de1994db8c9a1293769e19196a5903cb39f4a29
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339759
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-02-06 23:02:05 +00:00
Cody Cutrer 16e387f8bb rails 7.1: shim Relation#null_relation? for 7.0
Change-Id: Ia46bb279e16d2144b6001ff33a949d51b19a1674
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339720
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-02-05 21:04:55 +00:00
Cody Cutrer e38288399a rails 7.1: fix deprecations on `serialize` args
Change-Id: I4ed6fb240bafdcad1b2901ca3002411507c231d0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339390
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2024-02-05 16:15:13 +00:00