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 — System test for 'Topic.check_iam_permissions' fails with 503 · Issue #1687 · googleapis/google-cloud-python

System test for 'Topic.check_iam_permissions' fails with 503 #1687

New issue
Copy link
New issue
Copy link
Closed
Closed
System test for 'Topic.check_iam_permissions' fails with 503#1687
Copy link
Assignees
tseaver
Labels
api: pubsubIssues related to the Pub/Sub API.testingtype: questionRequest for information or clarification. Not an issue.

Description

@tseaver
tseaver
opened on Apr 1, 2016
Issue body actions

While working on a new system test for Topic.check_iam_permissions (the wrapper for projects.topics.testIamPermissions), the back-end consistently fails the API call with a 503::

(Pdb) pp content
'{\n  "error": {\n    "code": 503,\n    "message": "The service was unable to fulfill your request. Please try again. [code=8a75]",\n    "status": "UNAVAILABLE"\n  }\n}\n'
(Pdb) pp response
{'-content-encoding': 'gzip',
 'alt-svc': 'quic=":443"; ma=2592000; v="32,31,30,29,28,27,26,25"',
 'alternate-protocol': '443:quic',
 'cache-control': 'private',
 'content-length': '162',
 'content-type': 'application/json; charset=UTF-8',
 'date': 'Fri, 01 Apr 2016 16:20:35 GMT',
 'server': 'ESF',
 'status': '503',
 'transfer-encoding': 'chunked',
 'vary': 'Origin, X-Origin, Referer',
 'x-content-type-options': 'nosniff',
 'x-frame-options': 'SAMEORIGIN',
 'x-xss-protection': '1; mode=block'}
(Pdb) pp method
'POST'
(Pdb) pp url
'https://pubsub.googleapis.com/v1/projects/citric-celerity-697/topics/ex_topic_iam_policy-1459527567594:testIamPermissions'

@tmatsuo does that extra code (8a75) tell you anything about the failure?

Activity

  1. tseaver
    added
    type: questionRequest for information or clarification. Not an issue.
    testing
    api: pubsubIssues related to the Pub/Sub API.
    on Apr 1, 2016
  2. tmatsuo commented on May 3, 2016

    @tmatsuo
    tmatsuo
    on May 3, 2016
    Contributor
    More actions

    Sorry my e-mail client didn't do a good job of filtering. Is this still a problem? What's the request body?

  3. tseaver commented on May 3, 2016

    @tseaver
    tseaver
    on May 3, 2016
    ContributorAuthor
    More actions

    @tmatsuo the request is now failing with a 400, rather than a 503:

    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "gcloud/pubsub/topic.py", line 395, in check_iam_permissions
        self.full_name, list(permissions))
      File "gcloud/pubsub/connection.py", line 537, in test_iam_permissions
        resp = conn.api_request(method='POST', path=path, data=wrapped)
      File "gcloud/connection.py", line 343, in api_request
        error_info=method + ' ' + url)
    gcloud.exceptions.BadRequest: 400 The IAM operation failed with a non-retryable error: Unknown error. See https://cloud.google.com/pubsub/access_control for more information. (POST https://pubsub.googleapis.com/v1/projects/<MY-PROJECT-ID>/topics/<TOPIC-NAME>:testIamPermissions)

    The body of the request looks like so:

    {"permissions": ["roles/owner", "roles/editor", "roles/viewer"]}
  4. tmatsuo commented on May 4, 2016

    @tmatsuo
    tmatsuo
    on May 4, 2016
    Contributor
    More actions

    Oh I see. "roles/owner", "roles/editor", and "roles/viewer" are all roles, not permissions. Can you try the same code with:

    {"permissions":
      ["pubsub.topics.attachSubscription", "pubsub.topics.publish", "pubsub.topics.update"]}
    

    or something like that?

  5. rimey commented on May 4, 2016

    @rimey
    rimey
    on May 4, 2016
    Contributor
    More actions

    I'm new to the IAM APIs, but I wonder if the following might be worth checking just in case:

    • Does enabling the "Google Identity and Access Management API" help?
    • Does making the service account a project owner help?

    Hmm, those were just shots in the dark. You shouldn't need admin permissions to check your permissions. Try @tmatsuo's suggestion first. That's probably it.

  6. tseaver
    closed this as completedin #1782on May 11, 2016
  7. JustinBeckwith
    assigned
    tseaver
    on Feb 1, 2021
  8. parthea
    added 2 commits that reference this issue on Oct 21, 2023

    Fix AutoML region tag typos [(#1687)](GoogleCloudPlatform/python-docs…

    5100171

    Fix AutoML region tag typos [(#1687)](GoogleCloudPlatform/python-docs…

    286f046
  9. parthea
    added a commit that references this issue on Nov 24, 2025

    docs: fix formatting of docstring with lists (#1687)

    8996056
  10. parthea
    added a commit that references this issue on Mar 9, 2026

    chore: delete topic after creation (#1687)

    f11c589
  11. parthea
    added a commit that references this issue on Apr 1, 2026

    docs: fix spacing of k-means code snippet (#1687)

    178a98a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @tseaver
    tseaver

Labels

api: pubsubIssues related to the Pub/Sub API.testingtype: questionRequest for information or clarification. Not an issue.

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.