-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 offset parameter for experimental API calls #3159
Closed
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f14e663
Fix offset parameter in API call 'experimental/ciscat/results
c92fab9
Fix offset parameter for 'experimental/syscollector' API calls.
7c6d642
Merge branch '3.10' into fix-ciscat-pagination
3288ad6
Fix for experimental/packages call.
07c3d0e
Merge branch '3.10' into fix-ciscat-pagination
1df9db0
Fix offset parameter in distributed api calls.
ae1122e
Fix limit parameter in distributed api calls.
939481f
Fix limit parameter in distributed api calls.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't agree with this solution. I'm not sure it solves the problem. Actually I think it breaks the offset for the rest of endpoints.
We cannot risk the correctness of common endpoints just to fix the experimental ones. We should think another approach and then come back with a better solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forward_request
method is called only ondistributed_master
requests.We have the following endpoints of
distributed_master
type:GET /cluster/:node_id/logs
GET /rootcheck/:agent_id/cis
GET /rootcheck/:agent_id
GET /rootcheck/:agent_id/pci
GET /sca/:agent_id/checks/:id
GET /sca/:agent_id
GET /syscollector/:agent_id/packages
GET /syscollector/:agent_id/processes
GET /syscollector/:agent_id/ports
GET /syscollector/:agent_id/netaddr
GET /syscollector/:agent_id/netiface
GET /syscollector/:agent_id/netproto
GET /ciscat/:agent_id/results
GET /experimental/syscollector/os
GET /experimental/syscollector/hardware
GET /experimental/syscollector/packages
GET /experimental/syscollector/processes
GET /experimental/syscollector/ports
GET /experimental/syscollector/netaddr
GET /experimental/syscollector/netproto
GET /experimental/syscollector/netiface
GET /experimental/ciscat/results
Only
experimentals
calls merge results, so I think I should move the changes inside this conditional in order to avoid secondary effects and fix pagination inexperimental
endpoints:wazuh/framework/wazuh/cluster/dapi/dapi.py
Line 229 in 939481f
Thoughts?