Skip to content

Commit 4dc1833

Browse files
authored
chore(migration): Migrate code from googleapis/python-error-reporting into packages/google-cloud-error-reporting (#15569)
See #11029. This PR should be merged with a merge-commit, not a squash-commit, in order to preserve the git history.
2 parents dc85e41 + 2aed76c commit 4dc1833

File tree

120 files changed

+30398
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+30398
-1
lines changed

.kokoro/system.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,25 @@ system_test_script="${PROJECT_ROOT}/.kokoro/system-single.sh"
4444
# This is needed in order for `git diff` to succeed
4545
git config --global --add safe.directory $(realpath .)
4646

47+
packages_with_system_tests=(
48+
"google-cloud-bigquery-storage"
49+
"google-cloud-dns"
50+
"google-cloud-error-reporting"
51+
"google-cloud-testutils"
52+
)
53+
54+
# Join array elements with | for the pattern match
55+
packages_with_system_tests_pattern=$(printf "|*%s*" "${packages_with_system_tests[@]}")
56+
packages_with_system_tests_pattern="${packages_with_system_tests_pattern:1}" # Remove the leading pipe
57+
58+
4759
# Run system tests for each package with directory packages/*/tests/system
4860
for dir in `find 'packages' -type d -wholename 'packages/*/tests/system'`; do
4961
# Get the path to the package by removing the suffix /tests/system
5062
package=$(echo $dir | cut -f -2 -d '/')
5163

5264
# Run system tests on every change to these libraries
53-
if [[ $package = @(*google-cloud-bigquery-storage*|*google-cloud-dns*|*google-cloud-testutils*) ]]; then
65+
if [[ $package == @($packages_with_system_tests_pattern) ]]; then
5466
files_to_check=${package}
5567
else
5668
files_to_check=${package}/CHANGELOG.md

.librarian/generator-input/client-post-processing/integrate-isolated-handwritten-code.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,3 +318,63 @@ replacements:
318318
)
319319
session.install(".[fastavro]")
320320
count: 1
321+
- paths: [
322+
"packages/google-cloud-error-reporting/setup.py"
323+
]
324+
before: |
325+
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
326+
"grpcio >= 1.33.2, < 2.0.0",
327+
after: |
328+
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
329+
"google-cloud-logging>=1.14.0, <4.0.0",
330+
"grpcio >= 1.33.2, < 2.0.0",
331+
count: 1
332+
- paths: [
333+
packages/google-cloud-error-reporting/testing/constraints-3.7.txt,
334+
]
335+
before: |
336+
google-api-core==1.34.1
337+
google-auth==2.14.1
338+
after: |
339+
google-api-core==1.34.1
340+
google-cloud-logging==1.14.0
341+
google-auth==2.14.1
342+
count: 1
343+
- paths: [
344+
"packages/google-cloud-error-reporting/docs/index.rst",
345+
]
346+
before: |
347+
API Reference
348+
-------------
349+
.. toctree::
350+
:maxdepth: 2
351+
352+
errorreporting_v1beta1/services_
353+
errorreporting_v1beta1/types_
354+
355+
356+
Changelog
357+
after: |
358+
Usage Documentation
359+
-------------------
360+
361+
.. toctree::
362+
:maxdepth: 2
363+
364+
usage
365+
366+
367+
API Reference
368+
-------------
369+
.. toctree::
370+
:maxdepth: 2
371+
372+
373+
client
374+
util
375+
errorreporting_v1beta1/services_
376+
errorreporting_v1beta1/types_
377+
378+
379+
Changelog
380+
count: 1
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "clouderrorreporting",
3+
"name_pretty": "Error Reporting API",
4+
"product_documentation": "https://cloud.google.com/error-reporting",
5+
"client_documentation": "https://cloud.google.com/python/docs/reference/clouderrorreporting/latest",
6+
"issue_tracker": "https://issuetracker.google.com/savedsearches/559780",
7+
"release_level": "preview",
8+
"language": "python",
9+
"library_type": "GAPIC_COMBO",
10+
"repo": "googleapis/google-cloud-python",
11+
"distribution_name": "google-cloud-error-reporting",
12+
"api_id": "clouderrorreporting.googleapis.com",
13+
"requires_billing": false,
14+
"codeowner_team": "@googleapis/yoshi-python",
15+
"default_version": "v1beta1",
16+
"api_shortname": "clouderrorreporting",
17+
"api_description": "counts, analyzes and aggregates the crashes in your running cloud services. A centralized error management interface displays the results with sorting and filtering capabilities. A dedicated view shows the error details: time chart, occurrences, affected user count, first and last seen dates and a cleaned exception stack trace. Opt-in to receive email and mobile alerts on new errors."
18+
}

