diff options
Diffstat (limited to 'docs/how-to/migration-scripts/40-classify-actions.sh')
| -rwxr-xr-x | docs/how-to/migration-scripts/40-classify-actions.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/how-to/migration-scripts/40-classify-actions.sh b/docs/how-to/migration-scripts/40-classify-actions.sh index 1706e47..53c0f9d 100755 --- a/docs/how-to/migration-scripts/40-classify-actions.sh +++ b/docs/how-to/migration-scripts/40-classify-actions.sh | |||
| @@ -329,9 +329,11 @@ main() { | |||
| 329 | # ========================================================================= | 329 | # ========================================================================= |
| 330 | log_info "Parsing log-based categories..." | 330 | log_info "Parsing log-based categories..." |
| 331 | 331 | ||
| 332 | # Parse failures: repo<TAB>npub<TAB>kind<TAB>event_id<TAB>reason | 332 | # Parse failures: event_id<TAB>kind<TAB>reason<TAB>repo<TAB>npub |
| 333 | # Note: repo and npub are in columns 4 and 5 (enriched by Phase 4 from announcements.json) | ||
| 334 | # Some entries may have empty repo/npub if the event_id wasn't found in announcements | ||
| 333 | if [[ -f "$logs_dir/parse-failures.txt" ]] && file_has_content "$logs_dir/parse-failures.txt"; then | 335 | if [[ -f "$logs_dir/parse-failures.txt" ]] && file_has_content "$logs_dir/parse-failures.txt"; then |
| 334 | grep -v '^#' "$logs_dir/parse-failures.txt" | awk -F'\t' '{print $1 "|" $2}' | sort -u > "$tmp_dir/parse_failures.txt" | 336 | grep -v '^#' "$logs_dir/parse-failures.txt" | awk -F'\t' '{print $4 "|" $5}' | sort -u > "$tmp_dir/parse_failures.txt" |
| 335 | log_info "Found $(wc -l < "$tmp_dir/parse_failures.txt" | tr -d ' ') parse failure entries" | 337 | log_info "Found $(wc -l < "$tmp_dir/parse_failures.txt" | tr -d ' ') parse failure entries" |
| 336 | else | 338 | else |
| 337 | touch "$tmp_dir/parse_failures.txt" | 339 | touch "$tmp_dir/parse_failures.txt" |