S3-WAL: a GitHub sync create without default_branch keeps main (#599 follow-up)

Đang mở
#603 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@ThomasK33 đang làm issue này rồi.

Từ ngày 5/11/2026.

  • #694 của @ThomasK33 — đang mở
  • #699 của @ThomasK33 — đã merge

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
aws, go, postgresql, sqlite
Lĩnh vực
backend, database

Hướng nghiên cứu

Read docs/explanation/storage-engine.md and docs/explanation/wire-compatibility.md for the S3-WAL format stability policy and recorded deviation. The change is explicitly deferred until the next metadata format change (v3 or later); then inspect internal/meta/s3walmeta*.go and the TestS3WALDropsDefaultBranchOmitted test. Done means the v3+ format handles create, adoption, PATCH clear, and conversion, with the deviation removed and the test moved into TestAdoptUpstreamDefaultBranch.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem

On S3-WAL, a GitHub sync create that omits default_branch keeps main. On PostgreSQL and SQLite, the first successful sync adopts the GitHub repository's default branch (#599). Upstream spec 40e43e00 (2026-10-28) documents the GitHub default for this case.

Why it is deferred

S3-WAL metadata v2 is frozen at "v1 plus four fields" (docs/explanation/storage-engine.md, S3WAL format stability policy). An older v2 writer drops unknown fields on rewrite, so a new default_branch_omitted field needs a format change. The #599 desk decision keeps v2 unchanged and records a deviation row in docs/explanation/wire-compatibility.md.

Trigger

Act on this issue at the next S3-WAL metadata format change (v3 or later). Add upstreams[].default_branch_omitted to that format, set it in S3WAL.CreateLinkedRepo, implement S3WAL.AdoptUpstreamDefaultBranch and the PATCH clear (as PostgreSQL and SQLite do), and remove the deviation row.

Scope

  • internal/meta/s3walmeta*.go: the field, the create write, the adopt write, the PATCH clear, and the convert path.
  • TestS3WALDropsDefaultBranchOmitted becomes the S3-WAL lane of TestAdoptUpstreamDefaultBranch.

Refs #599


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

Ngôn ngữ chính
Go
Star
0
Fork
0
Merge trung bình
6 giờ 16 phút
Pull request đã merge (30 ngày)
243

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của coder/openstorage

Tất cả issue của coder/openstorage

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.