Skip to content

Commit eb9f185

Browse files
authored
Merge branch 'main' into highlight-tags-attr-proj
2 parents 497e968 + 0493411 commit eb9f185

File tree

6 files changed

+56
-27
lines changed

6 files changed

+56
-27
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@v5
2525

2626
- name: Unshallow
2727
run: git fetch --prune --unshallow
2828

29-
- uses: actions/setup-go@v5
29+
- uses: actions/setup-go@v6
3030
with:
3131
go-version-file: "go.mod"
3232
cache: true

.github/workflows/test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ jobs:
3333
runs-on: ubuntu-latest
3434
timeout-minutes: 5
3535
steps:
36-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37-
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
36+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
37+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
3838
with:
3939
go-version-file: "go.mod"
4040
cache: true
@@ -48,8 +48,8 @@ jobs:
4848
generate:
4949
runs-on: ubuntu-latest
5050
steps:
51-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
52-
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
51+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
52+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
5353
with:
5454
go-version-file: "go.mod"
5555
cache: true
@@ -100,8 +100,8 @@ jobs:
100100
- terraform: "1.9.*"
101101
is-pr: true
102102
steps:
103-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
104-
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
103+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
104+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
105105
with:
106106
go-version-file: "go.mod"
107107
cache: true

.github/workflows/update-sentrydata.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ jobs:
1313
generate:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
17-
- uses: actions/setup-go@v5
16+
- uses: actions/checkout@v5
17+
- uses: actions/setup-go@v6
1818
with:
1919
go-version-file: "go.mod"
2020
cache: true

docs/resources/project.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ resource "sentry_project" "default" {
6666
- `filters` (Attributes) Custom filters for this project. (see [below for nested schema](#nestedatt--filters))
6767
- `fingerprinting_rules` (String) This can be used to modify the fingerprint rules on the server with custom rules. Rules follow the pattern `matcher:glob -> fingerprint, values`. To learn more about fingerprint rules, [read the docs](https://docs.sentry.io/concepts/data-management/event-grouping/fingerprint-rules/).
6868
- `grouping_enhancements` (String) This can be used to enhance the grouping algorithm with custom rules. Rules follow the pattern `matcher:glob [v^]?[+-]flag`. To learn more about stack trace rules, [read the docs](https://docs.sentry.io/concepts/data-management/event-grouping/stack-trace-rules/).
69-
- `platform` (String) The platform for this project. Use `other` for platforms not listed. Valid values are: `other`, `android`, `apple`, `apple-ios`, `apple-macos`, `bun`, `capacitor`, `cordova`, `dart`, `deno`, `dotnet`, `dotnet-aspnet`, `dotnet-aspnetcore`, `dotnet-awslambda`, `dotnet-gcpfunctions`, `dotnet-maui`, `dotnet-uwp`, `dotnet-winforms`, `dotnet-wpf`, `dotnet-xamarin`, `electron`, `elixir`, `flutter`, `go`, `go-echo`, `go-fasthttp`, `go-fiber`, `go-gin`, `go-http`, `go-iris`, `go-martini`, `go-negroni`, `godot`, `ionic`, `java`, `java-log4j2`, `java-logback`, `java-spring`, `java-spring-boot`, `javascript`, `javascript-angular`, `javascript-astro`, `javascript-ember`, `javascript-gatsby`, `javascript-nextjs`, `javascript-nuxt`, `javascript-react`, `javascript-react-router`, `javascript-remix`, `javascript-solid`, `javascript-solidstart`, `javascript-svelte`, `javascript-sveltekit`, `javascript-tanstackstart-react`, `javascript-vue`, `kotlin`, `minidump`, `native`, `native-qt`, `nintendo-switch`, `nintendo-switch-2`, `node`, `node-awslambda`, `node-azurefunctions`, `node-cloudflare-pages`, `node-cloudflare-workers`, `node-connect`, `node-express`, `node-fastify`, `node-gcpfunctions`, `node-hapi`, `node-koa`, `node-nestjs`, `php`, `php-laravel`, `php-symfony`, `playstation`, `powershell`, `python`, `python-aiohttp`, `python-asgi`, `python-awslambda`, `python-bottle`, `python-celery`, `python-chalice`, `python-django`, `python-falcon`, `python-fastapi`, `python-flask`, `python-gcpfunctions`, `python-pylons`, `python-pymongo`, `python-pyramid`, `python-quart`, `python-rq`, `python-sanic`, `python-serverless`, `python-starlette`, `python-tornado`, `python-tryton`, `python-wsgi`, `react-native`, `ruby`, `ruby-rack`, `ruby-rails`, `rust`, `unity`, `unreal`, and `xbox`.
69+
- `platform` (String) The platform for this project. Use `other` for platforms not listed. Valid values are: `other`, `android`, `apple`, `apple-ios`, `apple-macos`, `bun`, `capacitor`, `cordova`, `dart`, `deno`, `dotnet`, `dotnet-aspnet`, `dotnet-aspnetcore`, `dotnet-awslambda`, `dotnet-gcpfunctions`, `dotnet-maui`, `dotnet-uwp`, `dotnet-winforms`, `dotnet-wpf`, `dotnet-xamarin`, `electron`, `elixir`, `flutter`, `go`, `go-echo`, `go-fasthttp`, `go-fiber`, `go-gin`, `go-http`, `go-iris`, `go-martini`, `go-negroni`, `godot`, `ionic`, `java`, `java-log4j2`, `java-logback`, `java-spring`, `java-spring-boot`, `javascript`, `javascript-angular`, `javascript-astro`, `javascript-ember`, `javascript-gatsby`, `javascript-nextjs`, `javascript-nuxt`, `javascript-react`, `javascript-react-router`, `javascript-remix`, `javascript-solid`, `javascript-solidstart`, `javascript-svelte`, `javascript-sveltekit`, `javascript-tanstackstart-react`, `javascript-vue`, `kotlin`, `minidump`, `native`, `native-qt`, `nintendo-switch`, `node`, `node-awslambda`, `node-azurefunctions`, `node-cloudflare-pages`, `node-cloudflare-workers`, `node-connect`, `node-express`, `node-fastify`, `node-gcpfunctions`, `node-hapi`, `node-hono`, `node-koa`, `node-nestjs`, `php`, `php-laravel`, `php-symfony`, `playstation`, `powershell`, `python`, `python-aiohttp`, `python-asgi`, `python-awslambda`, `python-bottle`, `python-celery`, `python-chalice`, `python-django`, `python-falcon`, `python-fastapi`, `python-flask`, `python-gcpfunctions`, `python-pylons`, `python-pymongo`, `python-pyramid`, `python-quart`, `python-rq`, `python-sanic`, `python-serverless`, `python-starlette`, `python-tornado`, `python-tryton`, `python-wsgi`, `react-native`, `ruby`, `ruby-rack`, `ruby-rails`, `rust`, `unity`, `unreal`, and `xbox`.
7070
- `resolve_age` (Number) Hours in which an issue is automatically resolve if not seen after this amount of time.
7171
- `slug` (String) The optional slug for this project.
7272

internal/sentrydata/sentrydata.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package sentrydata
22

3-
// https://github.com/getsentry/sentry/blob/master/src/sentry/constants.py#L238-L245
3+
// https://github.com/getsentry/sentry/blob/master/src/sentry/constants.py#L246-L253
44
var LogLevels = []string{
55
"sample",
66
"debug",
@@ -10,7 +10,7 @@ var LogLevels = []string{
1010
"fatal",
1111
}
1212

13-
// https://github.com/getsentry/sentry/blob/master/src/sentry/constants.py#L238-L245
13+
// https://github.com/getsentry/sentry/blob/master/src/sentry/constants.py#L246-L253
1414
var LogLevelNameToId = map[string]string{
1515
"sample": "0",
1616
"debug": "10",
@@ -20,7 +20,7 @@ var LogLevelNameToId = map[string]string{
2020
"fatal": "50",
2121
}
2222

23-
// https://github.com/getsentry/sentry/blob/master/src/sentry/constants.py#L238-L245
23+
// https://github.com/getsentry/sentry/blob/master/src/sentry/constants.py#L246-L253
2424
var LogLevelIdToName = map[string]string{
2525
"0": "sample",
2626
"10": "debug",
@@ -210,7 +210,7 @@ var DashboardWidgetDisplayTypes = []string{
210210
"top_n",
211211
}
212212

213-
// https://github.com/getsentry/sentry/blob/master/src/sentry/models/project.py#L62-L171
213+
// https://github.com/getsentry/sentry/blob/master/src/sentry/models/project.py#L61-L170
214214
var Platforms = []string{
215215
"other",
216216
"android",
@@ -272,7 +272,6 @@ var Platforms = []string{
272272
"native",
273273
"native-qt",
274274
"nintendo-switch",
275-
"nintendo-switch-2",
276275
"node",
277276
"node-awslambda",
278277
"node-azurefunctions",
@@ -283,6 +282,7 @@ var Platforms = []string{
283282
"node-fastify",
284283
"node-gcpfunctions",
285284
"node-hapi",
285+
"node-hono",
286286
"node-koa",
287287
"node-nestjs",
288288
"php",

sentry/resource_sentry_organization_member.go

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,18 @@ func resourceSentryOrganizationMemberCreate(ctx context.Context, d *schema.Resou
8787
"email": params.Email,
8888
"org": org,
8989
})
90+
9091
httpResp, err := apiClient.CreateOrganizationMemberWithResponse(ctx, org, params)
9192
if err != nil {
9293
return diag.FromErr(err)
93-
} else if httpResp.StatusCode() != http.StatusCreated || httpResp.JSON201 == nil {
94-
return diag.FromErr(fmt.Errorf("unexpected status code: %d", httpResp.StatusCode()))
94+
}
95+
96+
if httpResp.StatusCode() != http.StatusCreated {
97+
return diag.FromErr(fmt.Errorf("failed to create organization member, got status %d: %s", httpResp.StatusCode(), string(httpResp.Body)))
98+
}
99+
100+
if httpResp.JSON201 == nil {
101+
return diag.FromErr(fmt.Errorf("failed to create organization member: empty response body"))
95102
}
96103

97104
member := httpResp.JSON201
@@ -115,11 +122,19 @@ func resourceSentryOrganizationMemberRead(ctx context.Context, d *schema.Resourc
115122
httpResp, err := apiClient.GetOrganizationMemberWithResponse(ctx, org, memberID)
116123
if err != nil {
117124
return diag.FromErr(err)
118-
} else if httpResp.StatusCode() == http.StatusNotFound {
125+
}
126+
127+
if httpResp.StatusCode() == http.StatusNotFound {
119128
d.SetId("")
120129
return nil
121-
} else if httpResp.StatusCode() != http.StatusOK || httpResp.JSON200 == nil {
122-
return diag.FromErr(fmt.Errorf("unexpected status code: %d", httpResp.StatusCode()))
130+
}
131+
132+
if httpResp.StatusCode() != http.StatusOK {
133+
return diag.FromErr(fmt.Errorf("failed to read organization member, got status %d: %s", httpResp.StatusCode(), string(httpResp.Body)))
134+
}
135+
136+
if httpResp.JSON200 == nil {
137+
return diag.FromErr(fmt.Errorf("failed to read organization member: empty response body"))
123138
}
124139

125140
member := httpResp.JSON200
@@ -147,8 +162,14 @@ func resourceSentryOrganizationMemberUpdate(ctx context.Context, d *schema.Resou
147162
getHttpResp, err := apiClient.GetOrganizationMemberWithResponse(ctx, org, memberID)
148163
if err != nil {
149164
return diag.FromErr(err)
150-
} else if getHttpResp.StatusCode() != http.StatusOK || getHttpResp.JSON200 == nil {
151-
return diag.FromErr(fmt.Errorf("unexpected status code: %d", getHttpResp.StatusCode()))
165+
}
166+
167+
if getHttpResp.StatusCode() != http.StatusOK {
168+
return diag.FromErr(fmt.Errorf("failed to read organization member for update, got status %d: %s", getHttpResp.StatusCode(), string(getHttpResp.Body)))
169+
}
170+
171+
if getHttpResp.JSON200 == nil {
172+
return diag.FromErr(fmt.Errorf("failed to read organization member for update: empty response body"))
152173
}
153174
orgMember := getHttpResp.JSON200
154175

@@ -174,8 +195,14 @@ func resourceSentryOrganizationMemberUpdate(ctx context.Context, d *schema.Resou
174195
httpResp, err := apiClient.UpdateOrganizationMemberWithResponse(ctx, org, memberID, params)
175196
if err != nil {
176197
return diag.FromErr(err)
177-
} else if httpResp.StatusCode() != http.StatusOK || httpResp.JSON200 == nil {
178-
return diag.FromErr(fmt.Errorf("unexpected status code: %d", httpResp.StatusCode()))
198+
}
199+
200+
if httpResp.StatusCode() != http.StatusOK {
201+
return diag.FromErr(fmt.Errorf("failed to update organization member, got status %d: %s", httpResp.StatusCode(), string(httpResp.Body)))
202+
}
203+
204+
if httpResp.JSON200 == nil {
205+
return diag.FromErr(fmt.Errorf("failed to update organization member: empty response body"))
179206
}
180207

181208
member := httpResp.JSON200
@@ -199,8 +226,10 @@ func resourceSentryOrganizationMemberDelete(ctx context.Context, d *schema.Resou
199226
httpResp, err := apiClient.DeleteOrganizationMemberWithResponse(ctx, org, memberID)
200227
if err != nil {
201228
return diag.FromErr(err)
202-
} else if httpResp.StatusCode() != http.StatusNoContent {
203-
return diag.FromErr(fmt.Errorf("unexpected status code: %d", httpResp.StatusCode()))
229+
}
230+
231+
if httpResp.StatusCode() != http.StatusNoContent {
232+
return diag.FromErr(fmt.Errorf("failed to delete organization member, got status %d: %s", httpResp.StatusCode(), string(httpResp.Body)))
204233
}
205234

206235
return nil

0 commit comments

Comments
 (0)