Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

create can leave a page that nothing on disk names

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
cli

Hướng nghiên cứu

Start in cmd/create/create.go at reserveOne, then trace CreatePage, os.WriteFile, persistToManifest, and failKeepingPage. Compare the recovery and failure paths and confirm the chosen behavior with maintainers; done means a failed reservation cannot leave an unrecorded page, or provides an exact actionable recovery record.

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

Mô tả

create can leave a page in Confluence that nothing on disk names.

In the reserve phase, reserveOne (cmd/create/create.go) calls CreatePage and only then records the new page_id. It records it in one of two places: the file's frontmatter (os.WriteFile) or a pages: entry in markfluence.yaml (persistToManifest). If that write fails, the page already exists. Examples are a read-only .md file, a read-only markfluence.yaml, or a manifest write that gives up after its one retry.

failKeepingPage keeps the id and URL in the command's result, so the run's own output is the only record. A second create makes a second page, because nothing says the first one exists. update cannot pick it up either, because nothing names the page.

This is the one case in create's partial-failure story that update cannot recover from. The other two recover:

  • A network failure during publish leaves a stub whose id is already on disk, so update finishes it.
  • An unreadable attachment fails the same way, after the id is on disk.

Options:

  • Check that the destination is writable before CreatePage. This is cheap, but it races: the check can pass and the write can still fail.
  • Write first, create second. Reserve a placeholder on disk, create the page, then fill in the id. A failure then leaves a local marker instead of a remote orphan.
  • Make the failure loud and actionable. For example, print the exact frontmatter line or manifest entry to add by hand, and give it an exit code a script can recognize.
Ngôn ngữ chính
Go
Star
2
Fork
0
Merge trung bình
2 giờ 50 phút
Pull request đã merge (30 ngày)
52

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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 mozilla/markfluence

Tất cả issue của mozilla/markfluence

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.