Skip to content

Conversation

@jose-blockchain
Copy link

Summary

Fixes #1686: Docker health endpoint reports outdated version (0.5.1-d1 instead of 0.8.0)

The /health endpoint in the Docker image was returning a hardcoded version string that wasn't updated when the image was rebuilt with newer crawl4ai versions. This change replaces the hardcoded value with a dynamic import from the installed package, ensuring the health endpoint always reports the correct version.

List of files changed and why

  • deploy/docker/server.py - Replaced hardcoded __version__ = "0.5.1-d1" with dynamic import from crawl4ai.__version__ import __version__ to automatically sync with the installed package version

How Has This Been Tested?

  • Verified the import syntax is correct and matches patterns used elsewhere in the codebase (e.g., async_webcrawler.py)
  • Confirmed the health endpoint at line 602 uses the imported __version__ variable
  • Checked that crawl4ai/__version__.py contains the current version (0.8.0)
  • Validated no linting errors introduced
  • The fix will be verified when the Docker image is rebuilt - the /health endpoint should then return the correct version instead of "0.5.1-d1"

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas (added comment explaining why version is imported)
  • I have made corresponding changes to the documentation (not needed - this is a bug fix)
  • I have added/updated unit tests that prove my fix is effective or that my feature works (not needed - this is a simple import change that will be verified in Docker build)
  • New and existing unit tests pass locally with my changes (Docker-specific change, will be verified in container environment)

…th endpoint

Replace hardcoded version string with import from crawl4ai.__version__
to ensure health endpoint reports correct version.

Fixes unclecode#1686
Reviewers: @chansearrington
…th endpoint

Replace hardcoded version string with import from crawl4ai.__version__
to ensure health endpoint reports correct version.

Fixes unclecode#1686
Reviewers: @chansearrington
@jose-blockchain
Copy link
Author

please review if still needed @chansearrington @abhilov23 @SohamKukreti , thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker image health endpoint reports outdated version (0.5.1-d1 instead of 0.7.8)

1 participant