Skip to content

Commit

Permalink
feat: add progress field to UpdateDatabaseDdlMetadata (#361)
Browse files Browse the repository at this point in the history
* chore: fix owlbot.py to copy changes from googleapis-gen

* feat(spanner): add progress field to UpdateDatabaseDdlMetadata

* use the latest owlbot post processor image

* chore: move import of CommitResponse

* add workarounds in owlbot.py

* run post processor

* update owlbot.py to copy multiple folders/versions from googleapis-gen
  • Loading branch information
parthea committed Jun 7, 2021
1 parent f58d2c3 commit 1c03dcc
Show file tree
Hide file tree
Showing 74 changed files with 3,786 additions and 2,792 deletions.
2 changes: 1 addition & 1 deletion .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
docker:
digest: sha256:cfc0e802701262c211703c468874d767f65dabe6a1a71d0e07bfc8a3d5175f32
digest: sha256:c66ba3c8d7bc8566f47df841f98cd0097b28fff0b1864c86f5817f4c8c3e8600
image: gcr.io/repo-automation-bots/owlbot-python:latest

2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ repos:
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.0
rev: 3.9.2
hooks:
- id: flake8
16 changes: 1 addition & 15 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,21 +160,7 @@ Running System Tests
auth settings and change some configuration in your project to
run all the tests.

- System tests will be run against an actual project and
so you'll need to provide some environment variables to facilitate
authentication to your project:

- ``GOOGLE_APPLICATION_CREDENTIALS``: The path to a JSON key file;
Such a file can be downloaded directly from the developer's console by clicking
"Generate new JSON key". See private key
`docs <https://cloud.google.com/storage/docs/authentication#generating-a-private-key>`__
for more details.

- Once you have downloaded your json keys, set the environment variable
``GOOGLE_APPLICATION_CREDENTIALS`` to the absolute path of the json file::

$ export GOOGLE_APPLICATION_CREDENTIALS="/Users/<your_username>/path/to/app_credentials.json"

- System tests will be run against an actual project. You should use local credentials from gcloud when possible. See `Best practices for application authentication <https://cloud.google.com/docs/authentication/best-practices-applications#local_development_and_testing_with_the>`__. Some tests require a service account. For those tests see `Authenticating as a service account <https://cloud.google.com/docs/authentication/production>`__.

*************
Test Coverage
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,),
"grpc": ("https://grpc.github.io/grpc/python/", None),
"proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None),
"protobuf": ("https://googleapis.dev/python/protobuf/latest/", None),
}


Expand Down
4 changes: 2 additions & 2 deletions docs/multiprocessing.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. note::

Because this client uses :mod:`grpcio` library, it is safe to
Because this client uses :mod:`grpc` library, it is safe to
share instances across threads. In multiprocessing scenarios, the best
practice is to create client instances *after* the invocation of
:func:`os.fork` by :class:`multiprocessing.Pool` or
:func:`os.fork` by :class:`multiprocessing.pool.Pool` or
:class:`multiprocessing.Process`.
1 change: 0 additions & 1 deletion docs/spanner_admin_database_v1/database_admin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ DatabaseAdmin
:members:
:inherited-members:


.. automodule:: google.cloud.spanner_admin_database_v1.services.database_admin.pagers
:members:
:inherited-members:
1 change: 1 addition & 0 deletions docs/spanner_admin_database_v1/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ Types for Google Cloud Spanner Admin Database v1 API

.. automodule:: google.cloud.spanner_admin_database_v1.types
:members:
:undoc-members:
:show-inheritance:
1 change: 0 additions & 1 deletion docs/spanner_admin_instance_v1/instance_admin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ InstanceAdmin
:members:
:inherited-members:


.. automodule:: google.cloud.spanner_admin_instance_v1.services.instance_admin.pagers
:members:
:inherited-members:
1 change: 1 addition & 0 deletions docs/spanner_admin_instance_v1/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ Types for Google Cloud Spanner Admin Instance v1 API

.. automodule:: google.cloud.spanner_admin_instance_v1.types
:members:
:undoc-members:
:show-inheritance:
1 change: 0 additions & 1 deletion docs/spanner_v1/spanner.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Spanner
:members:
:inherited-members:


.. automodule:: google.cloud.spanner_v1.services.spanner.pagers
:members:
:inherited-members:
1 change: 1 addition & 0 deletions docs/spanner_v1/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ Types for Google Cloud Spanner v1 API

.. automodule:: google.cloud.spanner_v1.types
:members:
:undoc-members:
:show-inheritance:
9 changes: 5 additions & 4 deletions google/cloud/spanner_admin_database_v1/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -16,6 +15,8 @@
#

