Skip to content

Fix #9219: image start crash#9674

Open
JiwaniZakir wants to merge 1 commit intoHumanSignal:developfrom
JiwaniZakir:fix/9219-image-start-crash
Open

Fix #9219: image start crash#9674
JiwaniZakir wants to merge 1 commit intoHumanSignal:developfrom
JiwaniZakir:fix/9219-image-start-crash

Conversation

@JiwaniZakir
Copy link
Copy Markdown

Closes #9219

Reason for change

LABEL_STUDIO_DISABLE_UPDATE_CHECK=true is documented as the way to disable the PyPI version check, but it was never wired into the LATEST_VERSION_CHECK setting in label_studio/core/settings/base.py. As a result, get_latest_version() in label_studio/core/utils/common.py still attempted an outbound HTTPS connection to pypi.org:443 at startup regardless of that env var.

In air-gapped environments (e.g., Kubernetes clusters with no outbound internet access), this caused:

  • OSError: [Errno 101] Network is unreachable during startup
  • Significant startup delays and pod readiness failures
  • An unresponsive login page (infinite loading)

Solution

In label_studio/core/settings/base.py, LATEST_VERSION_CHECK is now computed as:

LATEST_VERSION_CHECK = get_bool_env('LATEST_VERSION_CHECK', True) and not get_bool_env(
    'LABEL_STUDIO_DISABLE_UPDATE_CHECK', False
)

This makes LABEL_STUDIO_DISABLE_UPDATE_CHECK=true actually suppress the check, consistent with its documented behavior. Both env vars work independently: either LATEST_VERSION_CHECK=false or LABEL_STUDIO_DISABLE_UPDATE_CHECK=true will disable the network call.

Rollout strategy

Controlled entirely by the existing LABEL_STUDIO_DISABLE_UPDATE_CHECK environment variable. No new flags introduced. Default behavior (both vars unset) is unchanged — the update check still runs.

Testing

A new test file label_studio/core/tests/test_common.py covers the fix. test_disable_update_check_env_var sets django_settings.LATEST_VERSION_CHECK = False and asserts that check_for_the_latest_version() does not invoke get_latest_version(), confirming no network call is made when the flag is set.

Manual verification: deploying with LABEL_STUDIO_DISABLE_UPDATE_CHECK=true in a network-restricted environment no longer produces ConnectionError on startup and the login page loads normally.

Risks

Low. The change is a single boolean short-circuit on a setting that controls an optional background check. It does not affect any data path, authentication, or labeling functionality. The default remains True (check enabled) when neither env var is set.

Reviewer notes

The only modified production line is in base.py at the LATEST_VERSION_CHECK assignment (previously line 599). The logic is intentionally minimal to stay consistent with how get_bool_env is used throughout the settings file.

General notes

N/A


This PR was created with AI assistance (Claude). The changes were reviewed by quality gates and a critic model before submission.

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 2, 2026

👷 Deploy request for label-studio-docs-new-theme pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 84d822e

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 2, 2026

👷 Deploy request for heartex-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 84d822e

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 2, 2026

Deploy Preview for label-studio-playground canceled.

Name Link
🔨 Latest commit 84d822e
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-playground/deploys/69ce178849ad42000994b17b

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 2, 2026

Deploy Preview for label-studio-storybook canceled.

Name Link
🔨 Latest commit 84d822e
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-storybook/deploys/69ce1788ebf1cd0008e956b8

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.

image start crash

1 participant