Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

create can leave a page that nothing on disk names

Aperta
#185 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
go
Ambito
cli

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
Go
Stelle
2
Fork
0
Merge medio
2h 50m
PR unite (30g)
52

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di mozilla/markfluence

Tutte le issue di mozilla/markfluence

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.