Skip to content

Skip mission-directory creation in lean mode - #285

Open
CarsonDavis wants to merge 1 commit into
developmentfrom
fix/lean-mission-add-mkdir
Open

Skip mission-directory creation in lean mode#285
CarsonDavis wants to merge 1 commit into
developmentfrom
fix/lean-mission-add-mkdir

Conversation

@CarsonDavis

Copy link
Copy Markdown
Collaborator

Creating a mission via Configure on the lean (AWS) deployment failed with ENOENT: mkdir ./Missions/<name> — the mission-create path unconditionally makes a Missions/<name> filesystem directory, but lean has no Missions/ tree (assets live in object storage). The DB row committed before the mkdir threw, so the mission was created but the endpoint reported failure and the UI looked broken.

  • Gate the directory creation on !isLean(). Lean skips the Missions/<name> / Layers / Data mkdirs entirely; the DB-backed mission is still created. Full mode is byte-identical — when not lean the condition collapses to the original makedir check.

New test covers both modes (lean creates the row and no dirs; full creates the three dirs). Flagged as a follow-up: /clone has the same lean-filesystem exposure (an unguarded create_mission.py call).

In lean mode there is no local Missions/ filesystem — mission assets are
served from object storage — so the add handler's unconditional
fs.mkdirSync under makedir always threw ENOENT. Because the Config DB row
is created and committed before the mkdir runs, the mission ended up
existing while the endpoint reported 'Failed to create new mission.',
leaving a half-created mission that a retry reported as already existing.

Gate the Missions/<name> directory creation on full mode via isLean();
full mode keeps making the directory tree exactly as before. The DB-backed
mission row is still created in lean mode, just without the mkdir.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant