Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update on "[Events] Add project notification settings"
[Events] Add project notification settings ghstack-source-id: 2b4044a63b5cc394bfe66af8706764450703d904 Pull Request resolved: #18 This PR adds a new model for project notifications. The semantics of the model is explained in `notifications.proto`. 1. Adds a the model to the db model in metadata_svc and exposed it in the project store. 2. Expose setters/getters to notification settings in metadata svc. 3. Expose APIs to manipulate the notification settings. I opted into having a single endpoint for updating the notification setting json for convenience. Later, we can also add this to the CLI. Test plan: ``` ~/repos/cronback/cronback ❯❯❯ cargo cli --localhost --secret-token adminkey admin projects create ✘ 130 Project 'prj_026601H699SE7VY0YEFHRXXE75117B' was created successfully. ~/repos/cronback/cronback ❯❯❯ http -b --auth adminkey --auth-type bearer POST http://localhost:8888/v1/admin/projects/prj_026601H699SE7VY0YEFHRXXE75117B/notification_settings examples/notifications.json ~/repos/cronback/cronback ❯❯❯ http -b --auth adminkey --auth-type bearer GET http://localhost:8888/v1/admin/projects/prj_026601H699SE7VY0YEFHRXXE75117B/notification_settings { "channels": { "email": { "address": "testgmail.com", "type": "email", "verified": false } }, "subscriptions": [ { "channel_names": [ "email" ], "event": { "type": "on_run_failure" } } ] } ``` [ghstack-poisoned]
- Loading branch information