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

Added missing pagination properties #2404

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

JerryNixon
Copy link
Contributor

@JerryNixon JerryNixon commented Oct 2, 2024

Closes #2333

Overview

{
  "runtime": {
    "host": {
      "max-response-size-mb": 158
    },
    "pagination": {
      "max-page-size": 100000,
      "default-page-size": 100,
    }
  }
}

max-response-size-mb

source

Specifies the maximum size, in megabytes, of the database response allowed in a single result. This limit helps prevent large results (in size) from overwhelming the API.

{
  "runtime": {
    "host": {
      "max-response-size-mb": 158
    }
  }
}
Min Max Special Optional Default
1 MB 158 MB N/A Yes 158 MB

max-page-size

source

Defines the maximum number of records that can be returned in a single page of results. This limit helps prevent large results (in rows) from overwhelming the API.

{
  "runtime": {
    "pagination": {
      "max-page-size": 100000
    }
  }
}
Min Max Special Optional Default
1 100,000 -1 (unlimited) Yes 100,000

default-page-size

source

Sets the default number of records returned in a single response when the result set exceeds this limit. When this limit is reached, a continuation token is provided to help users retrieve the next page.

{
  "runtime": {
    "pagination": {
      "default-page-size": 100
    }
  }
}
Min Max Special Optional Default
1 100,000 -1 (same as max-page-size) Yes 100

@JerryNixon JerryNixon enabled auto-merge (squash) October 2, 2024 22:27
@JerryNixon JerryNixon marked this pull request as draft October 2, 2024 22:38
auto-merge was automatically disabled October 2, 2024 22:38

Pull request was converted to draft

@JerryNixon JerryNixon marked this pull request as ready for review October 2, 2024 22:40
@JerryNixon JerryNixon enabled auto-merge (squash) October 2, 2024 22:57
@abhishekkumams
Copy link
Contributor

can user specify any of these properties as null?

for example:
Is this valid?

{
  "runtime": {
    "pagination": {
      "default-page-size": null
    }
  }
}

@abhishekkumams
Copy link
Contributor

/azp run

Copy link
Contributor

@seantleonard seantleonard left a comment

Choose a reason for hiding this comment

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

needs to update to allow null for properties that are optional. That way dab validate won't fail to validate config files that exclude those properties and prefer DAB defaults.

schemas/dab.draft.schema.json Outdated Show resolved Hide resolved
schemas/dab.draft.schema.json Outdated Show resolved Hide resolved
schemas/dab.draft.schema.json Outdated Show resolved Hide resolved
schemas/dab.draft.schema.json Outdated Show resolved Hide resolved
"integer",
"null"
]
"description": "Specifies the maximum size, in megabytes, of the database response allowed in a single result. If set to null, the default value is 158 MB.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is default value = 158 MB? Why not some power of 2 for e.g. 128 or 256?

Copy link
Contributor

@Aniruddh25 Aniruddh25 left a comment

Choose a reason for hiding this comment

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

LGTM, just one question out of curiosity.

@Aniruddh25
Copy link
Contributor

/azp run

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.

[Bug]: Missing pagination property in dab.draft.schema.json
4 participants