Skip to content

[MCC-1501368] Python Lib - remove client validation for Fetch Data ()#35

Merged
butsyk-mdsol merged 3 commits into
mainfrom
feat/MCC-1501368-2
May 21, 2026
Merged

[MCC-1501368] Python Lib - remove client validation for Fetch Data ()#35
butsyk-mdsol merged 3 commits into
mainfrom
feat/MCC-1501368-2

Conversation

@afieraru-mdsol

@afieraru-mdsol afieraru-mdsol commented May 21, 2026

Copy link
Copy Markdown
Contributor

feature/bug/enhance/refactor/tech_debt/hotfix

Changes Summary

This PR removes client-side input validation from DefaultDataConnectService.fetch_data(), shifting responsibility for validation to the transport/server layer and updating the unit tests accordingly.

Changes:

  • Removed UUID and first_n_rows validation logic from DefaultDataConnectService.fetch_data().
  • Deleted unit tests that asserted client-side ValidationError behavior for fetch_data().

Copilot AI review requested due to automatic review settings May 21, 2026 11:36

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.

Pull request overview

This PR removes client-side input validation from DefaultDataConnectService.fetch_data(), shifting responsibility for validation to the transport/server layer and updating the unit tests accordingly.

Changes:

  • Removed UUID and first_n_rows validation logic from DefaultDataConnectService.fetch_data().
  • Deleted unit tests that asserted client-side ValidationError behavior for fetch_data().

Reviewed changes

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

File Description
dataconnect/service/default.py Removes pre-flight validators and ErrorDetail usage from fetch_data().
tests/test_fetch_data.py Removes fetch_data() client-validation test cases and the ValidationError import.
Comments suppressed due to low confidence (1)

dataconnect/service/default.py:93

  • With client-side validation removed, there’s no longer a unit test that locks in the new behavior (e.g., that first_n_rows=0/negative values are passed through into DatasetTicket.limit rather than raising a ValidationError). Adding a focused test for this behavior will help prevent validation from being unintentionally reintroduced later.
    def fetch_data(self, dataset_uuid: UUID, first_n_rows: int | None = None) -> pd.DataFrame:
        """Fetch data for a dataset"""

        ticket = DatasetTicket(
            dataset_uuid=str(dataset_uuid),
            limit=first_n_rows,
        )

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_fetch_data.py Outdated
@butsyk-mdsol
butsyk-mdsol merged commit 191f425 into main May 21, 2026
3 checks passed
@butsyk-mdsol
butsyk-mdsol deleted the feat/MCC-1501368-2 branch May 21, 2026 11:56
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