Skip to content

Conversation

@sanducb
Copy link
Contributor

@sanducb sanducb commented Sep 24, 2025

Changes proposed in this pull request

  • This PR fixes resolver filtering for outgoing_payment.funded and outgoing_payment.cancelled events

Context

Checklist

  • Related issues linked using fixes #number
  • Tests added/updated
  • Make sure that all checks pass
  • Bruno collection updated (if necessary)
  • Documentation issue created with user-docs label (if necessary)
  • OpenAPI specs updated (if necessary)

@sanducb sanducb requested a review from mkurapov September 24, 2025 09:33
@github-actions github-actions bot added type: tests Testing related pkg: backend Changes in the backend package. type: source Changes business logic labels Sep 24, 2025
Comment on lines 25 to 32
const noFilter =
!filter ||
(filter?.type?.in &&
Array.isArray(filter.type.in) &&
filter.type.in.length === 0)
const filterOrDefaults = noFilter
? { type: { notIn: DEFAULT_EXCLUDED_TYPES } }
: filter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think noFilter would be true if we pass in in: [] but notIn: ['something'] though, right? Meaning we would end up ignoring the notIn filter.

We can either

  • Remove the notIn filter from the schema (but still have it functional in the service method)
  • Do const filter = { type: { notIn: DEFAULT_EXCLUDED_TYPES, in: <parse the in array> } }

@github-actions
Copy link

github-actions bot commented Sep 24, 2025

🚀 Performance Test Results

Test Configuration:

  • VUs: 4
  • Duration: 1m0s

Test Metrics:

  • Requests/s: 47.21
  • Iterations/s: 15.74
  • Failed Requests: 0.00% (0 of 2840)
📜 Logs

> [email protected] run-tests:testenv /home/runner/work/rafiki/rafiki/test/performance
> ./scripts/run-tests.sh -e test "-k" "-q" "--vus" "4" "--duration" "1m"

Cloud Nine GraphQL API is up: http://localhost:3101/graphql
Cloud Nine Wallet Address is up: http://localhost:3100/
Happy Life Bank Address is up: http://localhost:4100/
cloud-nine-wallet-test-backend already set
cloud-nine-wallet-test-auth already set
happy-life-bank-test-backend already set
happy-life-bank-test-auth already set
     data_received..................: 1.0 MB 17 kB/s
     data_sent......................: 2.2 MB 36 kB/s
     http_req_blocked...............: avg=7.96µs   min=2.24µs   med=5.47µs   max=1.58ms   p(90)=6.63µs   p(95)=7.21µs  
     http_req_connecting............: avg=1.75µs   min=0s       med=0s       max=1.2ms    p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=84.13ms  min=9.34ms   med=69.23ms  max=568.8ms  p(90)=139.67ms p(95)=159.36ms
       { expected_response:true }...: avg=84.13ms  min=9.34ms   med=69.23ms  max=568.8ms  p(90)=139.67ms p(95)=159.36ms
     http_req_failed................: 0.00%  ✓ 0         ✗ 2840
     http_req_receiving.............: avg=78.31µs  min=27.25µs  med=70.4µs   max=2.28ms   p(90)=94.29µs  p(95)=107.72µs
     http_req_sending...............: avg=31.99µs  min=9.16µs   med=24.93µs  max=1.49ms   p(90)=34.4µs   p(95)=45µs    
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=84.02ms  min=9.19ms   med=69.13ms  max=568.74ms p(90)=139.56ms p(95)=159.29ms
     http_reqs......................: 2840   47.211688/s
     iteration_duration.............: avg=253.83ms min=167.17ms med=239.39ms max=1.03s    p(90)=308.46ms p(95)=338.69ms
     iterations.....................: 947    15.74277/s
     vus............................: 4      min=4       max=4 
     vus_max........................: 4      min=4       max=4 

@sanducb sanducb requested a review from mkurapov September 24, 2025 10:50
@sanducb sanducb merged commit 741461a into pos-card-services Sep 24, 2025
50 of 67 checks passed
@sanducb sanducb deleted the bs/webhook-filter-fix branch September 24, 2025 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: backend Changes in the backend package. type: source Changes business logic type: tests Testing related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants