-
Notifications
You must be signed in to change notification settings - Fork 6
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
Port from SQLite to Mongodb for cache layer #81
base: main
Are you sure you want to change the base?
Conversation
Just brings k8s install closer to the dev server one.
The other platforms don't have docker available.
SQLite is only used for local development.
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.
-
SUCCESS: I am able to run it locally with the changes exactly as I did before those changes, so the smooth out-of-the-box developer experience remains unchanged.
-
FAIL: The
make test
target no longer works correctly (onrh-mongodb
branch; it works fine onmain
) :
go test ./app/{billing,order,shipment}
ok github.com/temporalio/reference-app-orders-go/app/billing 0.742s
ok github.com/temporalio/reference-app-orders-go/app/order 0.764s
ok github.com/temporalio/reference-app-orders-go/app/shipment 1.032s
go test ./app/test
package github.com/temporalio/reference-app-orders-go/app/test: build constraints exclude all Go files in /Users/twheeler/temp/rob-mongodb-pr/reference-app-orders-go/app/test
make: *** [functional-test] Error 1
FWIW, the functional test worked fine when I ran it explicitly with go test ./app/test/order_test.go
.
-
SUCCESS: I successfully used MongoDB for the application cache when running locally. I prefixed the command used to start the Worker and API servers with
MONGO_URL=mongodb://127.0.0.1:27017
(the MongoDB service was already running). The application started up and worked as expected when I processed an order. I then usedmongosh
to verify that there was an orders database containing theorders
andshipments
tables. I checked their contents and they matched what was shown in the Web UI, further confirming that this database was in use. There was noapi-store.db
file present, as there had been when I ran it without setting theMONGO_URL
environment variable. -
FAIL?: I successfully deployed the application to a Kubernetes cluster and was able to process an order to completion. However, I got a shell on the MongoDB container, then launched
mongosh
, but did not find anorders
database. I could not get a shell on the OMS API container (it seems that neither Bash nor Bourne shell is installed!), so I could not confirm whether it was using SQLite. I don't see where theMONGO_URL
variable is set in the k8s configuration, but since the MongoDB container was running, I would have expected that would be the default for a Kubernetes deployment.
NOTE: The technical description and Kubernetes deployment documentation will both need to be updated to reflect this change. I can take care of that part.
@cretz I'd like to get your review on Rob's PR, particularly for the |
What was changed
Remove on-disk SQLite storage for API layer with MongoDB.
Why?
This is a more realistic deployment scenario.
Checklist
Closes
How was this tested:
Docs will need to be updated.