backend issueshttps://gitlab.cern.ch/push-notifications/backend/-/issues2022-06-22T16:11:54+02:00https://gitlab.cern.ch/push-notifications/backend/-/issues/178[DELETE methods] User settings controller2022-06-22T16:11:54+02:00Jose Semedo[DELETE methods] User settings controllerRework User settings controller DELETE methods:
- [ ] Add `OnUndefined` annotation
- [ ] Use `await` instead of `return`
- [ ] Change service implementation to not return anythingRework User settings controller DELETE methods:
- [ ] Add `OnUndefined` annotation
- [ ] Use `await` instead of `return`
- [ ] Change service implementation to not return anythinghttps://gitlab.cern.ch/push-notifications/backend/-/issues/176[DELETE methods] Preferences controller2022-06-22T16:10:31+02:00Jose Semedo[DELETE methods] Preferences controllerRework Preferences controller DELETE methods:
- [ ] Add `OnUndefined` annotation
- [ ] Use `await` instead of `return`
- [ ] Change service implementation to not return anythingRework Preferences controller DELETE methods:
- [ ] Add `OnUndefined` annotation
- [ ] Use `await` instead of `return`
- [ ] Change service implementation to not return anythinghttps://gitlab.cern.ch/push-notifications/backend/-/issues/175[DELETE methods] Mutes controller2022-06-22T16:07:43+02:00Jose Semedo[DELETE methods] Mutes controllerRework Mutes controller DELETE methods:
- [ ] Add `OnUndefined` annotation
- [ ] Use `await` instead of `return`
- [ ] Change service implementation to not return anythingRework Mutes controller DELETE methods:
- [ ] Add `OnUndefined` annotation
- [ ] Use `await` instead of `return`
- [ ] Change service implementation to not return anythinghttps://gitlab.cern.ch/push-notifications/backend/-/issues/174[DELETE methods] Apple controller2022-06-22T16:06:08+02:00Jose Semedo[DELETE methods] Apple controllerRework Apple controller DELETE methods:
- [ ] Add `OnUndefined` annotation
- [ ] Use `await` instead of `return`
- [ ] Change service implementation to not return anythingRework Apple controller DELETE methods:
- [ ] Add `OnUndefined` annotation
- [ ] Use `await` instead of `return`
- [ ] Change service implementation to not return anythinghttps://gitlab.cern.ch/push-notifications/backend/-/issues/173[Swagger] Add annotations to User settings controller2022-06-22T15:41:30+02:00Jose Semedo[Swagger] Add annotations to User settings controllerRework user settings controller:
- [ ] Annotate endpoints
- [ ] Create appropriate DTOs
- [ ] Annotate DTOs
- [ ] Adapt service implementations and controller endpoints to DTOsRework user settings controller:
- [ ] Annotate endpoints
- [ ] Create appropriate DTOs
- [ ] Annotate DTOs
- [ ] Adapt service implementations and controller endpoints to DTOshttps://gitlab.cern.ch/push-notifications/backend/-/issues/172[Swagger] Add annotations to Service Status controller2022-06-22T15:41:16+02:00Jose Semedo[Swagger] Add annotations to Service Status controllerRework service status controller:
- [ ] Annotate endpoints
- [ ] Create appropriate DTOs
- [ ] Annotate DTOs
- [ ] Adapt service implementations and controller endpoints to DTOsRework service status controller:
- [ ] Annotate endpoints
- [ ] Create appropriate DTOs
- [ ] Annotate DTOs
- [ ] Adapt service implementations and controller endpoints to DTOshttps://gitlab.cern.ch/push-notifications/backend/-/issues/171[Swagger] Add annotations to Apple controller2022-06-22T15:35:52+02:00Jose Semedo[Swagger] Add annotations to Apple controllerRework apple controller:
- [ ] Annotate endpoints
- [ ] Create appropriate DTOs
- [ ] Annotate DTOs
- [ ] Adapt service implementations and controller endpoints to DTOsRework apple controller:
- [ ] Annotate endpoints
- [ ] Create appropriate DTOs
- [ ] Annotate DTOs
- [ ] Adapt service implementations and controller endpoints to DTOshttps://gitlab.cern.ch/push-notifications/backend/-/issues/167[Swagger] Fix Swagger UI responses (unneeded 200)2022-06-22T10:01:42+02:00Jose Semedo[Swagger] Fix Swagger UI responses (unneeded 200)On `DELETE` methods such as `removeMemberFromChannel` on the channel controller, the corresponding swagger UI responses show up like this:
![image](/uploads/c27b539636b4b103464687432699704e/image.png)
However, methods such as this one ...On `DELETE` methods such as `removeMemberFromChannel` on the channel controller, the corresponding swagger UI responses show up like this:
![image](/uploads/c27b539636b4b103464687432699704e/image.png)
However, methods such as this one do not return a 200, but a 204.
Even when annotated to reflect that:
![image](/uploads/a82e4b99962a07efdc2ec16c90ac6987/image.png)
Notice the absence of a `@ResponseSchema` annotation, which is usually used to annotate the successful response 200.https://gitlab.cern.ch/push-notifications/backend/-/issues/166Disable/fix console time logs and errors on prod2022-05-31T14:00:22+02:00Jose SemedoDisable/fix console time logs and errors on prod### Problem
Sentry has been logging many errors due to `console.time` call label collisions or mismatches: https://push-notifications-sentry.web.cern.ch/sentry/backend/issues/1067/?referrer=alert_email
This is could be due to some serv...### Problem
Sentry has been logging many errors due to `console.time` call label collisions or mismatches: https://push-notifications-sentry.web.cern.ch/sentry/backend/issues/1067/?referrer=alert_email
This is could be due to some service implementations (like get all channels), which have `console.time` calls for performance monitoring, and if two instances are fired concurrently, then two labels overlap, or one might try to close a time logging that was already closed (supposition).
### Example:
Instances of `find-all-channels`\
A: starts\
B: starts\
A: `console.time('get-all-channels:total:' + this.authorizationBag.userName)`\
running console time process with label `get-all-channels:total:username`\
B: `console.time('get-all-channels:total:' + this.authorizationBag.userName)`\
tries to run new console time process with label `get-all-channels:total:username` which already exists\
ERROR\
\
Similar for `console.timeEnd`.\
### Proposed solution 1:
Wrap `console.time` and `console.timeEnd` in a function which is called instead. This function shall check `process.env` and skip the timing if in prod.
### Proposed solution 2:
With the help of a randomly generated number/alphanumeric (could be v4 from 'uuid' or a subset of it), create a tag for the running instance, and incorporate it in the label, effectively each label close to unique for whichever call.\
`const timeLabel: string = 'get-all-channels:' + v4().substring(0, 4) + this.authorizationBag.userName;`\
Then change calls to be of the format\
`console.time(timeLabel + <action>);`https://gitlab.cern.ch/push-notifications/backend/-/issues/163Get externalMail field from Authz API for activeUser=false2024-03-25T00:05:04+01:00Emmanuel OrmanceyGet externalMail field from Authz API for activeUser=falseFor ex-CERN people ```externalEmail``` value should be used or we'll get a login@cern.ch invalid address
TBD
Also check returned entries for getByEmail as we take the first when it might not be the best choice, example:
```
"data": [...For ex-CERN people ```externalEmail``` value should be used or we'll get a login@cern.ch invalid address
TBD
Also check returned entries for getByEmail as we take the first when it might not be the best choice, example:
```
"data": [
{
"primaryAccountEmail": "emmanuel.ormancey@cern.ch",
"upn": "ormancey2",
"id": "xxx"
},
{
"primaryAccountEmail": "emmanuel.ormancey@cern.ch",
"upn": "ormancey1",
"id": "xxx"
},
{
"primaryAccountEmail": "emmanuel.ormancey@cern.ch",
"upn": "ormancey",
"id": "xxx",
"activeUser": true
}
]
```Current sprint: Week 34 + 35Emmanuel OrmanceyEmmanuel Ormanceyhttps://gitlab.cern.ch/push-notifications/backend/-/issues/160[HOTFIX] Pagination issue on channel list and notifications list2022-04-28T17:03:18+02:00Emmanuel Ormancey[HOTFIX] Pagination issue on channel list and notifications listNext sprintEmmanuel OrmanceyEmmanuel Ormanceyhttps://gitlab.cern.ch/push-notifications/backend/-/issues/156Handle unconfirmed entities2024-03-25T00:05:04+01:00Carina AntunesHandle unconfirmed entitiesInvestigate if we're already handling unconfirmed entities properly.
Check the fix needed for routing for more details - https://gitlab.cern.ch/push-notifications/notifications-routing/-/merge_requests/103Investigate if we're already handling unconfirmed entities properly.
Check the fix needed for routing for more details - https://gitlab.cern.ch/push-notifications/notifications-routing/-/merge_requests/103Current sprint: Week 34 + 35https://gitlab.cern.ch/push-notifications/backend/-/issues/153Return also children categories from a category selected from filter2022-04-19T10:34:12+02:00Caetan Tojeiro CarpenteReturn also children categories from a category selected from filterThe current implementation for categories just returns the category desired and not the children (tree agnostic), so when filtering channels from categories, it only return the channels that have this specific category selected and not t...The current implementation for categories just returns the category desired and not the children (tree agnostic), so when filtering channels from categories, it only return the channels that have this specific category selected and not the channels which have the children categories of this parent category selectedhttps://gitlab.cern.ch/push-notifications/backend/-/issues/146Access to public notifications throws unauthorized2022-06-30T14:46:24+02:00Carina AntunesAccess to public notifications throws unauthorizedBacklogEmmanuel OrmanceyEmmanuel Ormanceyhttps://gitlab.cern.ch/push-notifications/backend/-/issues/142Follow-up from "[#120] Mandatory Channels (and critical)"2022-08-15T11:41:02+02:00Carina AntunesFollow-up from "[#120] Mandatory Channels (and critical)"The following discussion from !147 should be addressed:
- [ ] @crdeoliv started a [discussion](https://gitlab.cern.ch/push-notifications/backend/-/merge_requests/147#note_5358676):
> Do you know if this has implications in sql que...The following discussion from !147 should be addressed:
- [ ] @crdeoliv started a [discussion](https://gitlab.cern.ch/push-notifications/backend/-/merge_requests/147#note_5358676):
> Do you know if this has implications in sql queries? Ie, if we wanted to create a new tab `Mandatory Channels` performance wise will it be the same querying in sql a bool or a string in array and what will it look like with querybuilder?BacklogEmmanuel OrmanceyEmmanuel Ormanceyhttps://gitlab.cern.ch/push-notifications/backend/-/issues/140Follow up [#127] : stats page improvements2022-06-30T14:41:32+02:00Carina AntunesFollow up [#127] : stats page improvements* Don't call notifications api - stats endpoint must return everything we need prepared.
* Merge stats endpoint you created with src/models/statistics.ts (from emmanuel)* Don't call notifications api - stats endpoint must return everything we need prepared.
* Merge stats endpoint you created with src/models/statistics.ts (from emmanuel)BacklogCaetan Tojeiro CarpenteCaetan Tojeiro Carpentehttps://gitlab.cern.ch/push-notifications/backend/-/issues/139Etcd / Notification Archival2022-08-15T11:41:08+02:00Carina AntunesEtcd / Notification ArchivalEvaluate interdependencies between our service and the archival, eg usecases:
* Channel is deleted -> (channel is soft deleted but notifications are hard or soft deleted or remain in created status?)
* Etcd data remains forever ? (nee...Evaluate interdependencies between our service and the archival, eg usecases:
* Channel is deleted -> (channel is soft deleted but notifications are hard or soft deleted or remain in created status?)
* Etcd data remains forever ? (need prepare job to cleanup after 13 months)
* Archive data remains forever ?
* Archival hard deletes notifications, etcd data remain - do we need to worry with id reuse?BacklogEmmanuel OrmanceyEmmanuel Ormanceyhttps://gitlab.cern.ch/push-notifications/backend/-/issues/137Investigate grappa cache performance and limitations2024-03-25T00:05:04+01:00Carina AntunesInvestigate grappa cache performance and limitationsValidate memory limits to cache a lot of groups (eg 1k) or need to move cache to redis
- evaluate need to pre-prepare the cache: currently lasts ~5m. Evaluate webhooks again to de:tect changes, eg all channel groups in db
- we had to bum...Validate memory limits to cache a lot of groups (eg 1k) or need to move cache to redis
- evaluate need to pre-prepare the cache: currently lasts ~5m. Evaluate webhooks again to de:tect changes, eg all channel groups in db
- we had to bump container limit to 4GB just for one 100 groups in cache.
- if redis memory cache limit is reached keys are just circled, but in memory pod is killed
Prepare a codimd with the conclusions and suggestionsCurrent sprint: Week 34 + 35https://gitlab.cern.ch/push-notifications/backend/-/issues/135Evaluate need for db indexes2024-03-25T00:05:04+01:00Carina AntunesEvaluate need for db indexes- [ ] Compile list of missing db indexes in specific queries, unique and compound indexes
Suggestions:
- Notifications Model:
- [ ] targetId (since we get all by targetId..): validate postgresql already treats foreign keys are alread...- [ ] Compile list of missing db indexes in specific queries, unique and compound indexes
Suggestions:
- Notifications Model:
- [ ] targetId (since we get all by targetId..): validate postgresql already treats foreign keys are already indexes
- UserFeedNotification:
- [ ] userId, (userID, frequencyType)Current sprint: Week 34 + 35https://gitlab.cern.ch/push-notifications/backend/-/issues/133Setup a rate limit2022-03-22T10:16:28+01:00Carina AntunesSetup a rate limitImplement rate limit mechanism:
- limit should be configurable and allow whitelist channels/ or make it configurable per channelImplement rate limit mechanism:
- limit should be configurable and allow whitelist channels/ or make it configurable per channelNext sprint