Skip to content

Auto-complete reviewed SDK field copies during bumps - #7158

Open
janniklasrose wants to merge 2 commits into
mainfrom
janniklasrose/sdk-field-copies
Open

janniklasrose wants to merge 2 commits into
mainfrom
janniklasrose/sdk-field-copies

Conversation

@janniklasrose

@janniklasrose janniklasrose commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Changes

Run fix-sdk-field-copies at the start of bump-sdk-post. Explicit // sdk:copy-from source annotations opt 26 audited struct literals into completing missing fields with the same Go name, JSON name, and exact type. Preserve existing mappings and type-check all proposed edits before writing. The tool's README records the audit and exclusions for every direct-resource family.

Why

SDK additions such as the warehouse fields in #7155 currently need manual exhaustruct fixes. A reviewed annotation establishes which source owns future fields; type checking verifies the copy mechanics. Selective bodies, mixed-source mappings, metadata, conversions, and unmatched fields remain manual.

SDK field removals are breaking changes and intentionally require manual handling. If a removed field is still referenced in the direct-resource package or its dependencies, the fixer's initial type-check fails loudly before any files are written. It does not delete assignments or guess replacements.

Tests

  • Focused fixtures cover warehouse additions, idempotency, preserved exceptions, embeddings and shadowing, nested annotations, JSON/type mismatches, and rejected edits leaving files unchanged.
  • Replayed Update Go SDK to v0.190.0 #7155 before its manual warehouse fix: generated the same six copies, then passed direct-resource tests and exhaustruct; a second run made no changes.
  • Repository formatting, checks, lint, tests, and schema/direct generators.

This PR was written by Codex.

@github-actions github-actions Bot added the DABs DABs related issues label Oct 22, 2026
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 6152392

Run: 39950542540

Env 🔄​flaky ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 281 15 4:21
✅​ aws-windows-latest-4core-16gb 283 13 3:13
🔄​ azure linux-2core-8gb 2 278 15 4:12
✅​ azure-windows-latest-4core-16gb 282 13 3:08
✅​ gcp linux-2core-8gb 281 15 4:27
✅​ gcp-windows-latest-4core-16gb 283 13 3:11
Test Name azure linux-2core-8gb
🔄​ TestFsCpDirToDirWithOverwriteFlag 🔄​f
🔄​ TestFsCpDirToDirWithOverwriteFlag/local_to_uc-volumes 🔄​f
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:08 aws-windows-latest-4core-16gb TestAccept
3:05 gcp-windows-latest-4core-16gb TestAccept
3:02 azure-windows-latest-4core-16gb TestAccept

@janniklasrose
janniklasrose force-pushed the janniklasrose/sdk-field-copies branch from b2b1a00 to 13997b3 Compare October 22, 2026 07:30
Add an opt-in source fixer for missing direct-resource fields and run it
before the SDK bump's generators. Require matching Go names, JSON names,
and exact types; preserve existing mappings and type-check proposed edits
before writing them.

Audit every direct-resource family, annotate 26 copy sites, and document
the selective and mixed-source mappings that still require review. Cover
the inference boundaries with fixtures and replay the six warehouse field
copies from SDK bump #7155.
@janniklasrose
janniklasrose force-pushed the janniklasrose/sdk-field-copies branch from 13997b3 to 1150b96 Compare October 23, 2026 11:54
@janniklasrose
janniklasrose marked this pull request as ready for review October 23, 2026 12:31
@janniklasrose
janniklasrose requested review from a team as code owners October 23, 2026 12:31

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants