Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test_invalid_ge_schema_batchrequest_pandas_config #3145

Merged
merged 3 commits into from
Feb 20, 2025
Merged

Conversation

pingsutw
Copy link
Member

@pingsutw pingsutw commented Feb 19, 2025

Tracking issue

NA

Why are the changes needed?

Fix test_invalid_ge_schema_batchrequest_pandas_config unit test

How was this patch tested?

unit test

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

Summary by Bito

This PR enhances error handling mechanisms and test execution efficiency. Key changes include updating exception types in Great Expectations schema testing (from InvalidBatchRequestError to TypeTransformerFailedError), improving error message clarity, and adjusting remote execution test timeout from 10 to 5 minutes. These modifications aim to improve test performance and error specificity while enhancing debugging capabilities.

Unit tests added: False

Estimated effort to review (1-5, lower is better): 1

@flyte-bot
Copy link
Contributor

flyte-bot commented Feb 19, 2025

Code Review Agent Run #ef462d

Actionable Suggestions - 2
  • plugins/flytekit-greatexpectations/tests/test_schema.py - 1
    • Consider exception type change implications · Line 149-149
  • tests/flytekit/integration/remote/test_remote.py - 1
    • Consider adding more descriptive error message · Line 919-920
Review Details
  • Files reviewed - 3 · Commit Range: 2762053..2762053
    • flytekit/core/type_engine.py
    • plugins/flytekit-greatexpectations/tests/test_schema.py
    • tests/flytekit/integration/remote/test_remote.py
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful

AI Code Review powered by Bito Logo

@flyte-bot
Copy link
Contributor

flyte-bot commented Feb 19, 2025

Changelist by Bito

This pull request implements the following key changes.

Key Change Files Impacted
Bug Fix - Error Handling Improvements in Tests

type_engine.py - Removed redundant literal type error message

test_schema.py - Updated exception types from ValidationError/InvalidBatchRequestError to TypeTransformerFailedError

test_remote.py - Enhanced error assertion with detailed message in remote execution test

Signed-off-by: Kevin Su <[email protected]>
@@ -1532,7 +1532,6 @@ async def _literal_map_to_kwargs(
raise TypeTransformerFailedError(
f"Error converting input '{k}' at position {i}:\n"
f"Literal value: {lm.literals[k]}\n"
f"Literal type: {literal_types}\n"
Copy link
Member Author

Choose a reason for hiding this comment

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

We can remove it since it's None in most cases, and the Python type should be sufficient

Signed-off-by: Kevin Su <[email protected]>
Copy link

codecov bot commented Feb 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.58%. Comparing base (80ddcda) to head (5f87d6b).
Report is 4 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (80ddcda) and HEAD (5f87d6b). Click for more details.

HEAD has 24 uploads less than BASE
Flag BASE (80ddcda) HEAD (5f87d6b)
25 1
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3145      +/-   ##
==========================================
- Coverage   92.24%   83.58%   -8.66%     
==========================================
  Files         118        3     -115     
  Lines        4991      195    -4796     
==========================================
- Hits         4604      163    -4441     
+ Misses        387       32     -355     

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

@flyte-bot
Copy link
Contributor

flyte-bot commented Feb 19, 2025

Code Review Agent Run #0e796c

Actionable Suggestions - 1
  • plugins/flytekit-greatexpectations/tests/test_schema.py - 1
    • Consider error type semantic accuracy · Line 63-63
Review Details
  • Files reviewed - 2 · Commit Range: 2762053..5f87d6b
    • plugins/flytekit-greatexpectations/tests/test_schema.py
    • tests/flytekit/integration/remote/test_remote.py
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful

AI Code Review powered by Bito Logo

@pingsutw pingsutw merged commit b557dfe into master Feb 20, 2025
111 of 112 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.

3 participants