Skip to content

Conversation

@guimard
Copy link
Member

@guimard guimard commented Oct 13, 2025

Related to linagora/esn-sabre#115

Free/busy timestamp format changed with sabre/vobject

guimard and others added 6 commits October 13, 2025 17:50
Remove SCHEDULE-STATUS parameter assertions from AMQP message tests.

Sabre 4.1.5 no longer includes SCHEDULE-STATUS parameter in stored
calendar events. This parameter is iTIP-specific (RFC 6638) and only
relevant during scheduling message processing, not for stored events.

Changes:
- AlarmAMQPMessageContract: Remove 5 schedule-status assertions
- SearchAMQPMessageContract: Remove 4 schedule-status assertions

This aligns tests with Sabre 4.1.5 behavior where SCHEDULE-STATUS
is not persisted in calendar objects after iTIP processing.

Fixes 9 test failures in SabreV4AlarmAMQPMessageTest and
SabreV4SearchAMQPMessageTest

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Add ${json-unit.ignore} for schedule-status parameter in AMQP message
tests where Sabre 4.1.5 may or may not include this iTIP parameter.

The SCHEDULE-STATUS parameter behavior is inconsistent between different
operations in Sabre 4.1.5:
- Sometimes present in DELETE and UPDATE operations
- Sometimes absent in CREATE operations

Using ${json-unit.ignore} allows tests to pass regardless of whether
the parameter is present, matching the approach used in ITIPRequestContract.

Changes:
- AlarmAMQPMessageContract: Add ignore for 2 attendees
- SearchAMQPMessageContract: Add ignore for 2 attendees

Fixes remaining 4 test failures:
- shouldReceiveMessageFromEventAlarmDeletedExchange
- shouldReceiveMessageFromEventAlarmUpdatedExchangeWhenUpdateEvent
- shouldReceiveMessageFromEventDeletedExchange
- shouldReceiveMessageFromEventUpdatedExchange

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Schedule-status is not being published in AMQP messages in Sabre 4.1.5. The field is only present during iTIP scheduling operations and not in stored events. Using ${json-unit.ignore} incorrectly expected the field to be present with any value, but it's actually absent.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Removed schedule-status from SearchAMQPMessageContract where it's not present
- Added schedule-status with ${json-unit.ignore} to AlarmDeleted and AlarmUpdatedWhenUpdate tests where it's sometimes present

Schedule-status behavior in Sabre 4.1.5 is inconsistent: present in some operations (delete/update with alarms) but absent in others (create/request).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
…ests

Schedule-status is present in deleted and updated events, requiring ${json-unit.ignore} for these test cases.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Remove "Z" UTC suffix from datetime expectations in Java test contracts to match sabre/vobject 4.5.7 serialization format changes. This aligns with the PHP test updates in the main repository.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@guimard guimard changed the title Fix sabre 4.1.5 tests with vobject upgrade Breaking change: Fix sabre 4.1.5 tests with vobject upgrade Oct 13, 2025
{},
"date-time",
"3025-04-11T02:20:32Z"
"3025-04-11T02:20:32"
Copy link
Member

@chibenwa chibenwa Oct 13, 2025

Choose a reason for hiding this comment

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

On this we'd rather patch VOBJECT: a date only make sense with a timezone...
Implicit timezone is EVIL and shall be avoided on Sabre input / output.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure but for now it permits to continue upgrades to have patterns. The last commit (55a3245) contains a fix for a sabre-dav behavior change:

sabre/dav 4.5.0 fixed a bug where WebDAV response elements could contain both and . According to RFC 6578, deleted items in sync-collection responses must only contain a 404 Not Found element without any .

Copy link
Member Author

Choose a reason for hiding this comment

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

On this we'd rather patch VOBJECT: a date only make sense with a timezone... Implicit timezone is EVIL and shall be avoided on Sabre input / output.

Except if RFC fixes the timezone to UTC

Copy link
Member

@chibenwa chibenwa left a comment

Choose a reason for hiding this comment

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

Not acceptable changes on last commit.
Previous commits already merged.

guimard and others added 6 commits October 14, 2025 05:42
Java's Instant.parse() requires ISO-8601 instant format with timezone designator. Add Z suffix back to Instant.parse() calls that were incorrectly modified in the previous commit.

The previous commit correctly removed Z from JSON expectations (matching vobject 4.5.7 output), but this was a Java API requirement, not a JSON format change.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Remove Z suffix from FREEBUSY period datetime values to match vobject 4.5.7 serialization changes. Unlike other datetime fields in JSON responses (which retain Z), FREEBUSY periods in iCalendar format no longer include the UTC designator.

This change only affects the two FREEBUSY period expectations, not general datetime fields.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Add event[2][1][2][0][1][2][3] and old_event[2][1][2][0][1][2][3] to ignored paths in JSON assertions to avoid comparing randomly generated attendee email UUIDs.

The attendee emails contain dynamically generated UUIDs like:
  mailto:user_{UUID}@open-paas.org

These UUIDs change on each test run, causing false failures. We now ignore these paths just like we ignore PRODID and DTSTAMP.

Fixes 4 flaky tests:
- shouldReceiveMessageFromEventAlarmRequestExchange
- shouldReceiveMessageFromEventAlarmRequestExchangeWhenUpdateEvent
- shouldReceiveMessageFromEventAlarmUpdatedExchangeWhenAccept
- shouldReceiveMessageFromEventAlarmCancelExchange

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
sabre/dav 4.5.0 fixed a bug where WebDAV response elements could contain both <propstat> and <status>. According to RFC 6578, deleted items in sync-collection responses must only contain a <status>404 Not Found</status> element without any <propstat>.

The previous behavior included a <propstat> with status 418 (teapot) which was a non-standard workaround. The tests now expect the RFC-compliant response format.

Related: sabre-io/dav#1436

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@guimard
Copy link
Member Author

guimard commented Oct 14, 2025

Not acceptable changes on last commit. Previous commits already merged.

Changes reverted by reimporting Linagora's patch into sabre-io/vobject#731. No big difference now between this branch and fix-sabre-4.1.5-tests

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.

2 participants