fix(ci): handle missing server log files in cleanup steps#768
fix(ci): handle missing server log files in cleanup steps#768TimeToBuildBob wants to merge 1 commit intoActivityWatch:masterfrom
Conversation
The "Print server logs" and "Move logs to subdir" steps fail when aw-server-rust master doesn't write logs to the expected path (~/.cache/activitywatch/log/*/*.log). The glob expands to a literal string that cat/mv can't find, causing the step to exit with code 1. Fix: use `shopt -s nullglob` + loop so empty globs produce no iterations instead of a failed glob expansion.
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to 1b09b62 in 5 seconds. Click for details.
- Reviewed
26lines of code in1files - Skipped
0files when reviewing. - Skipped posting
0draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
Workflow ID: wflow_EJgJpDAmHyE574Hj
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Greptile SummaryFixed CI cleanup steps that were failing when Changes:
This ensures the "aw-server-rust master" test job completes successfully even when log files don't exist, while still collecting logs when they are present in other test configurations. Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 1b09b62 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #768 +/- ##
=======================================
Coverage 25.60% 25.60%
=======================================
Files 30 30
Lines 1746 1746
Branches 319 319
=======================================
Hits 447 447
- Misses 1233 1277 +44
+ Partials 66 22 -44 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
But then where are the log files written? Was this a regression from our recent appdirs -> dirs migration? L Should probably figure out where the log file went instead of ignoring the failed expansion. |
|
Good catch — you're right, this is papering over a real regression. I investigated and the issue is in aw-server-rust PR ActivityWatch/aw-server-rust#562 (appdirs → dirs migration). The old
The The fix should be in aw-server-rust's This CI cleanup PR should probably wait until that's fixed, since the glob path I'll submit a fix PR to aw-server-rust. |
|
Fix PR submitted: ActivityWatch/aw-server-rust#565 — restores the |
|
That PR was merged! So this PR shouldn't be needed anymore. Closing. |
Summary
The CI cleanup steps ("Print server logs" and "Move logs to subdir") fail when
aw-server-rust masterdoesn't write log files to~/.cache/activitywatch/log/*/*.log. The bash glob expands to a literal path thatcat/mvcan't find, causing the step to exit with code 1.This has been causing the "Test (node-20, py-3.9, aw-server-rust master)" job to appear as failed even when all actual tests pass.
Fix: Use
shopt -s nullglobwith a loop so empty globs produce zero iterations instead of a failed expansion.Test plan
Important
Fix CI cleanup steps in
nodejs.ymlto handle missing log files usingshopt -s nullglob.shopt -s nullglobinPrint server logs to consoleandMove logs to subdirsteps innodejs.ymlto handle missing log files gracefully.aw-server-rust masterdoes not produce log files.This description was created by
for 1b09b62. You can customize this summary. It will automatically update as commits are pushed.