Skip to content

chore(release): pull main into develop post release v1.107.1 - #4576

Merged
maheshkutty merged 1 commit into
developfrom
main
Aug 20, 2025
Merged

maheshkutty merged 1 commit into
developfrom
main

Conversation

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

👑 An automated PR

@coderabbitai

coderabbitai Bot commented Aug 20, 2025 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Validation now treats unexpected/unevaluated properties the same as additional property violations, ensuring consistent error detection across schemas.
    • Error messages and flagged property names are unified for these cases, improving clarity and reducing confusion for users.
    • No changes to the overall error format or integrations; existing consumers continue to work as before.

Walkthrough

Adds handling for Ajv’s unevaluatedProperties keyword by treating it like additionalProperties in event validation. The error construction now extracts property and message from either additionalProperty or unevaluatedProperty fields, keeping other error fields unchanged.

Changes

Cohort / File(s) Summary
Validation error handling
src/util/eventValidation.js
Map Ajv keyword unevaluatedProperties to AdditionalProperties handling. Unify property/message extraction using params.additionalProperty

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant V as Validator
  participant AJV as Ajv
  participant EH as Error Handler

  V->>AJV: validate(event, schema)
  AJV-->>V: result or errors[]
  alt has errors
    V->>EH: process AjvError
    alt keyword == additionalProperties or unevaluatedProperties
      note right of EH: Extract property from params.additionalProperty<br/>or params.unevaluatedProperty
      EH-->>V: rudderValidationError (type, meta, instancePath, schemaPath, property, message)
    else other keywords
      EH-->>V: existing handling
    end
  else valid
    V-->>V: proceed
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • sivashanmukh
  • krishna2020
  • koladilip

Suggestions:

  • Add unit tests covering unevaluatedProperties and additionalProperties to verify unified extraction.
  • Confirm Ajv version compatibility where unevaluatedProperties is emitted.
  • Update any developer docs or logging to reflect the new keyword handling.
  • Consider guarding for absent params fields to avoid edge-case crashes.

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch main

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/util/eventValidation.js (1)

224-226: Harden and DRY the property extraction to avoid “undefined” in messages

Use nullish coalescing with optional chaining and a safe fallback to prevent leaking “undefined” into logs if Ajv ever omits params. This also de-dupes the expression.

Apply this diff:

-            message: `${error.message} '${error.params.additionalProperty || error.params.unevaluatedProperty}'`,
-            property: error.params.additionalProperty || error.params.unevaluatedProperty,
+            message: `${error.message} '${error.params?.additionalProperty ?? error.params?.unevaluatedProperty ?? '(unknown-property)'}'`,
+            property: error.params?.additionalProperty ?? error.params?.unevaluatedProperty ?? '(unknown-property)',
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between bfa80ef and 99c3e78.

⛔ Files ignored due to path filters (4)
  • CHANGELOG.md is excluded by !**/*.md
  • package-lock.json is excluded by !**/package-lock.json, !**/*.json
  • package.json is excluded by !**/*.json
  • test/__tests__/trackingPlan.test.js is excluded by !**/test/**
📒 Files selected for processing (1)
  • src/util/eventValidation.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.js

⚙️ CodeRabbit Configuration File

Focus on ESLint errors (max 3) and warnings (max 5).

Files:

  • src/util/eventValidation.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Code Coverage
  • GitHub Check: UT Tests
  • GitHub Check: test_and_publish
  • GitHub Check: Analyze (go)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (go)
🔇 Additional comments (1)
src/util/eventValidation.js (1)

220-231: Good call: handle Ajv’s unevaluatedProperties like additionalProperties

Adding the unevaluatedProperties branch keeps behavior consistent across drafts and Ajv versions by mapping both to Additional-Properties. This is a sensible, backward-compatible change.

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor Author

Allure Test reports for this run are available at:

@codecov

codecov Bot commented Aug 20, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.81%. Comparing base (a327cf4) to head (99c3e78).
⚠️ Report is 3 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4576   +/-   ##
========================================
  Coverage    91.81%   91.81%           
========================================
  Files          642      642           
  Lines        33927    33930    +3     
  Branches      8039     8041    +2     
========================================
+ Hits         31149    31152    +3     
+ Misses        2548     2526   -22     
- Partials       230      252   +22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud

Copy link
Copy Markdown

@maheshkutty
maheshkutty merged commit 8132ec4 into develop Aug 20, 2025
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.

4 participants