from .services.database_admin import DatabaseAdminClient
from .services.database_admin import DatabaseAdminAsyncClient

from .types.backup import Backup
from .types.backup import BackupInfo
from .types.backup import CreateBackupEncryptionConfig
Expand Down Expand Up @@ -47,12 +48,12 @@
from .types.spanner_database_admin import RestoreDatabaseMetadata
from .types.spanner_database_admin import RestoreDatabaseRequest
from .types.spanner_database_admin import RestoreInfo
from .types.spanner_database_admin import RestoreSourceType
from .types.spanner_database_admin import UpdateDatabaseDdlMetadata
from .types.spanner_database_admin import UpdateDatabaseDdlRequest

from .types.spanner_database_admin import RestoreSourceType

__all__ = (
"DatabaseAdminAsyncClient",
"Backup",
"BackupInfo",
"CreateBackupEncryptionConfig",
Expand All @@ -61,6 +62,7 @@
"CreateDatabaseMetadata",
"CreateDatabaseRequest",
"Database",
"DatabaseAdminClient",
"DeleteBackupRequest",
"DropDatabaseRequest",
"EncryptionConfig",
Expand All @@ -87,5 +89,4 @@
"UpdateBackupRequest",
"UpdateDatabaseDdlMetadata",
"UpdateDatabaseDdlRequest",
"DatabaseAdminClient",
)
193 changes: 193 additions & 0 deletions google/cloud/spanner_admin_database_v1/gapic_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
{
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
"language": "python",
"libraryPackage": "google.cloud.spanner_admin_database_v1",
"protoPackage": "google.spanner.admin.database.v1",
"schema": "1.0",
"services": {
"DatabaseAdmin": {
"clients": {
"grpc": {
"libraryClient": "DatabaseAdminClient",
"rpcs": {
"CreateBackup": {
"methods": [
"create_backup"
]
},
"CreateDatabase": {
"methods": [
"create_database"
]
},
"DeleteBackup": {
"methods": [
"delete_backup"
]
},
"DropDatabase": {
"methods": [
"drop_database"
]
},
"GetBackup": {
"methods": [
"get_backup"
]
},
"GetDatabase": {
"methods": [
"get_database"
]
},
"GetDatabaseDdl": {
"methods": [
"get_database_ddl"
]
},
"GetIamPolicy": {
"methods": [
"get_iam_policy"
]
},
"ListBackupOperations": {
"methods": [
"list_backup_operations"
]
},
"ListBackups": {
"methods": [
"list_backups"
]
},
"ListDatabaseOperations": {
"methods": [
"list_database_operations"
]
},
"ListDatabases": {
"methods": [
"list_databases"
]
},
"RestoreDatabase": {
"methods": [
"restore_database"
]
},
"SetIamPolicy": {
"methods": [
"set_iam_policy"
]
},
"TestIamPermissions": {
"methods": [
"test_iam_permissions"
]
},
"UpdateBackup": {
"methods": [
"update_backup"
]
},
"UpdateDatabaseDdl": {
"methods": [
"update_database_ddl"
]
}
}
},
"grpc-async": {
"libraryClient": "DatabaseAdminAsyncClient",
"rpcs": {
"CreateBackup": {
"methods": [
"create_backup"
]
},
"CreateDatabase": {
"methods": [
"create_database"
]
},
"DeleteBackup": {
"methods": [
"delete_backup"
]
},
"DropDatabase": {
"methods": [
"drop_database"
]
},
"GetBackup": {
"methods": [
"get_backup"
]
},
"GetDatabase": {
"methods": [
"get_database"
]
},
"GetDatabaseDdl": {
"methods": [
"get_database_ddl"
]
},
"GetIamPolicy": {
"methods": [
"get_iam_policy"
]
},
"ListBackupOperations": {
"methods": [
"list_backup_operations"
]
},
"ListBackups": {
"methods": [
"list_backups"
]
},
"ListDatabaseOperations": {
"methods": [
"list_database_operations"
]
},
"ListDatabases": {
"methods": [
"list_databases"
]
},
"RestoreDatabase": {
"methods": [
"restore_database"
]
},
"SetIamPolicy": {
"methods": [
"set_iam_policy"
]
},
"TestIamPermissions": {
"methods": [
"test_iam_permissions"
]
},
"UpdateBackup": {
"methods": [
"update_backup"
]
},
"UpdateDatabaseDdl": {
"methods": [
"update_database_ddl"
]
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -14,7 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

from .client import DatabaseAdminClient
from .async_client import DatabaseAdminAsyncClient

Expand Down
Loading

0 comments on commit 1c03dcc

Please sign in to comment.