fix: add FILES_BLOB_DIR to docker-compose and guard undefined array access in console#114
Open
Littly wants to merge 1 commit into
Open
fix: add FILES_BLOB_DIR to docker-compose and guard undefined array access in console#114Littly wants to merge 1 commit into
Littly wants to merge 1 commit into
Conversation
…ccess in console - Add FILES_BLOB_DIR env var to docker-compose.yml so oma-server uses the bind-mounted /app/data/ dir instead of the relative ./data path which resolves outside the volume and causes EACCES. - Guard r.agents?.length in AgentFormDialog runtime dropdown. - Add ?? [] fallbacks in AgentsList for API response data fields. - Add ?? [] fallbacks in RuntimesList for r.agents access.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
1. oma-server EACCES on startup (docker-compose)
FILES_BLOB_DIRwas not set in docker-compose.yml, so the code fell back to the default relative path./data/files-blobs. Underpnpm --filter, this resolves to/app/apps/main-node/data/files-blobs— outside the bind mount and without write permissions.Fix: Add
FILES_BLOB_DIR: /app/data/files-blobsto theoma-serverenvironment so it uses the bind-mounted volume.2. "Cannot read properties of undefined (reading 'length')" on new agent
The
/v1/runtimesAPI may return runtime objects without anagentsfield. Frontend code accessedr.agents.lengthandr.agents.map()without null guards.Fix:
AgentFormDialog.tsx:r.agents.length→r.agents?.lengthAgentsList.tsx: API response.data/.runtimesfields get?? []fallbacksRuntimesList.tsx:r.agentsgets?? []fallbacks