fix(pelican): auto-create db/maps dirs and offer full image variant#356
fix(pelican): auto-create db/maps dirs and offer full image variant#356
Conversation
The app only auto-created the data directory, so when the Pelican install script's directories didn't persist, the server crashed on startup with "unable to open database file: no such file or directory". - Auto-create parent directory for DB file and maps directory on startup - Add full image variant (with map tools) to Pelican egg, default to it - Use human-readable names in docker_images dropdown
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses critical startup stability by ensuring necessary data directories are automatically provisioned, preventing crashes related to missing database or map storage. Additionally, it enhances deployment flexibility by offering distinct "Full" and "Slim" Docker image options within the Pelican egg configuration, allowing users to choose the appropriate variant for their needs. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request addresses a startup crash by ensuring necessary directories are created on startup, and also introduces different Docker image variants. The core logic for creating directories is sound. I've provided a couple of suggestions to improve maintainability and test clarity, ensuring test reliability by explicitly verifying directory creation as per repository rules.
Merging this branch will decrease overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files
|
Summary
data/directory but not the DB parent dir (db/) ormaps/. When the Pelican install script's directories didn't persist, the server crashed withunable to open database file: no such file or directory.Test plan
db/ormaps/directoriesgo test ./internal/server/