Skip to content

Conversation

davidjgoss
Copy link
Contributor

@davidjgoss davidjgoss commented Jun 24, 2025

🤔 What's changed?

Use parseEnvelope from the messages library that deserialises all envelopes into classes that have default values for numbers (0), arrays ([]) and strings (""), rather than a plain JSON.parse.

⚡️ What's your motivation?

We can see from telemetry that some client-side errors are happening when reports are rendered for things like:

  • A Timestamp with undefned nanos
  • A Scenario with undefined examples

Whilst I think it's a bad thing in the long term (and have been trying to get rid of it, prematurely in retrospect), we need to have it for now so we tolerate missing fields, and then ideally establish the gaps with schema adherence and close them over time.

🏷️ What kind of change is this?

  • 🐛 Bug fix (non-breaking change which fixes a defect)

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

This text was originally generated from a template, then edited by hand. You can modify the template here.

@davidjgoss davidjgoss marked this pull request as ready for review June 24, 2025 21:30
@davidjgoss davidjgoss requested a review from a team as a code owner June 24, 2025 21:30
@davidjgoss davidjgoss changed the title Handle messaged with fields omitted Handle messages with fields omitted Jun 24, 2025
Copy link

@mpkorstanje mpkorstanje left a comment

Choose a reason for hiding this comment

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

LGTM

@davidjgoss davidjgoss merged commit 61a74bc into main Jun 24, 2025
4 checks passed
@davidjgoss davidjgoss deleted the schema-omissions branch June 24, 2025 23:15
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