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

Workflow.orbit_dir resolves to non-writable path in containerized environments

Aperta
#151 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
58/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
docker, kubernetes, python
Ambito
backend, devops

Direzione di ricerca

Start in the Workflow model or init where orbit_dir defaults to Path("orbits") and is resolved, then inspect how work_dir is established. Reproduce with CWD=/ and verify that an implicit orbit directory is placed under work_dir while an explicitly supplied path remains unchanged; add regression coverage for the containerized case.

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

Descrizione

Summary

Workflow.orbit_dir defaults to Path("orbits") and is resolved via Path.resolve() against the process CWD. In containerized environments (Kubernetes pods, Docker containers) where CWD may be / or another read-only path, this resolves to /orbits, causing:

PermissionError: [Errno 13] Permission denied: '/orbits'

Related Upstream Issue

COMPASS: https://github.com/opera-adt/COMPASS/issues/241

The root cause spans both sweets (which sets the default) and COMPASS (which creates the directory). A fix in either project would resolve the issue.

Reproduction

# On a Kubernetes worker pod (CWD=/)
from sweets.core import Workflow
from sweets.download import BurstSearch

wf = Workflow(work_dir="/tmp/insar/event", bbox=(...), search=BurstSearch(...))
print(wf.orbit_dir)  # -> /orbits (non-writable)
wf.run()
# -> PermissionError: [Errno 13] Permission denied: '/orbits'

Environment

  • sweets version: installed via sweets-dask-noml-cpu:develop.latest container
  • Platform: EASI (Kubernetes/EKS), Dask Gateway worker pods
  • Observed on: Batch processing of 85 Australian earthquake events via Dask Gateway

Proposed Fix

Resolve orbit_dir relative to work_dir rather than CWD when no explicit path is provided:

# In Workflow model or __init__
if self.orbit_dir is None or self.orbit_dir == Path("orbits"):
    self.orbit_dir = self.work_dir / "orbits"

Alternatively, support an environment variable override:

import os
self.orbit_dir = Path(os.environ.get("SWEETS_ORBIT_DIR", self.work_dir / "orbits"))

Workaround

os.chdir(work_dir) before creating the Workflow so that Path("orbits").resolve() points to {work_dir}/orbits. This is fragile in multi-task/concurrent environments (e.g., Dask workers processing multiple events).

Impact

5 out of 21 events that reached geocoding failed with this error during a batch run of 85 earthquake events on Kubernetes. The remaining 64 events were lost to scheduler timeout before reaching this stage.

Lingua principale
Python
Stelle
75
Fork
24
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun 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 isce-framework/sweets

Tutte le issue di isce-framework/sweets

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.