-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(server): fake gcs server for local development #1372
Conversation
Caution Review failedThe pull request is closed. WalkthroughThe pull request introduces a new service named Changes
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
✅ Deploy Preview for reearth-web canceled.
|
3f66a22
to
aadec33
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
server/Makefile (1)
63-68
: Add help text for new GCS targets.The new targets should be documented in the help section for discoverability.
Add help text by applying this diff:
@echo " run-app Run the application" @echo " run-db Run the MongoDB database using Docker Compose" +@echo " up-gcs Start the GCS emulator for local development" +@echo " down-gcs Stop the GCS emulator" @echo " gql Generate GraphQL code include dataloader"Also update the .PHONY list:
-.PHONY: lint test failcheck e2e build dev-install dev run-app run-db gql mockuser schematyper +.PHONY: lint test failcheck e2e build dev-install dev run-app run-db up-gcs down-gcs gql mockuser schematyper
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
server/README.md
is excluded by!**/*.md
📒 Files selected for processing (3)
docker-compose.yml
(1 hunks)server/.env.example
(1 hunks)server/Makefile
(1 hunks)
🔇 Additional comments (1)
docker-compose.yml (1)
23-29
: Ensure tmp/gcs directory exists before starting the service.The service configuration looks good, but the mounted volume directory needs to exist before starting the service.
Add directory creation to the Makefile's up-gcs target to prevent startup issues:
up-gcs: + mkdir -p tmp/gcs docker compose -f ../docker-compose.yml up -d gcs
✅ Verification successful
Review comment is valid - directory creation is needed
The
tmp/gcs
directory is not created anywhere in the codebase, and the suggested Makefile change is necessary to prevent service startup issues.🏁 Scripts executed
The following scripts were executed for the analysis:
Error: No shell scripts found
Script:
#!/bin/bash # Find Makefile and show its contents fd Makefile --type f --exec cat {} # Look for any setup scripts that might handle directory creation fd -e sh -e bash --type f --exec grep -l "mkdir.*tmp/gcs" {} \; # Check if tmp/gcs directory is referenced anywhere else rg "tmp/gcs" -lLength of output: 2362
aadec33
to
da67633
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
server/Makefile (1)
22-23
: Enhance help text descriptions for GCS commands.While the help text is functional, consider making it more descriptive to better explain the purpose of the fake-gcs-server for local development.
- @echo " up-gcs Run the fake-gcs-server using Docker Compose" - @echo " down-gcs Stop the fake-gcs-server using Docker Compose" + @echo " up-gcs Start the GCS emulator for local development using Docker Compose" + @echo " down-gcs Stop the GCS emulator container"
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
server/README.md
is excluded by!**/*.md
📒 Files selected for processing (3)
docker-compose.yml
(1 hunks)server/.env.example
(1 hunks)server/Makefile
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- docker-compose.yml
- server/.env.example
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: ci-server / ci-server-lint
- GitHub Check: ci-server / ci-server-test
🔇 Additional comments (2)
server/Makefile (2)
78-78
: LGTM!The .PHONY declaration is correctly updated to include the new targets.
65-70
: Verify the GCS emulator setup works as expected.Please ensure that:
- The GCS emulator can be started successfully with
make up-gcs
- The service is accessible on port 4443 as configured in the Docker Compose file
- The emulator can be stopped cleanly with
make down-gcs
da67633
to
b22bcb6
Compare
server/.env.example
Outdated
REEARTH_GOOGLE_CLOUD_PROJECT= | ||
REEARTH_GCS_BUCKETNAME= | ||
REEARTH_GCS_PUBLICATIONCACHECONTROL= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure to edit envconfig from server/internal/app/config/config.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pyshx
thanks for comment.
I fixed.
REEARTH_GOOGLE_CLOUD_PROJECT
=> GOOGLE_CLOUD_PROJECT
Other is OK.
Overview
want to use gcs emulator on local
What I've done
What I haven't done
How I tested
Which point I want you to review particularly
Memo
Summary by CodeRabbit
New Features
Configuration Changes
REEARTH_
prefix in.env.example
.