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

Investigate removing workaround re: broken metric_descriptor path #1815

Closed
meredithslota opened this issue Oct 16, 2023 · 1 comment · Fixed by #1976
Closed

Investigate removing workaround re: broken metric_descriptor path #1815

meredithslota opened this issue Oct 16, 2023 · 1 comment · Fixed by #1976
Assignees
Labels
api: monitoring Issues related to the Cloud Monitoring API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: process A process-related concern. May include testing, release, or the like.

Comments

@meredithslota
Copy link

https://github.com/googleapis/python-monitoring/blob/11f4376f6534e395c9eefe859d635dc95a360c58/owlbot.py#L41 has a comment referencing a workaround for #701. That issue was closed as "fixed" in #1089 and we should look into whether the workaround can be removed.

@product-auto-label product-auto-label bot added the api: monitoring Issues related to the Cloud Monitoring API. label Oct 16, 2023
@ohmayr ohmayr added priority: p2 Moderately-important priority. Fix may not be included in next release. type: process A process-related concern. May include testing, release, or the like. labels Oct 17, 2023
@parthea parthea self-assigned this Oct 20, 2023
@parthea
Copy link
Contributor

parthea commented Oct 20, 2023

The workaround is still needed as there is still a failing test without it. I'll file a new issue in gapic-generator-python

================================================================================================================================================ FAILURES ================================================================================================================================================
______________________________________________________________________________________________________________________________________ test_metric_descriptor_path _______________________________________________________________________________________________________________________________________

    def test_metric_descriptor_path():
        project = "squid"
        metric_descriptor = "clam"
>       expected = "projects/{project}/metricDescriptors/{metric_descriptor=**}".format(
            project=project,
            metric_descriptor=metric_descriptor,
        )
E       KeyError: 'metric_descriptor=**'

tests/unit/gapic/monitoring_v3/test_metric_service.py:4133: KeyError
___________________________________________________________________________________________________________________________________ test_parse_metric_descriptor_path ____________________________________________________________________________________________________________________________________

    def test_parse_metric_descriptor_path():
        expected = {
            "project": "whelk",
            "metric_descriptor": "octopus",
        }
>       path = MetricServiceClient.metric_descriptor_path(**expected)

tests/unit/gapic/monitoring_v3/test_metric_service.py:4146: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

project = 'whelk', metric_descriptor = 'octopus'

    @staticmethod
    def metric_descriptor_path(
        project: str,
        metric_descriptor: str,
    ) -> str:
        """Returns a fully-qualified metric_descriptor string."""
>       return "projects/{project}/metricDescriptors/{metric_descriptor=**}".format(
            project=project,
            metric_descriptor=metric_descriptor,
        )
E       KeyError: 'metric_descriptor=**'

google/cloud/monitoring_v3/services/metric_service/client.py:189: KeyError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: monitoring Issues related to the Cloud Monitoring API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants