feat (checker): Build extended summary for DB Migration Checker
Goal
Build extended summary for DB Migration Checker
TODO / How to implement
-
create a
summary
package to analyze artifacts and build a summary report- format results in a convenient way (tables, time series, comparison)
- use data from artifacts (duration, wals, long-lasting locks, etc.)
- check to know about available details:
- see the
Report Example
section below
-
generate the report in markdown format and store it as an artifact
- keep in mind, there might be a difference in the markdown format between Source Code Platforms (GitHub/GitLab/...)
-
make Platform integration optional
- for DB Migration Checker: authentification middleware
- for DLE: skip API calls to Platform in
startObservation
andstopObservation
endpoints - Note that personal tokens will be not available
Report Example
Summary
Status | Passed |
---|---|
Overall success | |
Dangerous locks are not observed during the session (5 intervals with locks of 10 allowed) |
|
Session duration is within allowed interval (spent 45s of the allowed 10m) |
DB stats | |
---|---|
DB size change | + 2.966 MiB |
db_size_before | 114.978 GiB |
db_size_after | 114.980 GiB |
wal_generated | 117.779 MiB |
Stat Statements | |
---|---|
Total runtime | 44s |
query_count | 12 |
duration_max | 12.345s |
total_time | 44s 901ms |
Locks
Mode | Count |
---|---|
AccessExclusiveLock | 2 |
Total | 2 |
Observed intervals
Started at | Duration | Count Locks |
---|---|---|
2022-06-16 08:05:25 UTC | 10s | 1 |
2022-06-16 08:05:35 UTC | 10s | |
2022-06-16 08:05:45 UTC | 10s | 1 |
2022-06-16 08:05:55 UTC | 10s | |
2022-06-16 08:06:05 UTC | 4s |
Lock details
{
"datname": "test_small",
"relation": "18870",
"transactionid": null,
"mode": "AccessExclusiveLock",
"locktype": "relation",
"granted": true,
"usename": "ci_agneum",
"query": "create index bid_idx on pgbench_accounts(bid);",
"query_start": "2022-06-16T06:06:19.149812+00:00",
"state": "active",
"wait_event_type": null,
"wait_event": null,
"xact_start": "2022-06-16T06:06:19.149812+00:00",
"xact_duration": "00:00:09.113186",
"query_duration": "00:00:09.113187",
"state_change": "2022-06-16T06:06:19.154899+00:00",
"state_changed_ago": "00:00:09.108101",
"pid": 48
}
{
"datname": "test_small",
"relation": "18870",
"transactionid": null,
"mode": "AccessExclusiveLock",
"locktype": "relation",
"granted": true,
"usename": "ci_agneum",
"query": "create index bid_idx on pgbench_accounts(bid);",
"query_start": "2022-06-16T06:06:19.149812+00:00",
"state": "active",
"wait_event_type": null,
"wait_event": null,
"xact_start": "2022-06-16T06:06:19.149812+00:00",
"xact_duration": "00:00:09.113117",
"query_duration": "00:00:09.113118",
"state_change": "2022-06-16T06:06:19.149814+00:00",
"state_changed_ago": "00:00:09.113117",
"pid": 47
}
Session Details
Name | Value |
---|---|
Session ID | 881 |
Clone ID | cb8ltpuuq4g4882ek58g |
Clone Created At | 2022-01-01T12:34:56.789Z |
Clone Data Timestamp | 2022-01-01T12:00:00.000Z |
Session Configs | |
observation_interval | 10 |
max_lock_duration | 10 |
max_duration | 3600 |
Artifacts
<Link(s) to available artifacts>
Acceptance criteria
The comment to the PR/MR provides complete and detailed information about database migrations:
- When, who, status
- Duration (in the Lab)
- Size changes, new objects
- Dangerous locks (!!)
- Error stats
- Transaction stats
- Query analysis summary
- Tuple stats
- WAL generated, checkpoitner/bgwriter stats
- temp files stats
- pg_stat_kcache data (table form – CPU, disk IO for whole migration)
Edited by Anna