.librarian/state.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,6 +1560,43 @@ libraries:
15601560
remove_regex:
15611561
- packages/google-cloud-enterpriseknowledgegraph/
15621562
tag_format: '{id}-v{version}'
1563+
- id: google-cloud-error-reporting
1564+
version: 1.14.0
1565+
last_generated_commit: ce8678a96c8e1fc0d870d80fcf062e5be2b12877
1566+
apis:
1567+
- path: google/devtools/clouderrorreporting/v1beta1
1568+
service_config: clouderrorreporting_v1beta1.yaml
1569+
source_roots:
1570+
- packages/google-cloud-error-reporting
1571+
preserve_regex:
1572+
- packages/google-cloud-error-reporting/CHANGELOG.md
1573+
- docs/CHANGELOG.md
1574+
remove_regex:
1575+
- ^packages/google-cloud-error-reporting/google/cloud/errorreporting
1576+
- ^packages/google-cloud-error-reporting/docs/_static
1577+
- ^packages/google-cloud-error-reporting/docs/_templates
1578+
- ^packages/google-cloud-error-reporting/docs/errorreporting_v1beta1
1579+
- ^packages/google-cloud-error-reporting/docs/multiprocessing.rst
1580+
- ^packages/google-cloud-error-reporting/docs/conf.py
1581+
- ^packages/google-cloud-error-reporting/docs/index.rst
1582+
- ^packages/google-cloud-error-reporting/docs/README.rst
1583+
- ^packages/google-cloud-error-reporting/docs/summary_overview.md
1584+
- ^packages/google-cloud-error-reporting/tests/unit/gapic
1585+
- ^packages/google-cloud-error-reporting/tests/__init__.py
1586+
- ^packages/google-cloud-error-reporting/tests/unit/__init__.py
1587+
- ^packages/google-cloud-error-reporting/.coveragerc
1588+
- ^packages/google-cloud-error-reporting/.flake8
1589+
- ^packages/google-cloud-error-reporting/.repo-metadata.json
1590+
- ^packages/google-cloud-error-reporting/.trampolinerc
1591+
- ^packages/google-cloud-error-reporting/LICENSE
1592+
- ^packages/google-cloud-error-reporting/MANIFEST.in
1593+
- ^packages/google-cloud-error-reporting/README.rst
1594+
- ^packages/google-cloud-error-reporting/mypy.ini
1595+
- ^packages/google-cloud-error-reporting/noxfile.py
1596+
- ^packages/google-cloud-error-reporting/samples/generated_samples
1597+
- ^packages/google-cloud-error-reporting/setup.py
1598+
- ^packages/google-cloud-error-reporting/testing
1599+
tag_format: '{id}-v{version}'
15631600
- id: google-cloud-essential-contacts
15641601
version: 1.12.0
15651602
last_generated_commit: 3322511885371d2b2253f209ccc3aa60d4100cfd
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[run]
2+
branch = True
3+
4+
[report]
5+
show_missing = True
6+
omit =
7+
google/cloud/errorreporting/__init__.py
8+
google/cloud/errorreporting/gapic_version.py
9+
exclude_lines =
10+
# Re-enable the standard pragma
11+
pragma: NO COVER
12+
# Ignore debug-only repr
13+
def __repr__
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2025 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
[flake8]
17+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2333):
18+
# Resolve flake8 lint issues
19+
ignore = E203, E231, E266, E501, W503
20+
exclude =
21+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2333):
22+
# Ensure that generated code passes flake8 lint
23+
**/gapic/**
24+
**/services/**
25+
**/types/**
26+
# Exclude Protobuf gencode
27+
*_pb2.py
28+
29+
# Standard linting exemptions.
30+
**/.nox/**
31+
__pycache__,
32+
.git,
33+
*.pyc,
34+
conf.py
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "clouderrorreporting",
3+
"name_pretty": "Error Reporting API",
4+
"product_documentation": "https://cloud.google.com/error-reporting",
5+
"client_documentation": "https://cloud.google.com/python/docs/reference/clouderrorreporting/latest",
6+
"issue_tracker": "https://issuetracker.google.com/savedsearches/559780",
7+
"release_level": "preview",
8+
"language": "python",
9+
"library_type": "GAPIC_COMBO",
10+
"repo": "googleapis/google-cloud-python",
11+
"distribution_name": "google-cloud-error-reporting",
12+
"api_id": "clouderrorreporting.googleapis.com",
13+
"requires_billing": false,
14+
"codeowner_team": "@googleapis/yoshi-python",
15+
"default_version": "v1beta1",
16+
"api_shortname": "clouderrorreporting",
17+
"api_description": "counts, analyzes and aggregates the crashes in your running cloud services. A centralized error management interface displays the results with sorting and filtering capabilities. A dedicated view shows the error details: time chart, occurrences, affected user count, first and last seen dates and a cleaned exception stack trace. Opt-in to receive email and mobile alerts on new errors."
18+
}

0 commit comments

Comments
 (0)