Buf proto update#26
Closed
onokonem wants to merge 66 commits into
Closed
Conversation
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Audit connect-go v1.11.1→v1.18.1 changelog (zero breaking changes), catalogue proto diff between v1.30.1 and v1.69.0 (3 files removed, 7 new RPCs, no field conflicts), and document execution strategy for mechanical codegen phase. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Two plans in two waves: - Plan 01 (Wave 1): Switch proto source to buf-v1.69.0, upgrade connect-go to v1.18.1, remove go-grpc plugin and clean M-mappings - Plan 02 (Wave 2): Regenerate proto code, fix compilation, clean deps Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Research confirmed zero breaking changes in connect-go v1.11.1→v1.18.1 and clean proto diff. Plans cover BCG-01 through BCG-04. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…lugin - Update generate.go cp source from old buf submodule to buf-v1.69.0 - Remove entire go-grpc plugin block from buf.gen.yaml (unused at runtime) - Remove M-mappings for 3 absent proto files (labels, recommendation, sync) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Upgrade connect-go from v1.11.1 to v1.18.1 (Go 1.22 compatible ceiling) - protobuf transitively upgraded to v1.34.2 - grpc dependency remains (cleaned in Plan 02 after codegen) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- SUMMARY.md documents 2 tasks: generate.go path update and connect-go upgrade - All verification checks passed, no deviations Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Regenerated all protobuf Go code from buf-v1.69.0 proto definitions - Removed all _grpc.pb.go files (go-grpc plugin no longer in codegen pipeline) - Removed generated code for absent protos (labels, recommendation, sync) - Generated code includes new RPCs: GetSDKInfo, GetCargoVersion, GetNugetVersion, GetCmakeVersion Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Removed google.golang.org/grpc (no longer referenced by generated code) - Removed google.golang.org/genproto/googleapis/rpc (grpc transitive dep) - Removed github.com/golang/protobuf (grpc transitive dep) - Removed golang.org/x/text (no longer needed) - go build ./... and go vet ./... pass cleanly Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
All 4 requirements verified (BCG-01 through BCG-04): - Proto source switched to buf-v1.69.0 - connect-go upgraded to v1.18.1 - Project builds cleanly with regenerated code - go-grpc plugin removed Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Decisions: GetSDKInfo and manifest_digest deferred to Phase 5, E2E smoke test included in Phase 2 for early validation. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Phase 2 now includes E2E smoke tests for buf v1.30.1 AND v1.69.0+ to validate both protocol variants as early as possible. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… smoke tests Single-plan phase: HAND-01/HAND-03/HAND-04 already satisfied by Phase 1 codegen (verified via compilation). HAND-02 validated through E2E smoke tests running buf mod update with both v1.30.1 and v1.69.0 against a live TLS proxy server. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The Task 2 verify block only compiled the E2E test but never ran it. Updated to run the full E2E smoke test with a guard for missing EASYP_GITHUB_TOKEN (exits 0 with warning instead of failing). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Create e2e/smoke_test.go with TestSmokeBufModUpdate table-driven test - Tests start real TLS proxy server, run buf mod update with both CLI versions - Verify exit code 0 and buf.lock file creation - Gracefully skip when EASYP_GITHUB_TOKEN not set - Promote stretchr/testify from indirect to direct dependency (used in e2e tests) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ts plan - SUMMARY.md documenting HAND-01 through HAND-04 verification results - E2E smoke test auth gate documented (EASYP_GITHUB_TOKEN required) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Replace inline startServer/runBufModUpdate/findProjectRoot with testutil.StartServer, testutil.GetBuf, testutil.RequireEnvToken, testutil.RunBufModUpdate - Table-driven subtests use testutil.BufV130/BufV169 version constants - Remove all unused imports (bytes, context, fmt, net, os, os/exec, path/filepath, runtime, time, testify/require) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- TestDefaultTestConfig verifies default field values - TestConfigGeneration validates YAML output keys/values and file mode 0600 - TestRequireEnvToken_Skips verifies skip behavior on empty env var - TestVersionConstants verifies BufV130/BufV169 string values - TestGetBuf_CachePath validates cache path format and binary executable bit Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Phase 3 complete: 2/2 plans, verification passed (10/10 must-haves). Created reusable testutil package and refactored smoke test. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
….30.1 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ep buf mod update test Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Plan 04-01: Expose server output from StartServer and create two-step buf mod update test for OLD-02. Critical finding: buf v1.30.1 lacks buf dep update (introduced v1.32.0) — OLD-02 reinterpreted as two successive buf mod update calls. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add ServerResult struct with Port and Output fields to testutil - Change StartServer return type from int to ServerResult - Update smoke_test.go to use srv.Port and srv.Output in failure messages - Existing OLD-01 smoke test passes without regression Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Create e2e/old_proto_test.go with TestOldProtocolBufModUpdateTwice - Two-step pattern: buf mod update creates buf.lock, then runs again - Exercises GetModulePins + DownloadManifestAndBlobs RPCs via v1.30.1 - All failure messages include server output per D-04 - Test passes end-to-end against real proxy + GitHub API Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Phase 4 (Old Protocol Validation) verified — both OLD-01 and OLD-02 pass with buf v1.30.1 against real GitHub API. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Two plans in two waves: Plan 01 adds RunBufDepUpdate helper and writes new_proto_test.go with debug logging for empirical RPC discovery. Plan 02 addresses any blockers discovered during testing. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Both tests fail with content-type mismatch: modern buf v1.69.0 uses v1beta1.CommitService/GetCommits path instead of v1alpha1.ResolveService. The unregistered path falls through to rootHandler returning text/plain. Findings for Plan 05-02: - v1.69.0 calls /buf.registry.module.v1beta1.CommitService/GetCommits - Content-Type sent: application/proto, received: text/plain; charset=utf-8 - Need to register v1beta1 handlers or map to existing v1alpha1 handlers Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Modern buf v1.69.0 uses v1beta1.CommitService/GetCommits instead of v1alpha1.ResolveService/GetModulePins. This handler intercepts those requests and translates them to existing provider calls, responding with Connect protocol envelope format. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add v1beta1 RPC handlers for CommitService, GraphService, DownloadService,
and ModuleService to support modern buf CLI (v1.69.0+) which uses the new
protocol with DigestTypeB4 (SHAKE256).
Key changes:
- DownloadService returns Content{Commit, repeated File} instead of
the v1alpha1 manifest+blobs format
- Real B4 digest computed from file manifest (SHAKE256 of sorted
file digests) ensures digest verification passes
- Commit/graph/download results cached to avoid redundant GitHub API
calls and file downloads across the RPC chain
- ModuleService/GetModules handles ID-based module lookups
- GitHub provider HTTP transport forces IPv4 to avoid TLS handshake
timeouts on environments with broken IPv6
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
All 5 phases complete. Phase 5 implemented full v1beta1 protocol handlers (GetCommits, GetGraph, Download, GetModules) with caching and B4 digest computation. Both old and new buf CLI pass e2e. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
Author
|
заменен #27 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.