Repository navigation
fix(cloud): Preserve the stored draft envelope when renaming builder definitions - #1391
Conversation
…definitions Co-Authored-By: AJ Steers <aj@airbyte.io>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksTesting This PyAirbyte VersionYou can test this version of PyAirbyte using the following: # Run PyAirbyte CLI from this branch:
uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1792116932-builder-rename-preserve-draft' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1792116932-builder-rename-preserve-draft'PR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
📚 Show Repo GuidanceHelpful ResourcesCommunity SupportQuestions? Join the #pyairbyte channel in our Slack workspace. |
There was a problem hiding this comment.
🟢 Approval recommended
The focused fix prevents envelope-field loss and includes targeted regression coverage, with no unresolved findings.
0 open findings
What changed in this PR
Fixes draft-data loss when renaming custom Cloud source definitions, following up on #1381.
Changes:
- Writes the stored draft envelope back unchanged, retaining read-only unwrapping.
- Adds regression coverage for preserving envelope fields during rename.
| File | Description |
|---|---|
| tests/unit_tests/test_cloud_credentials.py | Adds an envelope-preservation rename test case. |
| airbyte/cloud/connectors.py | Preserves the stored draft unchanged during rename. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Code coverage overviewLanguages: Python Python / code-coverage/pytest-unit
Line coverage data for the release-candidate/v1 branch is not yet available. View coverage of the 10 most covered files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. |
Co-Authored-By: AJ Steers <aj@airbyte.io>
463153a
into
release-candidate/v1
Overview
👉 TL;DR: Renaming a custom YAML source definition could drop parts of its saved draft. The rename now writes the draft back exactly as it was stored.
Specifically,
CustomCloudSourceDefinition.renamesends the storeddeclarativeManifest.manifestunchanged toupdate_connector_builder_project. Only the read-onlydraft_manifestproperty unwraps the{"manifest": ...}envelope.Follows up on #1381:
{"manifest": ...}envelope in builderdraft_manifest#1381Changes
rename()no longer calls_unwrap_builder_manifest. The update endpoint replaces the stored draft with whatever is sent, so unwrapping on write lost envelope fields such asspecandversion.preserves-envelope-draftcase intest_custom_cloud_source_definition_rename_preserves_builder_dataasserts that the full envelope reaches the update call.Review Spotlight
Reviewers with limited time, please review first:
connectors.py#L1696-L1705: the write-backTest plan
uv run pytest tests/unit_tests/test_cloud_credentials.py: 155 passedLink to Devin session: https://app.devin.ai/sessions/a51d808f26c9402fafc93e7640648187
Open in Devin Desktop: https://app.devin.ai/desktop/session/a51d808f26c9402fafc93e7640648187?variant=devin
Requested by: Aaron ("AJ") Steers (@aaronsteers)