Skip to content

Do not send an included emergency calling service back in a DID update - #77

Merged
Skumring merged 1 commit into
prereleasefrom
fix/did-ecs-not-echoed
Nov 19, 2026
Merged

Skumring merged 1 commit into
prereleasefrom
fix/did-ecs-not-echoed

Conversation

@Skumring

Copy link
Copy Markdown
Contributor

Summary

This follows #76. A DID update may only unassign the DID's emergency calling service, never set or keep it. A DID read with include=emergency_calling_service still sent the service back on every update, so the API refused the whole update:

Did did = client.dids().find(id, QueryParams.builder().include("emergency_calling_service").build()).getData();
did.setDescription("…");
client.dids().update(did);   // 422 emergency_calling_service - is invalid. Only unassignment is allowed.

emergency_calling_service is now marked serialise = false, like the four read-only relationships in #76. Unassigning still works: did.setEmergencyCallingService(null) marks the field changed, and the update sends emergency_calling_service: {data: null} through the same path as before.

Found by running the examples against the sandbox: DidsExample failed once the newest DID had an emergency calling service.

Tests

  • DidTest.testUpdateDidLoadedWithIncludeDoesNotResendReadOnlyRelationships now also includes an emergency calling service. It checks the service is read, with its name, and is not sent back. Without the change the test fails.
  • testUpdateDidUnassignEmergencyCallingService still sends data: null.
  • ./gradlew test passes.

The API lets an update only unassign a DID's emergency calling service. A DID read with include=emergency_calling_service sent the service back on any update, and the API refused it with 422 emergency_calling_service - is invalid. Only unassignment is allowed. The relationship is now marked serialise = false; setting it to null still sends data: null, through the same path as before.
@Skumring
Skumring requested a balanced review from Copilot November 19, 2026 16:48
@coderabbitai

coderabbitai Bot commented Nov 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: abb3cde8-6a1b-4297-8634-7b996cdf5d65

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the change to omit included emergency calling services from DID updates.

No open issues 🎉

What changed in this PR

Extends #76’s DID update handling to prevent included emergency calling services from being sent back to the API, avoiding rejected updates while preserving explicit unassignment.

Changes:

  • Marks the DID’s emergency calling service relationship as non-serializable.
  • Extends the regression test and fixture to verify included service data remains readable but is omitted from updates.
File Description
src/​test/​resources/​fixtures/​dids/​show_with_included_read_only_relationships.json Adds emergency calling service linkage and included attributes.
src/​test/​java/​com/​didww/​sdk/​resource/​DidTest.java Extends the update regression test to include and read the emergency service.
src/​main/​java/​com/​didww/​sdk/​resource/​Did.java Disables serialization of the emergency calling service relationship.

Review effort: Balanced

@Skumring
Skumring merged commit 7f08b42 into prerelease Nov 19, 2026
7 checks passed
@Skumring
Skumring deleted the fix/did-ecs-not-echoed branch November 19, 2026 16:50
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