Compare commits
No commits in common. "0c7e1e0ba40ecacc5820730c79d1d03309e591f0" and "fe6716b46834c5ee6cbe1278b822df8877fa6806" have entirely different histories.
0c7e1e0ba4
...
fe6716b468
@ -1,9 +1,5 @@
|
|||||||
FROM rust:latest
|
FROM rust:latest
|
||||||
|
|
||||||
# Install Rust nightly toolchain
|
|
||||||
RUN rustup toolchain install nightly && \
|
|
||||||
rustup default nightly
|
|
||||||
|
|
||||||
# Install cargo-aoc from specific GitHub repository
|
# Install cargo-aoc from specific GitHub repository
|
||||||
RUN cargo install --git https://github.com/ggriffiniii/cargo-aoc cargo-aoc
|
RUN cargo install --git https://github.com/ggriffiniii/cargo-aoc cargo-aoc
|
||||||
|
|
||||||
|
|||||||
14
aocsync.py
14
aocsync.py
@ -789,14 +789,12 @@ class CargoAOCRunner:
|
|||||||
f.write(f"{'='*80}\n\n")
|
f.write(f"{'='*80}\n\n")
|
||||||
|
|
||||||
if result.returncode != 0:
|
if result.returncode != 0:
|
||||||
logger.warning(f"cargo aoc bench failed for day {day} in {work_dir} (return code: {result.returncode}). Will still attempt to parse any available timing data.")
|
logger.warning(f"cargo aoc bench failed for day {day} in {work_dir}: {result.stderr}")
|
||||||
|
continue
|
||||||
|
|
||||||
# Log output for debugging if no results found
|
# Log output for debugging if no results found
|
||||||
if not result.stdout.strip() and not result.stderr.strip():
|
if not result.stdout.strip() and not result.stderr.strip():
|
||||||
logger.warning(f"No output from cargo aoc bench for {user} year {year} day {day}")
|
logger.warning(f"No output from cargo aoc bench for {user} year {year} day {day}")
|
||||||
# Skip parsing if there's no output at all
|
|
||||||
if result.returncode != 0:
|
|
||||||
continue
|
|
||||||
|
|
||||||
# Strip ANSI codes before parsing (for cleaner parsing)
|
# Strip ANSI codes before parsing (for cleaner parsing)
|
||||||
stdout_clean = CargoAOCRunner._strip_ansi_codes(result.stdout or "")
|
stdout_clean = CargoAOCRunner._strip_ansi_codes(result.stdout or "")
|
||||||
@ -806,23 +804,15 @@ class CargoAOCRunner:
|
|||||||
output_bytes = len(result.stdout.encode('utf-8')) if result.stdout else 0
|
output_bytes = len(result.stdout.encode('utf-8')) if result.stdout else 0
|
||||||
|
|
||||||
# Parse output for runtime information
|
# Parse output for runtime information
|
||||||
# Even if return code is non-zero (e.g., Part 2 panics), Part 1 timing might still be in output
|
|
||||||
day_results = CargoAOCRunner._parse_runtime_output(
|
day_results = CargoAOCRunner._parse_runtime_output(
|
||||||
stdout_clean, stderr_clean, day, year, user, git_rev, repo_url, output_bytes
|
stdout_clean, stderr_clean, day, year, user, git_rev, repo_url, output_bytes
|
||||||
)
|
)
|
||||||
if day_results:
|
if day_results:
|
||||||
logger.info(f"Parsed {len(day_results)} runtime result(s) for {user} year {year} day {day}")
|
logger.info(f"Parsed {len(day_results)} runtime result(s) for {user} year {year} day {day}")
|
||||||
if result.returncode != 0:
|
|
||||||
# Log which parts were successfully parsed despite the error
|
|
||||||
parts_parsed = [f"Part {r.part}" for r in day_results]
|
|
||||||
logger.info(f"Successfully parsed timing for {', '.join(parts_parsed)} despite non-zero return code")
|
|
||||||
else:
|
else:
|
||||||
# Log a sample of the output to help debug parsing issues
|
# Log a sample of the output to help debug parsing issues
|
||||||
output_sample = (result.stdout + "\n" + result.stderr).strip()[:500]
|
output_sample = (result.stdout + "\n" + result.stderr).strip()[:500]
|
||||||
logger.warning(f"No runtime data parsed for {user} year {year} day {day}. Output sample: {output_sample}")
|
logger.warning(f"No runtime data parsed for {user} year {year} day {day}. Output sample: {output_sample}")
|
||||||
# Only skip if we got no results AND there was an error
|
|
||||||
if result.returncode != 0:
|
|
||||||
continue
|
|
||||||
results.extend(day_results)
|
results.extend(day_results)
|
||||||
|
|
||||||
except subprocess.TimeoutExpired:
|
except subprocess.TimeoutExpired:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user