[FEATURE] Consistent YAML extensions across spec filenames (apm.yml / apm-policy.yml vs apm.lock.yaml)

Aperta Adatta ai principianti
#5,827 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
76/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python, yaml
Ambito
cli, documentation

Direzione di ricerca

Leggi OpenAPM v0.1, sezioni 3 e 5, oltre a docs/src/content/docs/reference/lockfile-spec.md; l’issue indica i punti esatti in cui vengono descritte le estensioni dei nomi dei file. Verifica se le estensioni diverse sono intenzionali o storiche, quindi aggiungi una breve spiegazione alla specifica e al riferimento del lockfile. Il lavoro è completato quando entrambi i documenti spiegano la differenza nei nomi in modo coerente.

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

Descrizione

type/feature

Is your feature request related to a problem? Please describe.

The three spec-defined filenames use two different YAML extensions, with no documented rationale:

File Extension Defined in
apm.yml .yml OpenAPM v0.1, Section 4
apm-policy.yml .yml OpenAPM v0.1, Section 6
apm.lock.yaml .yaml OpenAPM v0.1, Section 5

The lockfile is the odd one out. This invites "is this a typo?" questions from spec implementers, and users who guess apm.lock.yml (matching apm.yml) get a silent no-op because the CLI only looks for the exact hard-coded name via get_lockfile_path() in src/apm_cli/deps/lockfile.py.

Describe the solution you'd like

At minimum, document the inconsistency: add a short note in the spec (Section 3 Terminology or Section 5.1) and in docs/src/content/docs/reference/lockfile-spec.md stating whether the mixed extensions are intentional (e.g. "hand-authored files use .yml; generated artifacts use .yaml") or historical.

Optionally, also make get_lockfile_path() / LockFile.read() accept apm.lock.yml as a read fallback while keeping apm.lock.yaml canonical for writes -- the same forgiving pattern GitHub Actions uses.

Describe alternatives you've considered

  • Rename to apm.lock.yml (breaking). Aligns all three files on .yml. Only viable while the spec is 0.x (no backward-compat guarantee until 1.0), and requires extending migrate_lockfile_if_needed to rename apm.lock.yaml -> apm.lock.yml. Probably not worth the churn.
  • Status quo. Rejected: the spec should say something so the next reviewer doesn't file this same issue.

Additional context

Likely history worth confirming: the lockfile was originally an extensionless apm.lock (see CHANGELOG 0.7.2: "Full dependency resolution with apm.lock lockfile generation"); the YAML extension was appended later, producing apm.lock.yaml, and migrate_lockfile_if_needed still renames legacy apm.lock files. Meanwhile apm.yml and apm-policy.yml were named fresh with the short extension -- so the inconsistency is probably incidental rather than designed.

Lingua principale
Python
Stelle
4.5k
Fork
440
Merge medio
7h 29m
PR unite (30g)
843

Preparare l'ambiente

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 microsoft/apm

Tutte le issue di microsoft/apm

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.