Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

SQL query incidents regexp refers to none valid JSON string for github issues #421

Open
melezhik opened this issue Dec 22, 2022 · 0 comments
Labels
type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@melezhik
Copy link

https://github.com/GoogleCloudPlatform/fourkeys/blob/9e04246183bc8bbd854467262c1f6a7526dfcdfb/queries/incidents.sql#L26

Apparently '"name":"Incident"' is not a valid JSON string. As double quotes should be escaped within JSON strings ...

So metadata chunk for issue.labels should be either this:

with back quotes escaping:

{
	"issue": {
		"labels": "\"name\" : \"Incident\""
	}
}

or this:

without quotes at all:

{
	"issue": {
		"labels": "name:Incident"
	}
}

In either way current regexp does not search these cases. And for the second case it could be 'name:Incident'

@melezhik melezhik changed the title SQL query for incidents refers none valid JSON string for github issues SQL query incidents regexp refers to none valid JSON string for github issues Dec 22, 2022
@averikitsch averikitsch added type: question Request for information or clarification. Not an issue. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed type: question Request for information or clarification. Not an issue. labels Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants