Commit Graph

51 Commits

Author SHA1 Message Date
Janos Lenart 0d635b9a0e
cartservice: add libssl to allow connecting to external redis instances (#388)
This allows setting REDIS_ADDR to say a Google memorystore instance

Fixes #363
2020-08-26 10:59:02 -07:00
Daniel Sanche c4d86703c5
Add licenses (#367) 2020-07-15 11:56:37 -07:00
Daniel Sanche 173ac3f071
move cartservice tests (#322) 2020-04-14 10:31:36 -07:00
Megan O'Keefe 9133fdc043
EmptyCart bug fix (#289) 2020-02-06 15:36:26 -08:00
djmailhot 2177813c44 cartservice: Create genproto.sh (#249)
* Add src/cartservice/genproto.sh

* Add grpc generation to cartservice/genproto.sh

* Remove grpc from cartservice/genproto.sh due to errors
2019-09-29 15:40:48 +03:00
Megan O'Keefe 156dfcec8a
[cartservice] Increases health check timeout (#240)
* Increases cartservice health check rpc timeout

* remove stopwatch from health check

* cleanup

* Cleanup
2019-08-19 14:28:03 -04:00
Colin Nelson a79a443892 Ignore .vs (#86)
Fixes #83
2018-10-23 14:44:29 -07:00
Ahmet Alp Balkan 3b6d3864a0
grpc: bump health-probe to v0.2.0 (#71)
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-10-09 15:54:55 -07:00
Ahmet Alp Balkan 2771a03727
k8s: start using grpc health check for cartservice (#63) 2018-10-01 23:20:42 -07:00
sebright dc7effd601 adservice: find relevant ads by category (#61)
The ad service now returns ads matching the categories of the product that is
currently displayed.  Changes in this commit:

- List all products' categories in products.json.

- Pass the current product's categories from the frontend to the ad service when
  looking up ads.

- Store a statically initialized multimap from product category to ad in the ad
  service.

- Return all ads matching the given categories when handling an ads request.
  The ad service continues to return random ads when no categories are given or
  no ads match the categories.
2018-10-01 22:44:56 -07:00
Ahmet Alp Balkan be65dd1fcd
cartservice: fix health Check() method signature (#57)
- Use the method provided in HealthBase
- Use the same version of GrpcHealth as Grpc core.

Fixes #50.
2018-09-28 12:52:06 -07:00
Colin Nelson ab601665d1 Reduced cartservice Docker Image size (#46)
Reduces docker image size for cartservice from ~2.36 GB to ~157 MB
Fixes Issue #36 

![image-size](https://user-images.githubusercontent.com/7820716/45908973-37a31e00-bdb4-11e8-92d3-d84acfb1c10f.png)
2018-09-24 09:54:25 -07:00
Simon Zeltser 1f60819dee Introducing super basic health check for cart service (#44)
* Introducing super basic health check for cart service
  - Generated C# proto implementation for grpc health check
  - Moved all C# protos to a dedicated folder
  - Implemented basic health checking to ping CartStore (which is Redis in default implementation)
  - Base plumbing for health checks

* Introducing super basic health check for cart service

- Generated C# proto implementation for grpc health check
- Moved all C# protos to a dedicated folder
- Implemented basic health checking to ping CartStore (which is Redis in default implementation)
- Base plumbing for health checks

* Changing Ping health probe to call Redis Cache Ping method
2018-09-21 12:09:52 -07:00
Ahmet Alp Balkan 427f13fcd3
go: use dep in builds, remove relative imports
Fixes #11.
Fixes #12.
Fixes #13.

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-08-04 11:21:03 -07:00
Ahmet Alp Balkan 3493cc1cb4
Add more license headers
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-07-25 21:25:27 -07:00
Ahmet Alp Balkan d0128060e4
Add LICENSE headers to source files
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-07-25 09:54:28 -07:00
michaelawyu 05381b3626 Add emailservice
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-07-24 21:08:29 -07:00
Ahmet Alp Balkan 61cf05844d fix go builds after deleting pkg internal
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-07-10 20:11:30 -07:00
JBD 4a82b21b5e add OpenCensus Go support for HTTP and gRPC 2018-07-10 17:36:55 -07:00
Simon Zeltser 7101b6b4fe Changing the order of redis and cart service starting
This should help monitoring probe for cart service to succeed at first run
2018-07-09 21:02:27 -07:00
Ahmet Alp Balkan 0be5e7b1e2 cartservice: rm initContainer, fix probe query ip
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-07-09 12:56:54 -07:00
Ahmet Alp Balkan 0c1068aec6 cartservice: add an exec probe written in Go
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-07-07 16:56:52 -07:00
Simon Zeltser d457f7ec28 Making cartservice more reliable
1. Making sure we re-create redis connection upon disconnect
2. Fixed local cart store implementation to handle updates (useful for testing w/o redis)
3. Fixed windows scripts to work against redis correctly
2018-07-02 13:26:37 -07:00
Simon Zeltser 989fad7f76 Merge remote-tracking branch 'origin' into createCartService 2018-06-29 11:41:08 -07:00
Simon Zeltser 17ffcb9a6e Merge conflict fix for redis cache exception handling 2018-06-29 11:16:10 -07:00
Ahmet Alp Balkan 84ff69147e frontend: use pkg/errors, show full stacktrace
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-06-29 11:08:11 -07:00
Ahmet Alp Balkan 307404714b cartservice: add try catch to GetCartAsync
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-06-29 11:08:10 -07:00
Ahmet Alp Balkan 977c2e5ffd cartservice: dockerfile optimizations
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-06-29 11:08:10 -07:00
Simon Zeltser f2ee88a9a2 Changed redis connection opening to be synchronous call
Also added exception handling for GetCartAsync
2018-06-29 11:08:10 -07:00
Simon Zeltser 4ac66b072a Refactored the cart service to add more telemetry
1. Added more telemetry around starting redis cache
2. Now if you don't specify redis cache address via command line
or environment variable, it will run with local cart (no redis).
This is useful for debugging purposes
2018-06-29 11:08:10 -07:00
Ahmet Alp Balkan 878be040e4 cartservice: add net-tools to build
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-06-29 11:08:09 -07:00
Ahmet Alp Balkan 6c8162eb3d k8s: fix emailservice port mapping
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-06-29 11:08:09 -07:00
Simon Zeltser edf1553be9 Renaming cart service env vars
Renaming Cart service environment variables:
CART_SERVICE_ADDR => LISTEN_ADDR
CART_SERVICE_PORT => PORT
2018-06-29 11:08:08 -07:00
Simon Zeltser 546562fe53 Fixing AddItem and adding more tests/cartservice/CartServiceTests
Updated AddItem functionality so it handles update quantities scenario.
Added tests
2018-06-29 11:08:06 -07:00
Ahmet Alp Balkan ca3ace3f65 frontend: use pkg/errors, show full stacktrace
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-06-28 22:03:39 -07:00
Ahmet Alp Balkan f8ddac9c52 cartservice: add try catch to GetCartAsync
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-06-28 21:46:48 -07:00
Ahmet Alp Balkan 386f497553 cartservice: dockerfile optimizations
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-06-28 21:45:57 -07:00
Simon Zeltser c84c5b028b Changed redis connection opening to be synchronous call
Also added exception handling for GetCartAsync
2018-06-28 18:40:22 -07:00
Simon Zeltser ca6e6647ef Refactored the cart service to add more telemetry
1. Added more telemetry around starting redis cache
2. Now if you don't specify redis cache address via command line
or environment variable, it will run with local cart (no redis).
This is useful for debugging purposes
2018-06-28 17:12:33 -07:00
Ahmet Alp Balkan c9f2c89b9c cartservice: add net-tools to build
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-06-28 11:42:12 -07:00
Ahmet Alp Balkan 39fd019343 k8s: fix emailservice port mapping
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
2018-06-28 01:05:12 -07:00
Simon Zeltser f06bc11dd4 Renaming cart service env vars
Renaming Cart service environment variables:
CART_SERVICE_ADDR => LISTEN_ADDR
CART_SERVICE_PORT => PORT
2018-06-27 22:28:04 -07:00
Simon Zeltser 22762b28bd Fixing AddItem and adding more tests/cartservice/CartServiceTests
Updated AddItem functionality so it handles update quantities scenario.
Added tests
2018-06-27 10:33:18 -07:00
Simon Zeltser 2041bdcb48 Fixing GetCart for non-existing user
Now GetCart returns an empty cart for non-existing user
(user that haven't added anything to the cart before)
Added test to cover that

Also enhanced windows script for running cart service locally.
Now we have two options:
 - Running the service and redis locally (assuming redis emulator is installed)
   This is good for easier local debugging and troubleshooting

   docker_setup local

 - Running the service and redis in two separate docker containers
   This is good for better simulation of what will happen in the cloud
2018-06-26 14:41:00 -07:00
Simon Zeltser c3c76effea Fixing cache implementation 2018-06-25 09:44:56 -07:00
Simon Zeltser 3262ff82b0 Updating docker file to not include ports. Added scripts folder and script to run docker with env vars passed via command line. Also now the build and packaging is happening in container 2018-06-22 17:17:34 -07:00
Simon Zeltser 5d44d019b3 Fixing docker issues. Now the server can run in linux docker container but doesn't work with real redis yet 2018-06-21 14:53:07 -07:00
Simon Zeltser d7d9165da6 added gitignore file for .net proj 2018-06-21 11:19:48 -07:00
Simon Zeltser 0ce195bb80 command line arguments handling 2018-06-21 11:10:13 -07:00
Simon Zeltser 8860d8bfdd added redis integration and command line arguments handling to cart service. Didn't test in the cloud yet 2018-06-21 11:09:12 -07:00