Fix #9219: image start crash#9674
Open
JiwaniZakir wants to merge 1 commit intoHumanSignal:developfrom
Open
Conversation
👷 Deploy request for label-studio-docs-new-theme pending review.Visit the deploys page to approve it
|
👷 Deploy request for heartex-docs pending review.Visit the deploys page to approve it
|
✅ Deploy Preview for label-studio-playground canceled.
|
✅ Deploy Preview for label-studio-storybook canceled.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #9219
Reason for change
LABEL_STUDIO_DISABLE_UPDATE_CHECK=trueis documented as the way to disable the PyPI version check, but it was never wired into theLATEST_VERSION_CHECKsetting inlabel_studio/core/settings/base.py. As a result,get_latest_version()inlabel_studio/core/utils/common.pystill attempted an outbound HTTPS connection topypi.org:443at 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 unreachableduring startupSolution
In
label_studio/core/settings/base.py,LATEST_VERSION_CHECKis now computed as:This makes
LABEL_STUDIO_DISABLE_UPDATE_CHECK=trueactually suppress the check, consistent with its documented behavior. Both env vars work independently: eitherLATEST_VERSION_CHECK=falseorLABEL_STUDIO_DISABLE_UPDATE_CHECK=truewill disable the network call.Rollout strategy
Controlled entirely by the existing
LABEL_STUDIO_DISABLE_UPDATE_CHECKenvironment 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.pycovers the fix.test_disable_update_check_env_varsetsdjango_settings.LATEST_VERSION_CHECK = Falseand asserts thatcheck_for_the_latest_version()does not invokeget_latest_version(), confirming no network call is made when the flag is set.Manual verification: deploying with
LABEL_STUDIO_DISABLE_UPDATE_CHECK=truein a network-restricted environment no longer producesConnectionErroron 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.pyat theLATEST_VERSION_CHECKassignment (previously line 599). The logic is intentionally minimal to stay consistent with howget_bool_envis 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.