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

migrate code from googleapis/python-error-reporting #8480

Merged
merged 43 commits into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
51a3baa
chore: move samples from python-docs-sample (#18)
arithmetic1728 Aug 13, 2020
ff496e0
chore(deps): update dependency google-cloud-error-reporting to v1 (#26)
renovate-bot Oct 16, 2020
033d786
chore(deps): update dependency google-cloud-error-reporting to v1.1.0…
renovate-bot Dec 2, 2020
c263ac6
chore(deps): update dependency google-cloud-error-reporting to v1.1.1…
renovate-bot Mar 5, 2021
12dd93a
chore(deps): update dependency google-cloud-error-reporting to v1.1.2…
renovate-bot Apr 8, 2021
72e3f9e
chore(deps): update dependency pytest to v6.2.4 (#117)
renovate-bot May 6, 2021
47d4a8a
chore(deps): update dependency google-cloud-error-reporting to v1.2.0…
renovate-bot Jul 13, 2021
8e86c82
chore(deps): update dependency google-cloud-error-reporting to v1.2.1…
renovate-bot Jul 22, 2021
b8b1d9e
chore(deps): update dependency google-cloud-error-reporting to v1.2.2…
renovate-bot Jul 28, 2021
78508fc
chore(deps): update dependency pytest to v6.2.5 (#168)
renovate-bot Aug 31, 2021
6b06bfe
chore(deps): update dependency google-cloud-error-reporting to v1.2.3…
renovate-bot Sep 28, 2021
56d5fe0
chore(deps): update dependency google-cloud-error-reporting to v1.3.0…
renovate-bot Oct 11, 2021
4a4bb00
chore(deps): update dependency google-cloud-error-reporting to v1.4.0…
renovate-bot Oct 21, 2021
955cde2
chore(deps): update dependency google-cloud-error-reporting to v1.4.1…
renovate-bot Nov 2, 2021
051fe8b
chore(deps): update all dependencies (#224)
renovate-bot Feb 7, 2022
69019a9
chore(deps): update dependency pytest to v7.0.1 (#229)
renovate-bot Feb 14, 2022
b539f89
chore(deps): update dependency google-cloud-error-reporting to v1.5.0…
renovate-bot Feb 23, 2022
bfb6f0a
chore(deps): update dependency google-cloud-error-reporting to v1.5.1…
renovate-bot Mar 8, 2022
eace1b0
chore(deps): update dependency pytest to v7.1.0 (#247)
renovate-bot Mar 13, 2022
7117a86
chore(deps): update dependency pytest to v7.1.1 (#249)
renovate-bot Mar 17, 2022
2b87555
chore(deps): update dependency google-cloud-error-reporting to v1.5.2…
renovate-bot Apr 16, 2022
133dfde
chore(deps): update dependency pytest to v7.1.2 (#270)
renovate-bot Apr 25, 2022
b5daf79
chore(deps): update all dependencies (#351)
renovate-bot Jul 14, 2022
6812f23
chore(deps): update all dependencies (#363)
renovate-bot Aug 2, 2022
9f44bbf
chore(deps): update dependency google-cloud-error-reporting to v1.6.1…
renovate-bot Aug 19, 2022
3025c5d
chore(deps): update dependency pytest to v7.1.3 (#381)
renovate-bot Sep 6, 2022
fb6b876
chore(deps): update dependency google-cloud-error-reporting to v1.6.2…
renovate-bot Oct 4, 2022
f62bee7
chore(deps): update dependency google-cloud-error-reporting to v1.6.3…
renovate-bot Oct 10, 2022
db60f6e
chore(deps): update dependency pytest to v7.2.0 (#395)
renovate-bot Oct 26, 2022
9526db8
Merge remote-tracking branch 'migration/main' into python-error-repor…
msampathkumar Nov 9, 2022
0e75c8c
Mulitple update
msampathkumar Nov 9, 2022
6e19c76
fix closing tag for error_reporting_setup_python_manual
msampathkumar Nov 9, 2022
810cb45
Merge branch 'main' into python-error-reporting-migration
msampathkumar Nov 9, 2022
38d7471
Merge branch 'main' into python-error-reporting-migration
msampathkumar Nov 11, 2022
7faa958
Merge branch 'main' into python-error-reporting-migration
msampathkumar Nov 11, 2022
08b3dce
Merge branch 'main' into python-error-reporting-migration
msampathkumar Nov 14, 2022
bd176e5
Clear `error_reporting` tag
msampathkumar Nov 14, 2022
feb4966
Update code owners as found in https://github.com/googleapis/python-e…
msampathkumar Nov 14, 2022
b450276
Update code owners as found in https://github.com/googleapis/python-e…
msampathkumar Nov 14, 2022
0e2a1a4
Merge branch 'main' into python-error-reporting-migration
msampathkumar Nov 15, 2022
f6c99eb
Update .github/CODEOWNERS
msampathkumar Nov 15, 2022
fc08600
Merge branch 'main' into python-error-reporting-migration
msampathkumar Nov 15, 2022
9c8970f
Update CODEOWNERS & blunderbuss.yml
msampathkumar Nov 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
/dns/**/* @GoogleCloudPlatform/python-samples-reviewers
/endpoints/**/* @GoogleCloudPlatform/python-samples-reviewers
/eventarc/**/* @GoogleCloudPlatform/aap-dpes @GoogleCloudPlatform/python-samples-reviewers
/error_reporting/snippets/* @googleapis/python-samples-reviewers @googleapis/api-logging
msampathkumar marked this conversation as resolved.
Show resolved Hide resolved
msampathkumar marked this conversation as resolved.
Show resolved Hide resolved
/firestore/**/* @GoogleCloudPlatform/cloud-native-db-dpes @GoogleCloudPlatform/python-samples-reviewers
/functions/**/* @GoogleCloudPlatform/aap-dpes @GoogleCloudPlatform/python-samples-reviewers
/functions/spanner/* @GoogleCloudPlatform/api-spanner-python @GoogleCloudPlatform/python-samples-reviewers
Expand Down
5 changes: 5 additions & 0 deletions .github/blunderbuss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ assign_prs_by:
- 'api: iot'
to:
- GoogleCloudPlatform/api-iot
- labels:
- 'api: clouderrorreporting'
to:
- googleapis/python-samples-reviewers
- googleapis/api-logging
msampathkumar marked this conversation as resolved.
Show resolved Hide resolved
- labels:
- 'api: talent'
to:
Expand Down
3 changes: 0 additions & 3 deletions error_reporting/README.md

This file was deleted.

46 changes: 46 additions & 0 deletions error_reporting/snippets/report_exception.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env python
#
# Copyright 2022 Google, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


# [START error_reporting_quickstart]
# [START error_reporting_setup_python]
def simulate_error():
from google.cloud import error_reporting

client = error_reporting.Client()
try:
# simulate calling a method that's not defined
raise NameError
except Exception:
client.report_exception()
# [END error_reporting_setup_python]
# [END error_reporting_quickstart]


# [START error_reporting_manual]
# [START error_reporting_setup_python_manual]
def report_manual_error():
from google.cloud import error_reporting

client = error_reporting.Client()
client.report("An error has occurred.")
# [END error_reporting_setup_python_manual]
# [END error_reporting_manual]


if __name__ == '__main__':
simulate_error()
report_manual_error()
25 changes: 25 additions & 0 deletions error_reporting/snippets/report_exception_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env python
#
# Copyright 2022 Google, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import report_exception


def test_error_sends():
report_exception.simulate_error()


def test_manual_error_sends():
report_exception.report_manual_error()
1 change: 1 addition & 0 deletions error_reporting/snippets/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==7.2.0
1 change: 1 addition & 0 deletions error_reporting/snippets/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google-cloud-error-reporting==1.6.3