This commit adds code to calendar_events_api_controller#create
for parsing an rrule parameter to create an event series.
see https://icalendar.org/rrule-tool.html for help creating RRULEs
closes LS-2799
flag=calendar_series
test plan:
- enable site admin flag calendar_series
- POST to /api/v1/calendar_events and event including an rrule param
for example:
{"calendar_event":{"context_code":"course_84","title":"an event",
"start_at":"2022-06-03T06:00:00-04:00",
"end_at":"2022-06-03T06:30:00-04:00",
"rrule":"RRULE:FREQ=WEEKLY;INTERVAL=1;COUNT=2"}}
> expect a response with the first event in the series, plus the rest
in the duplicates array.
- try with errors
- an RRULE with COUNT > 200
- an RRULE with COUNT <= 0
- an RRULE using UNTIL that creates > 200 events
- an RRULE with no COUNT or UNTIL
- an RRULE that's not valid
> expect a 400 response
Change-Id: Ib7282bbe1b7ab0cb27ce3e351d0be4622208a212
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/293153
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Change-Id: I61d5ba9f6ef5e0837da2ec22b695b9a56b88acb5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/293104
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
since v2.2.0 conflicts with our Multipart gem
closes CNVS-55656
flag = none
Test plan:
- Attach a file as a comment in speedgrader
- Expect it to work
Change-Id: Ifff1188b0fb802ecbe6a6d76821892d842504f85
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/293239
Reviewed-by: Ben Rinaca <brinaca@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Alex Slaughter <aslaughter@instructure.com>
Product-Review: Alex Slaughter <aslaughter@instructure.com>
This will result in new `create` and `complete` statsd metrics being
emitted for jobs.
closes DE-1124
flag=none
test plan:
- ensure that Canvas boots correctly and jobs are queued/executed
correctly:
- with a local statsd server running
- without a local statsd server running
Change-Id: I4d451e61e3ddb397c371d46b0e2e0a34ae9295c5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/292758
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
test plan:
- create a job that will fail
(e.g. `delay.raise "whoops"`)
- find the failed job in /jobs_v2 and click its id
- scroll down to the job details table and click the
"requeue job" button
- the job should be requeued and the id of the requeued
job should appear in place of the button
- search that id and you should find the newer failed_jobs
entry (after the requeued job fails)
flag=jobs_v2
closes DE-1194
Change-Id: I33d637db616aad1ec431428e7c5c60c6253660aa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/292334
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Migration-Review: Alex Slaughter <aslaughter@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
This will result in new `create` and `complete` statsd metrics being
emitted for jobs.
closes DE-1124
flag=none
test plan:
- ensure that Canvas boots correctly and jobs are queued/executed
correctly:
- with a local statsd server running
- without a local statsd server running
Change-Id: Iaccf0c7094de1be8dae5571aaccbf5c301213978
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/292622
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
LTI 1 launches (and LTI 2 launches using the same OAuth 1 signature
method) use a form with hidden fields to send the parameters to the LTI
tool. Browsers always send newlines in hidden input fields (i.e. params
encoded as form data) as carriage return + line feed (%0D%0A = "\r\n").
As a result, if any launch parameters include newlines, the tool will
get "%0D%0A" in the query params for them.
Currently, though, we calculate the base string as if the newlines in
the parameters are just "%0A". This commit changes the newlines to CRLF
before-hand to simulate what browsers do. (I then use the CRLF'd version
for the actual parameters ... this eliminates any possibility of any
differences due to weird mixed LF and CRLF endings or anything, and
browsers don't add extra CRs if endings are already CRLF.)
refs INTEROP-7387
flag=none
Test plan:
** SETUP **
- on line 210 of app/controllers/lti/message_controller.rb, right before
the end of the lti2_basic_launch method, add the following line:
Lti::Logging.lti_1_launch_generated(message.message_authenticator.base_string)
- have the following LTI tools installed:
- an LTI 2 tool with the Canvas.placements.similarityDetection
placement (that should be in the MessageHandler's 'capabilities')
- an LTI 1 tool with extension_setting "oauth_compliant"
- an LTI 1 tool without extension_setting "oauth_compliant" (and
double-check sure disable_lti_post_only "Don't Move LTI Query Params
to POST Body" feature flag is off)
- For the LTI 2 tool, add "ResourceLink.description" to the
MessageHandler's "capabilities".
- For the LTI 1 tools, have a custom parameter
with the value "$ResourceLink.description" (there might be a way to
sent this as resourcelink_description instead of a custom parameter, I
don't know what it is) and give it the similarity_detection placement
- Open the copyasfetch_verify_oauth_signature.rb script (attached to the
ticket). Find the secrets for your LTI 1 and LTI 2 tools as described
in the script. Adjust the `secret_for_url()` method there for your
tools.
** LAUNCHING AND TESTING **
- Launch the tools in the following ways in a browser that supports
"copy as fetch" (Chrome and Firefox do). (Note that you don't need the
tools running / working, we just need to look at the launch.)
- for the LTI 2 tools and LTI 1 tools, create a new assignment. In the
text field add some bullet points. Under Submission Type choose
Online -> Text Entry. Then choose the tool in the Similarity
Detection dropdown. The tool will launch.
- For the LTI 1 tools, also make assignments with the description with
bullet points but of type LTI assignment by choosing the tool. Then
launch the assignment.
- For each launch, verify the base string for the launch as follows.
- In the logs, the base string is logged:
grep base.string log/development.log
Check that newlines are encoded as %0D%0A (which when double-encoded
in the base string is %250D%250A). If you want, to unencode one
level you can use:
ruby -e 'require "cgi"; puts CGI.unescape(ARGF.read.split("&").last)'
- Go to dev tools, find the launch in the Network tab, right click and
choose "copy as fetch". Save to a file and pipe into the
copyasfetch_verify_oauth_signature.rb script. It will tell you if
the expected signature matches the one used in the launch. Also
verify that the base string used includes CRLFs, i.e. "%250D%250A".
Change-Id: I7d70f7740612ad25cb3ff61940d05e97a5a87aea
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/290806
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
refs DE-523
Previously, the current version would be represented by Gemfile.lock and the next version by Gemfile.lock.next. Replace both with a common format of Gemfile.rails<version>.lock to be able to iterate over the files in a cleaner way.
Change-Id: I35aef3a14e726eb35db8aebc808af4a925552c01
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/288563
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
refs DE-1120
Change-Id: I39aa0a1afa4c8aa505cddf101fe8d78a909374da
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/288528
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
refs DE-523
Test Plan
1. Ensure CANVAS_RAILS override works
2. Ensure file override works
3. Ensure consul override works
Change-Id: I6eea63bba5c401428c02179a3d6187c8265ce33e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287849
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
And bump switchman to patch the pg adapter earlier in boot
Change-Id: I88baa87b0894e7252229109f2e0b89af10754ca9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287663
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
This gets the gem update from pull request
https://github.com/instructure/canvas_connect/pull/15
closes LS-3032
flag=none
test plan: it was tested in github, but if you want to again
- in /plugins select AdobeConnect,
- set domain and meeting folder to http://your.ip.address/, login id and password to anything
- in /calendar, create a calendar event with an adobe connect webconference
- refresh the calendar
> expect the calendar_evens api call to return the event with web_conference data
> expect the event to show up
> expect an error logged in your console
- If you want to prove it still works if there is an adobe, I have a perl script webserver and data file that mocks Adobe Connect
Change-Id: I58770baeb7006d65681431f032894209e04c259d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286812
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Switches from standalone containers to explicit node+hub config
Selenium 4 has some differences in handling stale elements that we
should be aware of moving forward
closes OUT-4988
flag=none
[skip-stages=Flakey Spec Catcher]
Test-plan:
- make sure screenshots can happen for failures
- retrigger a few times and make sure things pass
- verify build summaries are intact
- verify FSC can still run seleniums
- verify local selenium running still works
- firefox / chrome / edge where applicable
- verify docker selenium running still works
- firefox / chrome / edge where applicable
Change-Id: I8f2fe5a34d712b5ccd7191bae7a9aeeb6f1f473d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284811
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
Change-Id: I9370a96eb9eb0fde8c11f0243dc0785489002a55
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285831
Reviewed-by: August Thornton <august@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
This version update includes several bug fixes and new features.
flag=none
closes DE-1054, DE-1033
test plan:
- verify errors and transactions are still captured
- verify that traces which have a parent transaction abide by the parent
transaction's sample decision (if the trace ID ends in `1`, the trace
is sampled; if it ends in `0`, it is not sampled)
Change-Id: I0763239e8b9ba962306d81de4987769ca32ef000
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285105
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
Change-Id: I89129633731a68c38a5026b6b26318d1f3699a2a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284968
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
it's not compatible with ruby 3 and it hasn't been used since
we stopped running selenium specs on internet explorer
Change-Id: Iad79eeb57b4ce7a1f972e223278accef79966a99
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285262
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Sentry recently dropped the `faraday` requirement from their Ruby SDKs,
which means we no longer need to use our fork which set the dependency to
an older version.
flag=none
closes DE-1012
test plan:
- verify Canvas starts successfully
- verify exceptions are reported to Sentry correctly
- verify APM transactions are reported to Sentry correctly
Change-Id: Ifc9a290c21b0fdb5cb15b4ec542d467fa562cdd9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284270
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
This PS uses most of the work done in the previous implementation.
The main difference is the moment when the word count is calculated,
a new column was created to store this value at the moment of
saving the file, this will avoid requesting the AWS s3 bucket for
each file when loading the speed grader
flag=word_count_in_speed_grader
fixes LS-2922
test plan:
- Enable word count in speed grader flag
- In a course that has many attachments in speedgrader
- Create an assignment that requires submissions
- Submit a PDF, RTF, TXT, and DOCX file
- In speed grader, verify the word counts are present when
selecting the different files
Change-Id: I7262afe43787ffdf7859fbf2d10cd16a52521996
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283607
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
rather than trying to calculate the build times, use the new rspecq
version that now adds the buildTimes to redis.
flag = none
Change-Id: I40544859e2be2831f140fa45387922036af8cd8c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284181
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Bobby Buten <bobby.buten@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
flag = none
Test plan:
• run `bundle install`
• run `bundle exec rails canvas:compile_assets
• verify no errors related to commit message
Change-Id: Ifff4a6c32bf517b35a6981bb14a17b159368ff9b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284109
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>