Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(restapi init): wrong install of filter rest api #2133

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

NagyZoltanPeter
Copy link
Contributor

Description

Filter rest api installation was rely on wrong configuration argument. --filter was checked (which is intended to filter service) instead of --filternode (that one is for filter client support).

Changes

  • Correct configuration argument check
  • added additional check whether filter client protocols are properly mounted.
  • As realized that lightpush rest api also lacks this check I added it here.

How to test

  1. run: wakunode2 --relay --filter --lightpush --rest=true --rest-port=11111
    a. should not crash, but start properly
  2. run: curl -i -X GET "http://127.0.0.1:11111/filter/v2/subscriptions/111" -H "accept: application/json"
    a. should return Http404
  3. run: wakunode2 --relay --filternode= --rest=true --rest-port=11112
  4. run: curl -i -X GET "http://127.0.0.1:11112/filter/v2/subscriptions/111" -H "accept: application/json"
    a. must return Some meaing full json response with or without error code.

Issue

bug: SIGSEGV when Filter and REST are configured

…r client mode and filter client protocol is mounted correctly
@github-actions
Copy link

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2133

Built from 2495e56

Copy link
Contributor

@gabrielmer gabrielmer left a comment

Choose a reason for hiding this comment

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

LGTM, thanks so much!

@NagyZoltanPeter NagyZoltanPeter merged commit 5277d12 into master Oct 18, 2023
9 of 10 checks passed
@NagyZoltanPeter NagyZoltanPeter deleted the fix-filter-rest-segfault branch October 18, 2023 09:47
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.

3 participants