GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Regression in max_retries usage on GetSerialPortOutput() · Issue #1243 · googleapis/google-api-python-client

Regression in max_retries usage on GetSerialPortOutput() #1243

New issue
Copy link
New issue
Copy link
Closed
#1244
Closed
Regression in max_retries usage on GetSerialPortOutput()#1243
#1244
Copy link
Assignees
parthea
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.type: docsImprovement to the documentation for an API.

Description

@same-id
same-id
opened on Mar 8, 2021
Issue body actions

After v2.0.2, max_retries is ignored in GetSerialPortOutput().
This previously worked on v1.12.8.

All our tests are failing since they used this feature of the python library.

I traced the problem to this commit:

#1116 and #1117

c6912836 - fix: handle error on service not enabled (#1117)

1117 changed the default reason to be error.status which is PERMISSION_DENIAD instead using error.errors[0].reason which is rateLimitExceeded and therefore later ignored in:

# Only retry on rate limit related failures.
if reason in ("userRateLimitExceeded", "rateLimitExceeded"):
    return True

Example for such json:

{'error': {'code': 403,
           'errors': [{'domain': 'usageLimits',
                       'message': 'Quota exceeded for quota group '
                                  "'GetSerialPortOutputGroup' and limit "
                                  "'Instance GetSerialPortOutput requests per "
                                  "user per 100 seconds' of service "
                                  "'compute.googleapis.com' for consumer "
                                  "'project_number:REDACTED'.",
                       'reason': 'rateLimitExceeded'}],
           'message': 'Quota exceeded for quota group '
                      "'GetSerialPortOutputGroup' and limit 'Instance "
                      "GetSerialPortOutput requests per user per 100 seconds' "
                      "of service 'compute.googleapis.com' for consumer "
                      "'project_number:REDACTED'.",
           'status': 'PERMISSION_DENIED'}}

I think that correct fix for #1117 should not have changed the order of lookup - first check for error.errors[0].reason and if it doesn't exist fallback to error.status

Sam

Activity

  1. yoshi-automation
    added
    triage meI really want to be triaged.
    on Mar 9, 2021
  2. parthea
    self-assigned this
    on Mar 9, 2021
  3. parthea
    added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    type: docsImprovement to the documentation for an API.
    and removed
    triage meI really want to be triaged.
    on Mar 9, 2021
  4. parthea commented on Mar 9, 2021

    @parthea
    parthea
    on Mar 9, 2021
    Contributor
    More actions

    I'm sorry that we introduced a regression! I have a potential fix in #1244. I still need to add unit tests and update the documentation.

  5. gcf-merge-on-green
    closed this as completedin #1244on Mar 15, 2021
  6. gcf-merge-on-green
    added a commit that references this issue on Mar 15, 2021

    fix: Resolve issue where num_retries would have no effect (#1244)

    This issue will close once commit c518472 is merged into the 'main' branch.
    c518472
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @parthea
    parthea

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.type: docsImprovement to the documentation for an API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.