Thanks to visit codestin.com
Credit goes to github.com

Skip to content

export_plots_timeout: Add docs and increase default to 60s#3433

Merged
ewels merged 4 commits into
mainfrom
claude/plotly-timeout-investigation-01Qd4R97abXZ6B2DJCz1pgUG
Dec 11, 2025
Merged

export_plots_timeout: Add docs and increase default to 60s#3433
ewels merged 4 commits into
mainfrom
claude/plotly-timeout-investigation-01Qd4R97abXZ6B2DJCz1pgUG

Conversation

@ewels

@ewels ewels commented Dec 11, 2025

Copy link
Copy Markdown
Member
  • Document the export_plots_timeout config option in the docs
  • Increase default timeout from 30s to 60s to reduce timeouts with Kaleido
  • Update config schema description to be more informative
  • Regenerate JSON schema

- Document the export_plots_timeout config option in the docs
- Increase default timeout from 30s to 60s to reduce timeouts with Kaleido
- Update config schema description to be more informative
- Regenerate JSON schema
@claude

claude Bot commented Dec 11, 2025

Copy link
Copy Markdown

PR Review: Add documentation for export_plots_timeout and increase default to 60s

Summary: This is a well-structured PR that improves user experience by increasing the timeout for plot exports and adding comprehensive documentation. The changes are minimal, focused, and address a real pain point with Kaleido timeouts. ✅ Approved with minor formatting fixes needed.

Detailed Review

✅ Code Quality and Best Practices

Excellent:

  • Changes are minimal and focused on a single concern
  • Consistent updates across all relevant locations (config defaults, code, schema, docs)
  • Good use of fallback values in the code: config.export_plots_timeout if hasattr(config, "export_plots_timeout") else 60
  • Proper regeneration of JSON schema from the Python schema definition

Documentation:

  • The new documentation section in running_multiqc.md is clear and helpful
  • Explains both the "why" (Kaleido can hang) and the "how" (config file and env var)
  • Good choice linking to Kaleido's GitHub for users who want more context

🔧 Issues Found

Formatting Issues (CI Failures):
The pre-commit checks are failing due to formatting issues that can be easily fixed:

  1. Prettier modified docs/markdown/getting_started/running_multiqc.md:

    • Line 206 needs the comment moved: export_plots_timeout: 60 # seconds (no double space)
  2. Ruff modified multiqc/utils/config_schema.py:

    • One file needs reformatting (likely whitespace)
  3. Config schema JSON was modified by prettier (indentation changes)

To fix: Run pre-commit run --all-files locally and commit the formatting changes.

🎯 Potential Improvements

Schema Description (multiqc/utils/config_schema.py:128):
The updated description is good, but could be slightly more concise:

# Current:
description="Timeout in seconds for exporting each plot to a static image (default: 60)"

# Suggestion:
description="Timeout in seconds for exporting each plot to a static image. Kaleido can occasionally hang; if timeout is exceeded, plot export is skipped and report generation continues. Default: 60"

This would match the detailed explanation in the documentation and provide context for why the timeout exists.

⚡ Performance Considerations

Positive Impact:

  • Doubling the timeout from 30s to 60s should significantly reduce the number of plots that timeout with Kaleido
  • The timeout is per-plot, so this doesn't add unnecessary wait time for successful exports
  • The graceful degradation (skipping failed plots) ensures reports still complete

No Concerns:

  • The timeout is already implemented efficiently using process joins
  • No performance regressions expected

🔒 Security Considerations

No Issues:

  • Changes are configuration-only, no security implications
  • Timeout values are validated by the schema as integers
  • No user input is directly executed

🧪 Test Coverage

Observations:

  • No tests were added or modified
  • The existing test suite should cover this change adequately since it's just a default value change

Recommendation (Optional):
Consider adding a test to verify:

  1. The config value is correctly read from config_defaults.yaml
  2. The fallback value of 60 is used when the config is not set
  3. Environment variable MULTIQC_EXPORT_PLOTS_TIMEOUT works correctly

However, this is not critical for this PR since it's a straightforward config change.

📝 Other Notes

Changes Summary:

  • config_defaults.yaml: ✅ Timeout changed from 30 to 60
  • plot.py: ✅ Two locations updated with new default (lines 1434, 1508)
  • config_schema.py: ✅ Schema description enhanced
  • config_schema.json: ✅ Auto-regenerated (large diff is just formatting)
  • running_multiqc.md: ✅ New documentation section added

Commit Message:
The PR description is clear and matches the commit. Good practice!

🎬 Action Items

  1. Required: Run pre-commit run --all-files and commit the formatting fixes
  2. Optional: Consider enhancing the schema description with more context
  3. Optional: Add basic test coverage for the timeout config

@ewels ewels added this to the v1.34 milestone Dec 11, 2025
@ewels ewels changed the title Add documentation for export_plots_timeout and increase default to 60s export_plots_timeout: Add docs and increase default to 60s Dec 11, 2025
@ewels ewels merged commit 5bf1cbb into main Dec 11, 2025
10 checks passed
@ewels ewels deleted the claude/plotly-timeout-investigation-01Qd4R97abXZ6B2DJCz1pgUG branch December 11, 2025 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants