Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

chore: use gapic-generator-python 0.58.4 #260

Merged
merged 4 commits into from
Jan 15, 2022

Conversation

gcf-owl-bot[bot]
Copy link
Contributor

@gcf-owl-bot gcf-owl-bot bot commented Dec 31, 2021

  • Regenerate this pull request now.

fix: provide appropriate mock values for message body fields

committer: dovs
PiperOrigin-RevId: 419025932

Source-Link: googleapis/googleapis@73da669

Source-Link: https://github.com/googleapis/googleapis-gen/commit/46df624a54b9ed47c1a7eefb7a49413cf7b82f98
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDZkZjYyNGE1NGI5ZWQ0N2MxYTdlZWZiN2E0OTQxM2NmN2I4MmY5OCJ9

fix: provide appropriate mock values for message body fields

committer: dovs
PiperOrigin-RevId: 419025932

Source-Link: googleapis/googleapis@73da669

Source-Link: https://github.com/googleapis/googleapis-gen/commit/46df624a54b9ed47c1a7eefb7a49413cf7b82f98
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDZkZjYyNGE1NGI5ZWQ0N2MxYTdlZWZiN2E0OTQxM2NmN2I4MmY5OCJ9
@gcf-owl-bot gcf-owl-bot bot requested a review from a team as a code owner December 31, 2021 04:23
@product-auto-label product-auto-label bot added the api: monitoring Issues related to the googleapis/python-monitoring API. label Dec 31, 2021
@trusted-contributions-gcf trusted-contributions-gcf bot added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Dec 31, 2021
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Dec 31, 2021
@trusted-contributions-gcf trusted-contributions-gcf bot added the owlbot:run Add this label to trigger the Owlbot post processor. label Dec 31, 2021
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Dec 31, 2021
@parthea parthea added kokoro:force-run Add this label to force Kokoro to re-run the tests. kokoro:run Add this label to force Kokoro to re-run the tests. and removed kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Dec 31, 2021
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Dec 31, 2021
@trusted-contributions-gcf trusted-contributions-gcf bot added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Jan 7, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 7, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 7, 2022
@parthea parthea added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jan 14, 2022
@trusted-contributions-gcf trusted-contributions-gcf bot added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Jan 15, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 15, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 15, 2022
@@ -166,14 +166,14 @@ def transport(self) -> MetricServiceTransport:
return self._transport

'''@staticmethod
def metric_descriptor_path(project: str,) -> str:
def metric_descriptor_path(project: str,metric_descriptor: str,) -> str:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is commented out so it shouldn't be considered a breaking change.

@parthea parthea removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jan 15, 2022
"""Returns a fully-qualified metric_descriptor string."""
return "projects/{project}/metricDescriptors/{metric_descriptor=**}".format(project=project, )
return "projects/{project}/metricDescriptors/{metric_descriptor=**}".format(project=project, metric_descriptor=metric_descriptor, )
Copy link
Contributor

@parthea parthea Jan 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried uncommenting the code but the unit tests fail as {metric_descriptor=**} is unsupported according to googleapis/gapic-generator-python#701

_________________________________________________________________________________ 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:3533: 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:3545: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

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:171: KeyError
==============================================================================

@parthea parthea merged commit bdb65b3 into main Jan 15, 2022
@parthea parthea deleted the owl-bot-c74d23b4-3135-4ea1-8300-23836db8efe6 branch January 15, 2022 17:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: monitoring Issues related to the googleapis/python-monitoring API. owl-bot-copy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants