Skip to content

Pub/Sub PullRequest.maxMessages is mandatory #997

Closed

Description

@mziccard

The PullRequest.maxMessages is a mandatory field, if we don't provide it we get this error:

{
 "error": {
  "code": 400,
  "message": "A required argument is missing in the request: (argument=\"max_messages\").",
  "status": "INVALID_ARGUMENT",
 }
}

The PubSub API design we drafted considers maxMessages an optional option, we must either fix this (by transforming it into a mandatory parameter) or use a default value if the user does not explicitly provide it. /cc @eschapira @aozarov thoughts?

Activity

  1. eschapira commented on May 9, 2016

    @eschapira

    Is this for calling the pull method explicitly or for the callback version?
    I would say that for explicit pulls it is required, and for callback there
    should be a default (set it to 100, no hard data on why that's a good
    value, but sounds reasonable to me).

    On Mon, May 9, 2016 at 9:52 AM, Marco Ziccardi notifications@github.com
    wrote:

    The PullRequest.maxMessages is a mandatory field, if we don't provide it
    we get this error:

    {
    "error": {
    "code": 400,
    "message": "A required argument is missing in the request: (argument="max_messages").",
    "status": "INVALID_ARGUMENT",
    }
    }

    The PubSub API design we drafted considers maxMessages an optional
    option, we must either fix this (by transforming it into a mandatory
    parameter) or use a default value if the user does not explicitly provide
    it. /cc @eschapira https://github.com/eschapira @aozarov
    https://github.com/aozarov thoughts?

    —
    You are receiving this because you were mentioned.
    Reply to this email directly or view it on GitHub
    #997

    Emilio Schapira

  2. mziccard commented on May 9, 2016

    @mziccard
    ContributorAuthor

    Yes, this is for calling the pull method explicitly.

    For the pull method with callback the idea was to allow the user to limit
    the maximum number of concurrent callbacks. 100 sounds like a reasonable
    value in this case.
    On 9 May 2016 16:01, "eschapira" notifications@github.com wrote:

    Is this for calling the pull method explicitly or for the callback version?
    I would say that for explicit pulls it is required, and for callback there
    should be a default (set it to 100, no hard data on why that's a good
    value, but sounds reasonable to me).

    On Mon, May 9, 2016 at 9:52 AM, Marco Ziccardi notifications@github.com
    wrote:

    The PullRequest.maxMessages is a mandatory field, if we don't provide it
    we get this error:

    {
    "error": {
    "code": 400,
    "message": "A required argument is missing in the request:
    (argument="max_messages").",
    "status": "INVALID_ARGUMENT",
    }
    }

    The PubSub API design we drafted considers maxMessages an optional
    option, we must either fix this (by transforming it into a mandatory
    parameter) or use a default value if the user does not explicitly provide
    it. /cc @eschapira https://github.com/eschapira @aozarov
    https://github.com/aozarov thoughts?

    —
    You are receiving this because you were mentioned.
    Reply to this email directly or view it on GitHub
    #997

    Emilio Schapira

    —
    You are receiving this because you authored the thread.
    Reply to this email directly or view it on GitHub
    #997 (comment)

  3. mziccard commented on May 11, 2016

    @mziccard
    ContributorAuthor

    Fixed in #996

  4. added a commit that references this issue on Aug 9, 2022
  5. added a commit that references this issue on Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the Pub/Sub API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions