Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@igarashitm
Copy link
Member

@igarashitm igarashitm commented Aug 7, 2025

Fixes: #2429

Following up #2427 (comment)

2025-08-07.12-00-54.mp4

@igarashitm igarashitm requested a review from Copilot August 7, 2025 15:42

This comment was marked as outdated.

@codecov
Copy link

codecov bot commented Aug 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.93%. Comparing base (516c2da) to head (e8d19f1).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2431      +/-   ##
==========================================
+ Coverage   81.91%   81.93%   +0.01%     
==========================================
  Files         471      471              
  Lines       15008    15020      +12     
  Branches     3313     3318       +5     
==========================================
+ Hits        12294    12306      +12     
- Misses       2546     2712     +166     
+ Partials      168        2     -166     

☔ 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.

This comment was marked as outdated.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug where JSON schemas could be incorrectly attached to source body documents in the DataMapper, which is not supported. The fix adds file extension validation and user feedback for unsupported file types.

  • Validates file extensions before allowing schema attachment based on document type
  • Shows appropriate error messages when JSON schemas are attempted on source body
  • Disables the attach button when no valid files are selected

Reviewed Changes

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

File Description
AttachSchemaButton.tsx Adds file extension validation and error handling to prevent JSON schema attachment to source body
AttachSchemaButton.test.tsx Adds comprehensive test coverage for new validation scenarios and error cases

@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 7, 2025

Copy link
Member

@lordrip lordrip left a comment

Choose a reason for hiding this comment

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

I don't mean to block the PR, but perhaps we should reconsider our direction and work on easing the use of JSON schemas rather than blocking the user from adding it.

@igarashitm igarashitm merged commit fdc41e3 into KaotoIO:main Aug 7, 2025
13 checks passed
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.

DataMapper: Avoid attaching JSON schema to the source body

2 participants