Skip to content

tests.system: test_listing_project_subscriptions[rest-rest] failed #937

@flaky-bot

Description

@flaky-bot

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: 2a07b1e
buildURL: Build Status, Sponge
status: failed

Test output
@pytest.fixture
    def cleanup():
        registry = []
        yield registry
    # Perform all clean up.
    for to_call, args, kwargs in registry:
      to_call(*args, **kwargs)

tests/system.py:87:


google/pubsub_v1/services/subscriber/client.py:1122: in delete_subscription
rpc(
.nox/prerelease_deps-3-10/lib/python3.10/site-packages/google/api_core/gapic_v1/method.py:113: in call
return wrapped_func(*args, **kwargs)
.nox/prerelease_deps-3-10/lib/python3.10/site-packages/google/api_core/retry.py:365: in retry_wrapped_func
return retry_func(
.nox/prerelease_deps-3-10/lib/python3.10/site-packages/google/api_core/retry.py:192: in retry_target
return target()
.nox/prerelease_deps-3-10/lib/python3.10/site-packages/google/api_core/timeout.py:120: in func_with_timeout
return func(*args, **kwargs)
.nox/prerelease_deps-3-10/lib/python3.10/site-packages/google/api_core/grpc_helpers.py:72: in error_remapped_callable
return callable_(*args, **kwargs)


self = SubscriberRestTransport._DeleteSubscription(_session=<google.auth.transport.requests.AuthorizedSession object at 0x7ef..._interceptor=<google.pubsub_v1.services.subscriber.transports.rest.SubscriberRestInterceptor object at 0x7efee86b62c0>)
request = subscription: "projects/precise-truck-742/subscriptions/sub-1.1687552950573"

def __call__(
    self,
    request: pubsub.DeleteSubscriptionRequest,
    *,
    retry: OptionalRetry = gapic_v1.method.DEFAULT,
    timeout: Optional[float] = None,
    metadata: Sequence[Tuple[str, str]] = (),
):
    r"""Call the delete subscription method over HTTP.

    Args:
        request (~.pubsub.DeleteSubscriptionRequest):
            The request object. Request for the DeleteSubscription
        method.
        retry (google.api_core.retry.Retry): Designation of what errors, if any,
            should be retried.
        timeout (float): The timeout for this request.
        metadata (Sequence[Tuple[str, str]]): Strings which should be
            sent along with the request as metadata.
    """

    http_options: List[Dict[str, str]] = [
        {
            "method": "delete",
            "uri": "/v1/{subscription=projects/*/subscriptions/*}",
        },
    ]
    request, metadata = self._interceptor.pre_delete_subscription(
        request, metadata
    )
    pb_request = pubsub.DeleteSubscriptionRequest.pb(request)
    transcoded_request = path_template.transcode(http_options, pb_request)

    uri = transcoded_request["uri"]
    method = transcoded_request["method"]

    # Jsonify the query params
    query_params = json.loads(
        json_format.MessageToJson(
            transcoded_request["query_params"],
            including_default_value_fields=False,
            use_integers_for_enums=True,
        )
    )
    query_params.update(self._get_unset_required_fields(query_params))

    query_params["$alt"] = "json;enum-encoding=int"

    # Send the request
    headers = dict(metadata)
    headers["Content-Type"] = "application/json"
    response = getattr(self._session, method)(
        "{host}{uri}".format(host=self._host, uri=uri),
        timeout=timeout,
        headers=headers,
        params=rest_helpers.flatten_query_params(query_params, strict=True),
    )

    # In case of error, raise the appropriate core_exceptions.GoogleAPICallError exception
    # subclass.
    if response.status_code >= 400:
      raise core_exceptions.from_http_response(response)

E google.api_core.exceptions.NotFound: 404 DELETE https://pubsub.googleapis.com/v1/projects/precise-truck-742/subscriptions/sub-1.1687552950573?%24alt=json%3Benum-encoding%3Dint: Resource not found (resource=sub-1.1687552950573).

google/pubsub_v1/services/subscriber/transports/rest.py:1044: NotFound

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the googleapis/python-pubsub API.flakybot: flakyTells the Flaky Bot not to close or comment on this issue.flakybot: issueAn issue filed by the Flaky Bot. Should not be added manually.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

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions