You've already forked AstralRinth
forked from didirus/AstralRinth
Fix changing Delphi report issue detail verdict if already exists (#5172)
* Fix changing Delphi report issue detail verdict if already exists * cargo sqlx prepare
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"db_name": "PostgreSQL",
|
"db_name": "PostgreSQL",
|
||||||
"query": "\n INSERT INTO delphi_issue_detail_verdicts (\n project_id,\n detail_key,\n verdict\n )\n SELECT\n didws.project_id,\n didws.key,\n $1\n FROM delphi_issue_details_with_statuses didws\n INNER JOIN delphi_report_issues dri ON dri.id = didws.issue_id\n WHERE\n didws.id = $2\n -- see delphi.rs todo comment\n AND dri.issue_type != '__dummy'\n ",
|
"query": "\n INSERT INTO delphi_issue_detail_verdicts (\n project_id,\n detail_key,\n verdict\n )\n SELECT\n didws.project_id,\n didws.key,\n $1\n FROM delphi_issue_details_with_statuses didws\n INNER JOIN delphi_report_issues dri ON dri.id = didws.issue_id\n WHERE\n didws.id = $2\n -- see delphi.rs todo comment\n AND dri.issue_type != '__dummy'\n ON CONFLICT (project_id, detail_key)\n DO UPDATE SET verdict = EXCLUDED.verdict\n ",
|
||||||
"describe": {
|
"describe": {
|
||||||
"columns": [],
|
"columns": [],
|
||||||
"parameters": {
|
"parameters": {
|
||||||
@@ -22,5 +22,5 @@
|
|||||||
},
|
},
|
||||||
"nullable": []
|
"nullable": []
|
||||||
},
|
},
|
||||||
"hash": "cfe6c9e2abba8e9c1cd7aa799a6a95f2732f1a7611ea6f7ce49cd7e077761ebf"
|
"hash": "b767ca57e4d8abf164a951ce77f1e721b955fc4f2a4d4ac196611bc8d6b04706"
|
||||||
}
|
}
|
||||||
@@ -1176,6 +1176,8 @@ async fn update_issue_detail(
|
|||||||
didws.id = $2
|
didws.id = $2
|
||||||
-- see delphi.rs todo comment
|
-- see delphi.rs todo comment
|
||||||
AND dri.issue_type != '__dummy'
|
AND dri.issue_type != '__dummy'
|
||||||
|
ON CONFLICT (project_id, detail_key)
|
||||||
|
DO UPDATE SET verdict = EXCLUDED.verdict
|
||||||
"#,
|
"#,
|
||||||
status as _,
|
status as _,
|
||||||
issue_detail_id as _,
|
issue_detail_id as _,
|
||||||
|
|||||||
@@ -12,8 +12,9 @@ services:
|
|||||||
POSTGRES_USER: labrinth
|
POSTGRES_USER: labrinth
|
||||||
POSTGRES_PASSWORD: labrinth
|
POSTGRES_PASSWORD: labrinth
|
||||||
POSTGRES_HOST_AUTH_METHOD: trust
|
POSTGRES_HOST_AUTH_METHOD: trust
|
||||||
|
PGUSER: labrinth
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ 'CMD', 'pg_isready', '-U', 'labrinth' ]
|
test: ['CMD', 'pg_isready', '-U', 'labrinth']
|
||||||
interval: 3s
|
interval: 3s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
@@ -32,7 +33,7 @@ services:
|
|||||||
MEILI_HTTP_PAYLOAD_SIZE_LIMIT: 107374182400
|
MEILI_HTTP_PAYLOAD_SIZE_LIMIT: 107374182400
|
||||||
MEILI_LOG_LEVEL: warn
|
MEILI_LOG_LEVEL: warn
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ 'CMD', 'curl', '--fail', 'http://localhost:7700/health' ]
|
test: ['CMD', 'curl', '--fail', 'http://localhost:7700/health']
|
||||||
interval: 3s
|
interval: 3s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
@@ -45,7 +46,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- redis-data:/data
|
- redis-data:/data
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ 'CMD', 'redis-cli', 'PING' ]
|
test: ['CMD', 'redis-cli', 'PING']
|
||||||
interval: 3s
|
interval: 3s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
@@ -58,7 +59,7 @@ services:
|
|||||||
CLICKHOUSE_USER: default
|
CLICKHOUSE_USER: default
|
||||||
CLICKHOUSE_PASSWORD: default
|
CLICKHOUSE_PASSWORD: default
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ 'CMD-SHELL', 'clickhouse-client --query "SELECT 1"' ]
|
test: ['CMD-SHELL', 'clickhouse-client --query "SELECT 1"']
|
||||||
interval: 3s
|
interval: 3s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
@@ -71,7 +72,14 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
MP_ENABLE_SPAMASSASSIN: postmark
|
MP_ENABLE_SPAMASSASSIN: postmark
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ 'CMD', 'wget', '-q', '-O/dev/null', 'http://localhost:8025/api/v1/info' ]
|
test:
|
||||||
|
[
|
||||||
|
'CMD',
|
||||||
|
'wget',
|
||||||
|
'-q',
|
||||||
|
'-O/dev/null',
|
||||||
|
'http://localhost:8025/api/v1/info',
|
||||||
|
]
|
||||||
interval: 3s
|
interval: 3s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
@@ -122,7 +130,8 @@ services:
|
|||||||
LABRINTH_ENDPOINT: http://host.docker.internal:8000/_internal/delphi/ingest
|
LABRINTH_ENDPOINT: http://host.docker.internal:8000/_internal/delphi/ingest
|
||||||
LABRINTH_ADMIN_KEY: feedbeef
|
LABRINTH_ADMIN_KEY: feedbeef
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ 'CMD', 'wget', '-q', '-O/dev/null', 'http://localhost:59999/health' ]
|
test:
|
||||||
|
['CMD', 'wget', '-q', '-O/dev/null', 'http://localhost:59999/health']
|
||||||
interval: 3s
|
interval: 3s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
@@ -153,7 +162,7 @@ services:
|
|||||||
MEILI_HTTP_PAYLOAD_SIZE_LIMIT: 107374182400
|
MEILI_HTTP_PAYLOAD_SIZE_LIMIT: 107374182400
|
||||||
MEILI_LOG_LEVEL: warn
|
MEILI_LOG_LEVEL: warn
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ 'CMD', 'curl', '--fail', 'http://localhost:7700/health' ]
|
test: ['CMD', 'curl', '--fail', 'http://localhost:7700/health']
|
||||||
interval: 3s
|
interval: 3s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
|||||||
Reference in New Issue
Block a user