Skip to content

Commit

Permalink
Ensure stack_id and org_id are ints (#3458)
Browse files Browse the repository at this point in the history
# What this PR does
When reading plugin provisioning data if the value was > 999999 it was
converted to exponential notation by the template which the backend
could not understand as an ID. This makes sure it is written as an int.

## Which issue(s) this PR fixes

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
  • Loading branch information
mderynck authored Nov 29, 2023
1 parent 7aa78f5 commit f1518cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- User profile UI tweaks ([#3443](https://github.com/grafana/oncall/pull/3443))
- Ensure stack_id and org_id are ints @mderynck [(#3458](https://github.com/grafana/oncall/pull/3458))

## v1.3.64 (2023-11-28)

Expand Down
10 changes: 5 additions & 5 deletions grafana-plugin/src/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"headers": [
{
"name": "X-Instance-Context",
"content": "{ \"stack_id\": \"{{ .JsonData.stackId }}\", \"org_id\": \"{{ .JsonData.orgId }}\", \"grafana_token\": \"{{ .SecureJsonData.grafanaToken }}\" }"
"content": "{ \"stack_id\": \"{{ printf \"%.0f\" .JsonData.stackId }}\", \"org_id\": \"{{ printf \"%.0f\" .JsonData.orgId }}\", \"grafana_token\": \"{{ .SecureJsonData.grafanaToken }}\" }"
},
{
"name": "Authorization",
Expand All @@ -134,7 +134,7 @@
"headers": [
{
"name": "X-Instance-Context",
"content": "{ \"stack_id\": \"{{ .JsonData.stackId }}\", \"org_id\": \"{{ .JsonData.orgId }}\" }"
"content": "{ \"stack_id\": \"{{ printf \"%.0f\" .JsonData.stackId }}\", \"org_id\": \"{{ printf \"%.0f\" .JsonData.orgId }}\" }"
},
{
"name": "Authorization",
Expand All @@ -149,7 +149,7 @@
"headers": [
{
"name": "X-Instance-Context",
"content": "{ \"stack_id\": \"{{ .JsonData.stackId }}\", \"org_id\": \"{{ .JsonData.orgId }}\" }"
"content": "{ \"stack_id\": \"{{ printf \"%.0f\" .JsonData.stackId }}\", \"org_id\": \"{{ printf \"%.0f\" .JsonData.orgId }}\" }"
},
{
"name": "Authorization",
Expand All @@ -164,7 +164,7 @@
"headers": [
{
"name": "X-Instance-Context",
"content": "{ \"stack_id\": \"{{ .JsonData.stackId }}\", \"org_id\": \"{{ .JsonData.orgId }}\" }"
"content": "{ \"stack_id\": \"{{ printf \"%.0f\" .JsonData.stackId }}\", \"org_id\": \"{{ printf \"%.0f\" .JsonData.orgId }}\" }"
},
{
"name": "Authorization",
Expand All @@ -179,7 +179,7 @@
"headers": [
{
"name": "X-Instance-Context",
"content": "{ \"stack_id\": \"{{ .JsonData.stackId }}\", \"org_id\": \"{{ .JsonData.orgId }}\" }"
"content": "{ \"stack_id\": \"{{ printf \"%.0f\" .JsonData.stackId }}\", \"org_id\": \"{{ printf \"%.0f\" .JsonData.orgId }}\" }"
},
{
"name": "Authorization",
Expand Down

0 comments on commit f1518cb

Please sign in to comment.