You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(notifications): address review feedback and lint
Address all review comments from PR #2528, add missing test coverage, and fix
lint/formatting issues:
- SDK integration: use SDK CleanProject (CleanAllNotificationSubscriptionsRequest)
for test cleanup instead of manual deletion
- Add E2E test documenting push behavior with unsupported custom filter
(API returns HTTP 400 and local files remain unchanged)
- Address review comments: field naming, error handling, code structure
- Fix push operation: add persist support, fix stale key removal, preserve folder paths
- Fix DeleteObject: clean up manifest entry and clear remote state on delete
- Fix manifest: move Notifications field after Rows in ConfigManifestWithRows
- Fix E2E tests: correct test expectations for push/pull/filter scenarios
- Fix encrypt E2E test manifest: correct naming fields
- Lint: gofumpt, go mod tidy, golangci-lint, import ordering
// IDs in manifest.json are updated for new notifications via manifest.Save()
351
351
```
352
352
353
-
### Auto-Filter Behavior
354
-
355
-
Users write only `event` + `recipient` (and optionally custom `filters`) in `config.json`. During push, three standard filters are **auto-populated** by `createNotificationRequest()`:
356
-
357
-
-`branch.id` — from the notification's `BranchID`
358
-
-`job.component.id` — from the notification's `ComponentID`
359
-
-`job.configuration.id` — from the notification's `ConfigID`
360
-
361
-
These filters are required by the API to scope the notification to a specific config. They are appended before any user-defined filters.
362
-
363
-
The API returns all filters (auto + user) in the response, so after a `pull`, `config.json` contains all three auto-filters plus any user-defined ones.
364
-
365
-
**Consequence:** On a repeated `push` without `pull`:
366
-
- Local `config.json` has no auto-filters (they were never written locally)
367
-
- Remote notification has all three auto-filters
368
-
- Diff engine shows `changed: filters`
369
-
- This is **expected behavior**, not a bug
370
-
371
-
### Delete-Then-Create for Updates
372
-
373
-
The notifications API has no update endpoint. Changes are implemented as:
374
-
1. Delete the old notification subscription
375
-
2. Create a new one with the changed values
376
-
377
-
This is implemented via `WithOnSuccess` callback chaining in `UnitOfWork.SaveObject`:
0 commit comments