Skip to content

fix(ingestors): support icalendar 2.12 value types#461

Open
harshita3199 wants to merge 2 commits into
rc-1.6.0from
fix/icalendar-2.12
Open

fix(ingestors): support icalendar 2.12 value types#461
harshita3199 wants to merge 2 commits into
rc-1.6.0from
fix/icalendar-2.12

Conversation

@harshita3199

@harshita3199 harshita3199 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

  • Bumps icalendar 2.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::Values types and relocated Icalendar::Values::Array into Helpers. Our ingestor's rescue was silently swallowing the resulting NameError, so SourceTestWorkerTest#test_test_ical_source ingested 0 events instead of 1.

  • In icalendar 2.12, location isn'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_location method 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/summary accessed nil-safely (&.to_s)
  • location guarded before calling String methods
  • categories: Icalendar::Values::Array gone → flatten the plain nested Array and normalise to strings
  • tzid param is always an array in 2.11 → use present?

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

  • I have read and followed the CONTRIBUTING guide.
  • I confirm that I have the authority necessary to make this contribution on behalf of its copyright owner and agree
    to license it to the TeSS codebase under the
    BSD license.

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).
Copilot AI review requested due to automatic review settings July 7, 2026 21:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 icalendar from 2.9.0 to 2.12.3 in Gemfile.lock (including new transitive dependencies).
  • Update IcalIngestor#process_event to handle nil-able wrapped Icalendar::Values properties 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.

Comment thread lib/ingestors/ical_ingestor.rb

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

Comment thread lib/ingestors/ical_ingestor.rb

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants