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

Prevent kubectl-us backups from overwriting on filename collisions

Aperta
#2,346 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à
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
kubernetes, python
Ambito
cli

Direzione di ricerca

Start at the backup command introduced by #2344 and trace how the context, backup type, and timestamp form the destination, including the os.replace(tmp_path, dest) path. Locate the existing backup tests, then add coverage for a successful destination-name collision and verify that concurrent invocations cannot overwrite completed backups.

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

Descrizione

Problem

The backup command introduced by #2344 names backup files using the Kubernetes context, backup type, and int(time.time()). Because the timestamp has one-second resolution, concurrent invocations for the same context can choose the same destination filename.

The successful write path uses os.replace(tmp_path, dest), which replaces an existing destination. A later successful backup can therefore silently overwrite an earlier valid backup, despite the code comment stating that an existing same-name backup is never clobbered.

Expected behavior

A successful backup must not overwrite an existing backup file. The command should either generate collision-resistant filenames or fail safely when the destination has already been reserved or exists.

Acceptance criteria

  • Existing completed backups are never silently overwritten.
  • Concurrent invocations cannot claim the same output filename.
  • Tests cover a successful destination-name collision.

Context

Found while reviewing #2344.

Lingua principale
Python
Stelle
13
Fork
11
Merge medio
1g 2h
PR unite (30g)
103

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna 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 rackerlabs/understack

Tutte le issue di rackerlabs/understack

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.