Repository navigation
Decouple builds and image generation from MongoDB startup - #249
Merged
Merged
Conversation
|
@barrulus is attempting to deploy a commit to the azgaar's projects Team on Vercel. A member of the Team first needs to authorize it. |
16 of 23 tasks
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.
Importing the image API currently connects to MongoDB before it can choose a database-independent path, and builds require Mongo credentials. Connect lazily using runtime configuration so a clean checkout builds and numeric/random or explicit-COA images render without MongoDB.
Concurrent claim requests share one connection attempt and reuse the successful client. Failed startup connections are closed and retryable; driver connection/server-selection and operation timeouts bound database work. Named image requests and claim mutations return safe, non-cacheable 503 JSON when configuration or MongoDB is unavailable, preserving ordinary generation only after a successful lookup finds no claim. Existing claim authorization and duplicate-key conflict behavior are preserved.
Document optional configuration and add actual image/mutation route regressions with a fake driver. Extend existing PR/push CI to run these regressions and a credential-free production build.
Validation:
.env, Mongo credentials or database stub.npm run check: 0 errors, existing 92 accessibility warnings.git diff --checkpass. No production claims or Discord messages were modified.Targets
sveltekit, which serves the Vercel application. After merging, verify the upstream deployment and public domain before explicitly closing #233 and updating #238; this is not the default branch.Closes #233.