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

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: googleapis/python-cloudbuild
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1.0
Choose a base ref
...
head repository: googleapis/python-cloudbuild
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.0.0
Choose a head ref
  • 2 commits
  • 46 files changed
  • 2 contributors

Commits on Jul 23, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f52a799 View commit details
  2. chore: release 2.0.0 (#26)

    * updated CHANGELOG.md [ci skip]
    
    * updated setup.cfg [ci skip]
    
    * updated setup.py
    
    Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
    release-please[bot] authored Jul 23, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e3be048 View commit details
Showing with 10,421 additions and 10,410 deletions.
  1. +11 −0 CHANGELOG.md
  2. +11 −2 README.rst
  3. +146 −0 UPGRADING.md
  4. +1 −0 docs/UPGRADING.md
  5. +6 −0 docs/cloudbuild_v1/services.rst
  6. +5 −0 docs/cloudbuild_v1/types.rst
  7. +0 −6 docs/gapic/v1/api.rst
  8. +0 −5 docs/gapic/v1/types.rst
  9. +13 −2 docs/index.rst
  10. +0 −24 google/cloud/devtools/__init__.py
  11. +0 −29 google/cloud/devtools/cloudbuild.py
  12. +124 −0 google/cloud/devtools/cloudbuild/__init__.py
  13. +2 −0 google/cloud/devtools/cloudbuild/py.typed
  14. +90 −26 google/cloud/devtools/cloudbuild_v1/__init__.py
  15. +0 −1,410 google/cloud/devtools/cloudbuild_v1/gapic/cloud_build_client.py
  16. +0 −103 google/cloud/devtools/cloudbuild_v1/gapic/cloud_build_client_config.py
  17. +0 −189 google/cloud/devtools/cloudbuild_v1/gapic/enums.py
  18. 0 google/cloud/devtools/cloudbuild_v1/gapic/transports/__init__.py
  19. +0 −382 google/cloud/devtools/cloudbuild_v1/gapic/transports/cloud_build_grpc_transport.py
  20. 0 google/cloud/devtools/cloudbuild_v1/proto/__init__.py
  21. +2 −2 google/cloud/devtools/cloudbuild_v1/proto/cloudbuild.proto
  22. +0 −6,905 google/cloud/devtools/cloudbuild_v1/proto/cloudbuild_pb2.py
  23. +0 −378 google/cloud/devtools/cloudbuild_v1/proto/cloudbuild_pb2_grpc.py
  24. +2 −0 google/cloud/devtools/cloudbuild_v1/py.typed
  25. +3 −11 google/cloud/{ → devtools/cloudbuild_v1/services}/__init__.py
  26. +9 −9 google/{ → cloud/devtools/cloudbuild_v1/services/cloud_build}/__init__.py
  27. +1,428 −0 google/cloud/devtools/cloudbuild_v1/services/cloud_build/async_client.py
  28. +1,551 −0 google/cloud/devtools/cloudbuild_v1/services/cloud_build/client.py
  29. +276 −0 google/cloud/devtools/cloudbuild_v1/services/cloud_build/pagers.py
  30. +36 −0 google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/__init__.py
  31. +246 −0 google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/base.py
  32. +700 −0 google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/grpc.py
  33. +711 −0 google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/grpc_asyncio.py
  34. +0 −58 google/cloud/devtools/cloudbuild_v1/types.py
  35. +109 −0 google/cloud/devtools/cloudbuild_v1/types/__init__.py
  36. +1,548 −0 google/cloud/devtools/cloudbuild_v1/types/cloudbuild.py
  37. +6 −4 noxfile.py
  38. +1 −0 samples/AUTHORING_GUIDE.md
  39. +1 −0 samples/CONTRIBUTING.md
  40. +192 −0 scripts/fixup_cloudbuild_v1_keywords.py
  41. +10 −7 setup.py
  42. +2 −10 synth.metadata
  43. +42 −15 synth.py
  44. 0 {google/cloud/devtools/cloudbuild_v1/gapic → tests/unit/gapic/cloudbuild_v1}/__init__.py
  45. +3,137 −0 tests/unit/gapic/cloudbuild_v1/test_cloud_build.py
  46. +0 −833 tests/unit/gapic/v1/test_cloud_build_client_v1.py
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,17 @@

[1]: https://pypi.org/project/google-cloud-build/#history

## [2.0.0](https://www.github.com/googleapis/python-cloudbuild/compare/v1.1.0...v2.0.0) (2020-07-23)


### ⚠ BREAKING CHANGES

* migrate to use microgenerator (#23)

### Features

* migrate to use microgenerator ([#23](https://www.github.com/googleapis/python-cloudbuild/issues/23)) ([f52a799](https://www.github.com/googleapis/python-cloudbuild/commit/f52a79930e621c46dea574917549f9ed37771149))

## [1.1.0](https://www.github.com/googleapis/python-cloudbuild/compare/v1.0.0...v1.1.0) (2020-06-30)


13 changes: 11 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Python Client for Cloud Build API (`GA`_)
============================================

|ga| |pypi| |versions|
|ga| |pypi| |versions|

`Cloud Build API`_: Creates and manages builds on Google Cloud Platform.

@@ -48,6 +48,15 @@ dependencies.

.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/

Supported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^
Python >= 3.6

Deprecated Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^^
Python == 2.7.

The last version of this library compatible with Python 2.7 is google-cloud-build==1.1.0.

Mac/Linux
^^^^^^^^^
@@ -81,4 +90,4 @@ Next Steps
APIs that we cover.

.. _Cloud Build API Product documentation: https://cloud.google.com/cloud-build
.. _repository’s main README: https://github.com/googleapis/google-cloud-python/blob/master/README.rst
.. _repository’s main README: https://github.com/googleapis/google-cloud-python/blob/master/README.rst
146 changes: 146 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
# 2.0.0 Migration Guide

The 2.0 release of the `google-cloud-build` client is a significant upgrade based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-python), and includes substantial interface changes. Existing code written for earlier versions of this library will likely require updates to use this version. This document describes the changes that have been made, and what you need to do to update your usage.

If you experience issues or have questions, please file an [issue](https://github.com/googleapis/python-cloudbuild/issues).

## Supported Python Versions

> **WARNING**: Breaking change
The 2.0.0 release requires Python 3.6+.


## Method Calls

> **WARNING**: Breaking change
Methods expect request objects. We provide a script that will convert most common use cases.

* Install the library

```py
python3 -m pip install google-cloud-build
```

* The script `fixup_cloudbuild_v1_keywords.py` is shipped with the library. It expects
an input directory (with the code to convert) and an empty destination directory.

```sh
$ fixup_cloudbuild_v1_keywords.py --input-directory .samples/ --output-directory samples/
```

**Before:**
```py
from google.cloud.devtools import cloudbuild

client = cloudbuild.CloudBuildClient()

build = client.get_build("project_id")
```


**After:**
```py
from google.cloud.devtools import cloudbuild

client = cloudbuild.CloudBuildClient()

build = client.get_build(request = {'project_id': "project_id"})
```

### More Details

In `google-cloud-build<2.0.0`, parameters required by the API were positional parameters and optional parameters were keyword parameters.

**Before:**
```py
def list_builds(
self,
project_id,
page_size=None,
filter_=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
```

In the 2.0.0 release, all methods have a single positional parameter `request`. Method docstrings indicate whether a parameter is required or optional.

Some methods have additional keyword only parameters. The available parameters depend on the [`google.api.method_signature` annotation](https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto#L82) specified by the API producer.


**After:**
```py
def list_builds(
self,
request: cloudbuild.ListBuildsRequest = None,
*,
project_id: str = None,
filter: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> pagers.ListBuildsPager:
```

> **NOTE:** The `request` parameter and flattened keyword parameters for the API are mutually exclusive.
> Passing both will result in an error.

Both of these calls are valid:

```py
response = client.list_builds(
request={
"project_id": project_id,
"filter": filter,
}
)
```

```py
response = client.list_builds(
project_id=project_id,
filter=filter,
)
```

This call is invalid because it mixes `request` with a keyword argument `filter`. Executing this code
will result in an error.

```py
response = client.list_builds(
request={
"project_id": project_id,
},
filter=filter
)
```



## Enums and Types


> **WARNING**: Breaking change
The submodules `enums` and `types` have been removed.

**Before:**
```py
from google.cloud.devtools import cloudbuild

build_status = cloudbuild.enums.Build.Status.SUCCESS
built_image = cloudbuild.types.BuiltImage(name="name")
```


**After:**
```py
from google.cloud.devtools import cloudbuild

build_status = cloudbuild.Build.Status.SUCCESS
built_image = cloudbuild.BuiltImage(name="name")
```
1 change: 1 addition & 0 deletions docs/UPGRADING.md
6 changes: 6 additions & 0 deletions docs/cloudbuild_v1/services.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Services for Google Devtools Cloudbuild v1 API
==============================================

.. automodule:: google.cloud.devtools.cloudbuild_v1.services.cloud_build
:members:
:inherited-members:
5 changes: 5 additions & 0 deletions docs/cloudbuild_v1/types.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Types for Google Devtools Cloudbuild v1 API
===========================================

.. automodule:: google.cloud.devtools.cloudbuild_v1.types
:members:
6 changes: 0 additions & 6 deletions docs/gapic/v1/api.rst

This file was deleted.

5 changes: 0 additions & 5 deletions docs/gapic/v1/types.rst

This file was deleted.

15 changes: 13 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -9,8 +9,19 @@ API Reference
.. toctree::
:maxdepth: 2

gapic/v1/api
gapic/v1/types
cloudbuild_v1/services
cloudbuild_v1/types


Migration Guide
---------------

See the guide below for instructions on migrating to the 2.x release of this library.

.. toctree::
:maxdepth: 2

UPGRADING


Changelog
24 changes: 0 additions & 24 deletions google/cloud/devtools/__init__.py

This file was deleted.

29 changes: 0 additions & 29 deletions google/cloud/devtools/cloudbuild.py

This file was deleted.

Loading