Add datasource copy API - #719
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. 📜 Recent review details⏰ Context from checks skipped due to timeout. (5)
📝 WalkthroughWalkthroughThe PR adds asynchronous datasource copying. It serializes the source query, submits a GraphQL copy mutation, returns the copied datasource, and preserves origin metadata in client models and datasource state. Tests verify origin preservation during refresh. ChangesDatasource copy workflow
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The PR adds datasource-copy helpers and related metadata while returning the copied datasource for asynchronous processing; no actionable merge-blocking risk remains based on the supplied evidence. Sequence Diagram(s)sequenceDiagram
participant Datasource
participant DataClient
participant GraphQLAPI
Datasource->>DataClient: Submit source ID, name, and serialized query
DataClient->>GraphQLAPI: Execute copy_datasource mutation
GraphQLAPI-->>DataClient: Return copied datasource result and origin
DataClient-->>Datasource: Construct copied Datasource
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 5b27c034-d0e4-46a6-a682-969303c013f8
📒 Files selected for processing (7)
dagshub/data_engine/client/data_client.pydagshub/data_engine/client/gql_mutations.pydagshub/data_engine/client/models.pydagshub/data_engine/datasources.pydagshub/data_engine/model/datasource.pydagshub/data_engine/model/datasource_state.pytests/data_engine/test_datasource.py
Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.
📜 Review details
⏰ Context from checks skipped due to timeout. (6)
- GitHub Check: build (3.9)
- GitHub Check: build (3.12)
- GitHub Check: build (3.10)
- GitHub Check: build (3.11)
- GitHub Check: build (3.13)
- GitHub Check: Build documentation
⚠️ CI failures not shown inline (1)
GitHub Check: Flake8: 1 error
Conclusion: failure
Flake8 found 1 error
🧰 Additional context used
🪛 GitHub Check: Flake8
dagshub/data_engine/client/gql_mutations.py
[failure] 194-194: dagshub/data_engine/client/gql_mutations.py#L194
Line too long (125 > 120 characters) (E501)
🔇 Additional comments (3)
dagshub/data_engine/client/models.py (1)
104-115: LGTM!Also applies to: 124-125
dagshub/data_engine/model/datasource_state.py (1)
10-16: LGTM!Also applies to: 52-52, 225-225
tests/data_engine/test_datasource.py (1)
14-21: LGTM!Also applies to: 64-93
Summary
Testing
.venv/bin/python -m pytest tests/data_engine/test_datasource.py