Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def __init__(self):
self.grouper_messages_timeout_sec = int(os.getenv("GROUPER_MESSAGES_TIMEOUT_SECS", "10"))

# Manager
self.maximum_page_size = int(os.getenv("MAXIMUM_PAGE_SIZE", "100"))
self.maximum_page_size = int(os.getenv("MAXIMUM_PAGE_SIZE", "0"))

# Reporters
self.allowed_reporters = os.getenv("ALLOWED_REPORTERS", "puptoo,rhsm-system-profile-bridge").split(",")
Expand Down
2 changes: 1 addition & 1 deletion conf/manager.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
DISABLE_RBAC=FALSE
GRANULAR_RBAC=FALSE
MAX_REQUEST_SIZE_MB=2
MAXIMUM_PAGE_SIZE=1000
MAXIMUM_PAGE_SIZE=0
API_MAX_RPS=100
KESSEL_URL=host.containers.internal:9091
KESSEL_AUTH_ENABLED=TRUE
Expand Down
1 change: 1 addition & 0 deletions deploy/clowdapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,7 @@ parameters:
- name: UNLEASH_BOOTSTRAP_FILE
value: ''
- name: MAXIMUM_PAGE_SIZE
description: Maximum number of items in a response, if set to 0 it's not limited
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we set the code-default to the 0 so the on prem deployments wouldn't require additional configuration? Thoughts?

Copy link
Collaborator

Choose a reason for hiding this comment

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

self.maximum_page_size = int(os.getenv("MAXIMUM_PAGE_SIZE", "0"))

Copy link
Member Author

Choose a reason for hiding this comment

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

ok

value: "100"
- name: GUNICORN_WORKERS_MANAGER
value: "4"
Expand Down
2 changes: 1 addition & 1 deletion manager/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def _parse_list_arguments(cls, kwargs):

data_format = cls._get_data_format(kwargs)

if limit > CFG.maximum_page_size and not UI_REFERER.search(context.request.headers.get("referer", "")):
if CFG.maximum_page_size > 0 and limit > CFG.maximum_page_size and not UI_REFERER.search(context.request.headers.get("referer", "")):
raise InvalidArgumentException(f"Page limit of size: {limit} is too high, maximum is {CFG.maximum_page_size}")

return {
Expand Down