fix(ingestors): support icalendar 2.12 value types#461
Open
harshita3199 wants to merge 2 commits into
Open
Conversation
Bump icalendar 2.9.0 -> 2.12.3 and update the iCal ingestor for the value-type changes in icalendar 2.10-2.12: properties (url, summary) are nil-able wrapped Values types (access nil-safely); guard location before String methods; Icalendar::Values::Array moved to Helpers and categories are now a plain nested Array (flatten + normalise to strings); tzid param is always an array in 2.11 (use present?). Fixes SourceTestWorkerTest#test_test_ical_source, which returned 0 events because the categories NameError was swallowed by the rescue. Full suite green (1286 tests, 0 failures).
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the iCalendar ingestion pipeline to be compatible with icalendar 2.10–2.12 value-type wrapping, alongside upgrading the icalendar gem dependency to a newer version.
Changes:
- Bump
icalendarfrom 2.9.0 to 2.12.3 inGemfile.lock(including new transitive dependencies). - Update
IcalIngestor#process_eventto handle nil-able wrappedIcalendar::Valuesproperties and normalize categories into a flat string array.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| lib/ingestors/ical_ingestor.rb | Adjusts event property access for wrapped/nil-able icalendar values; changes handling of location + categories. |
| Gemfile.lock | Updates locked icalendar version (2.9.0 → 2.12.3) and associated dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
adeel-ahmad-awan
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
Bumps
icalendar2.9.0 → 2.12.3 and updates the iCal ingestor for the value-type changes in icalendar 2.10–2.12.icalendar 2.10+ returns event properties as nil-able wrapped
Icalendar::Valuestypes and relocatedIcalendar::Values::ArrayintoHelpers. Our ingestor'srescuewas silently swallowing the resultingNameError, soSourceTestWorkerTest#test_test_ical_sourceingested 0 events instead of 1.In icalendar 2.12,
locationisn't a plain string anymore, it's a wrapper object. So we now convert it to a string once and use that. This avoids calling string methods on the wrapper, which could error and cause the event to be silently skipped.We also removed some dead code. The old
convert_locationmethod just returned whatever you gave it (it did nothing), so the code that tried to read city, country, and postcode from it never actually set anything. We deleted that unused branch and the empty method.Fixes:
url/summaryaccessed nil-safely (&.to_s)locationguarded before calling String methodsIcalendar::Values::Arraygone → flatten the plain nested Array and normalise to stringstzidparam is always an array in 2.11 → usepresent?Testing
Verified against icalendar 2.12.3: the ical worker + ingestor unit tests pass, and the full suite is green (1286 tests, 0 failures).
Checklist
to license it to the TeSS codebase under the
BSD license.