Skip to content

CLDSRV-1066: ListNotificationDestinations API - #6367

Open
anurag4DSB wants to merge 2 commits into
improvement/CLDSRV-1065-destination-getfrom
improvement/CLDSRV-1066-destination-list
Open

anurag4DSB wants to merge 2 commits into
improvement/CLDSRV-1065-destination-getfrom
improvement/CLDSRV-1066-destination-list

Conversation

@anurag4DSB

@anurag4DSB anurag4DSB commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Spec: https://claude.ai/artifact/QhKsCqtGNzaVice35nvip9#bcc30d01-27db.m1yth80jczv.20396

Intent: why does this change exist?

  • An account needs to find all its destinations, page by page.

System impact: what's affected, including downstream?

  • List reads the record store with the requester's account as the key prefix.

Preserved behavior: what explicitly stays the same?

  • A List never shows the destinations of another account.

Intended change: what's different after this PR?

  • List answers pages of 100 by default, with max-items up to the listing limit and NextMarker.
  • Each entry is the element that Get answers.

Verification: how do we know this worked, or how would we know if it didn't?

  • Unit tests run the handler and its paging on mem.
  • Functional route tests in s3c-ft-tests and file-ft-tests compare List entries with Get.

https://claude.ai/code/session_01LSEjuApZSsJxDp6dw1FhVa

@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1065-destination-get branch from 1548713 to bdd3517 Compare November 10, 2026 13:56
@codecov

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.28%. Comparing base (b78b066) to head (19b6121).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
lib/api/api.js 93.85% <100.00%> (+0.01%) ⬆️
lib/api/notificationDestinationList.js 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@@                             Coverage Diff                             @@
##           improvement/CLDSRV-1065-destination-get    #6367      +/-   ##
===========================================================================
+ Coverage                                    88.19%   88.28%   +0.08%     
===========================================================================
  Files                                          214      215       +1     
  Lines                                        14638    14689      +51     
===========================================================================
+ Hits                                         12910    12968      +58     
+ Misses                                        1728     1721       -7     
Flag Coverage Δ
checksums-disabled-tests 35.18% <21.56%> (-0.05%) ⬇️
file-ft-tests 71.65% <80.39%> (+0.15%) ⬆️
file-ft-tests-null-compat 72.11% <80.39%> (+0.14%) ⬆️
kmip-ft-tests 28.00% <21.56%> (-0.03%) ⬇️
mongo-v0-ft-tests 70.80% <21.56%> (-0.18%) ⬇️
mongo-v1-ft-tests 70.78% <21.56%> (-0.20%) ⬇️
multiple-backend 35.91% <21.56%> (-0.05%) ⬇️
s3c-ft-tests-v0 66.90% <80.39%> (+0.12%) ⬆️
s3c-ft-tests-v0-null-compat 66.97% <80.39%> (+0.13%) ⬆️
s3c-ft-tests-v1 66.88% <80.39%> (+0.12%) ⬆️
sur-tests 36.45% <21.56%> (-0.06%) ⬇️
sur-tests-inflights 39.24% <21.56%> (-0.09%) ⬇️
unit 76.27% <100.00%> (+0.08%) ⬆️
utapi-v2-tests 35.14% <21.56%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1066-destination-list branch from 1be2c07 to f7de0cf Compare November 10, 2026 13:57
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1065-destination-get branch from bdd3517 to 16111a8 Compare November 10, 2026 15:06
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1066-destination-list branch 2 times, most recently from 1251db1 to db126da Compare November 10, 2026 15:24
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1065-destination-get branch from fd93c65 to 8503531 Compare November 12, 2026 09:52
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1066-destination-list branch from db126da to 7d0c72c Compare November 12, 2026 09:52
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1065-destination-get branch from 8503531 to 8f59a89 Compare November 12, 2026 09:53
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1066-destination-list branch from 7d0c72c to 052353d Compare November 12, 2026 09:53
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1065-destination-get branch from 8f59a89 to be8e241 Compare November 12, 2026 12:21
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1066-destination-list branch from 052353d to 59ea255 Compare November 12, 2026 12:21
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1065-destination-get branch from be8e241 to 713425b Compare November 12, 2026 13:06
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1066-destination-list branch from 59ea255 to 15c33ed Compare November 12, 2026 13:06
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1065-destination-get branch from 713425b to a7b2f42 Compare November 12, 2026 14:40
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1066-destination-list branch from 15c33ed to 9839ab7 Compare November 12, 2026 14:40
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1065-destination-get branch from a7b2f42 to b604e88 Compare November 12, 2026 15:03
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1066-destination-list branch from 9839ab7 to 1aa7df3 Compare November 12, 2026 15:03
@anurag4DSB
anurag4DSB marked this pull request as ready for review November 12, 2026 15:19
@anurag4DSB
anurag4DSB requested review from a team, nicolas2bert and tmacro November 12, 2026 15:19
Add unit tests for the List handler on the in-memory backend, with
records that Create stores. They check:

- an empty account
- name order, with each entry as Get answers it
- an IAM user
- another account, never listed
- three names in two pages, through NextMarker then marker
- the 100 default
- each bad max-items (0, above the listing limit, abc, 2.5, empty, +5,
  repeated) and a repeated marker, with no listing
- NextMarker escaped
- store and record errors
- no name, marker or record value in the logs

Add functional tests through Create and Get. They check:

- the same paging, under a prefix of their own
- entries equal to Get's
- an empty page after the last name
- a second account's names, never shown
- bad max-items 400
- anonymous 403
- an IAM user allowed on the account wildcard lists, while one allowed
  on a single destination gets 403

Each IAM test makes its own IAM users and destination, and removes the
users when it ends.
notificationDestinationList:

- reads max-items and an optional marker. When max-items is absent,
  the page size is 100. Else max-items must be digits only, from 1 to
  the listing limit of constants.js, listingHardLimit (1000).
- lists the records of the requester's account from the record store
- answers ListNotificationDestinationsResult: IsTruncated, NextMarker
  only when truncated, then one NotificationDestination per record.
  Each NotificationDestination is the element that Get answers.
- answers InvalidArgument to a bad max-items or a repeated marker,
  before any listing
- answers InternalError to a record that cannot be rendered

The logs hold the account and the counts only. The handler reports its
call to the Prometheus metrics, as the bucket APIs do.
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1065-destination-get branch from b604e88 to b78b066 Compare November 12, 2026 15:57
@anurag4DSB
anurag4DSB force-pushed the improvement/CLDSRV-1066-destination-list branch from 1aa7df3 to 19b6121 Compare November 12, 2026 15:58

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant