Skip to content

fix: standardize image naming convention across compose and TUI#2137

Open
owenzhang04 wants to merge 6 commits into
langflow-ai:mainfrom
afsanjar:refactored-multiarch-images
Open

fix: standardize image naming convention across compose and TUI#2137
owenzhang04 wants to merge 6 commits into
langflow-ai:mainfrom
afsanjar:refactored-multiarch-images

Conversation

@owenzhang04

@owenzhang04 owenzhang04 commented Jul 21, 2026

Copy link
Copy Markdown

UNDER DEVELOPMENT (Do not merge)

Summary

Image references were hardcoded in multiple places using inconsistent
formats. This PR standardizes them with a single source of truth and
makes the registry, org, and architecture suffix configurable via
environment variables.

Changes

  • src/config/image_config.py (new) — central module defining
    IMAGE_REGISTRY, IMAGE_ORG, IMAGE_ARCH, all image names, and
    helper functions (image_ref, image_tag, image_repo,
    all_openrag_repos)
  • docker-compose.yml — image refs now use
    ${IMAGE_REGISTRY:-docker.io}/${IMAGE_ORG:-langflowai}/<name>:${IMAGE_ARCH:+...}
    instead of hardcoded docker.io/langflowai/...
  • container_manager.py, startup_checks.py,
    version_check.py — replaced hardcoded image repo sets/strings
    with imports from image_config

Resolves #2132

Summary by CodeRabbit

  • New Features

    • Added configuration-driven image naming for the OpenRAG stack, including registry/namespace controls and optional architecture-specific tag suffixing. OpenSearch and dashboards images are now environment-parameterized in the compose setup.
  • Bug Fixes

    • Improved OpenRAG-related image detection by using a centrally managed repository list across startup checks.
    • Docker Hub version checks now better respect configured registries and handle “not checked” states; upgrade prompts are suppressed when the latest version cannot be determined.

@github-actions github-actions Bot added backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) docker community labels Jul 21, 2026
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Compose and TUI image handling now use environment-driven registry, organization, and architecture settings. Shared helpers build image references and repository allowlists, while version checks skip non-default registries and filter architecture-specific tags.

Changes

Container image configuration

Layer / File(s) Summary
Image configuration contract
src/config/image_config.py
Defines environment-based image settings and helpers for repositories, architecture-aware tags, image references, and repository allowlists.
Compose image wiring
docker-compose.yml
Parameterizes OpenRAG service registry, organization, version, and architecture values, while making the Dashboards registry configurable.
TUI image detection and version checks
src/tui/managers/container_manager.py, src/tui/utils/startup_checks.py, src/tui/utils/version_check.py, src/tui/screens/monitor.py
Derives repository allowlists from shared configuration, normalizes architecture suffixes, conditionally polls Docker Hub, filters architecture-specific tags, and preserves an unknown state when checks are skipped.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Environment
  participant ImageConfig
  participant Compose
  participant ContainerManager
  participant StartupChecks
  participant DockerHub
  participant Monitor
  Environment->>ImageConfig: provide registry, organization, and architecture
  ImageConfig->>Compose: provide image repository and tag values
  ImageConfig->>ContainerManager: provide repository allowlist
  ImageConfig->>StartupChecks: provide repository allowlist and backend image
  StartupChecks->>DockerHub: request tags when registry is docker.io
  DockerHub-->>StartupChecks: return filtered image tags
  StartupChecks->>Monitor: return latest status or unknown status
Loading

Possibly related PRs

Suggested reviewers: lucaseduoli

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes implement configurable registry, org, and architecture handling from a shared config source across Compose and TUI.
Out of Scope Changes check ✅ Passed All changes stay within the image-config standardization and related follow-up fixes; no unrelated scope is evident.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main change: standardizing image naming across Docker Compose and TUI.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Jul 21, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/config/image_config.py`:
- Around line 71-85: Normalize the architecture-tag contract in image_tag so
IMAGE_ARCH=multi produces the same unsuffixed manifest tag in every consumer.
Update the OpenSearch, backend, frontend, and Langflow image references in
docker-compose.yml to apply this normalized behavior, ensuring multi
configurations use version rather than version-multi while suffixed
architectures remain unchanged.
- Around line 11-23: Move image-setting resolution in
src/config/image_config.py#L11-L23 to config/settings.py and remove direct
os.environ access there. In src/tui/managers/container_manager.py#L83, resolve
the image allowlist from loaded settings at runtime instead of storing it as a
class constant. In src/tui/utils/startup_checks.py#L20, likewise resolve the
allowlist after settings initialization rather than at module import; preserve
config/settings.py as the sole os.environ access point.

In `@src/tui/utils/version_check.py`:
- Around line 9-14: The default image handling in get_latest_docker_version must
not send private-registry images to Docker Hub. Use IMAGE_REGISTRY to select the
appropriate registry API and preserve the existing Docker Hub path only for
Docker Hub images, or disable latest-version polling when the configured
registry is unsupported; ensure private and air-gapped deployments do not query
hub.docker.com.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9e7bd219-fa1b-4eac-87e9-5894173a381b

📥 Commits

Reviewing files that changed from the base of the PR and between 2f576b8 and c40e911.

📒 Files selected for processing (5)
  • docker-compose.yml
  • src/config/image_config.py
  • src/tui/managers/container_manager.py
  • src/tui/utils/startup_checks.py
  • src/tui/utils/version_check.py

Comment on lines +11 to +23
IMAGE_REGISTRY: str = os.getenv("IMAGE_REGISTRY", "docker.io")

#: Organisation / namespace within the registry. Override via IMAGE_ORG.
IMAGE_ORG: str = os.getenv("IMAGE_ORG", "langflowai")

# ---------------------------------------------------------------------------
# Architecture
# ---------------------------------------------------------------------------

#: Target architecture suffix. Set IMAGE_ARCH to one of: amd64, arm64,
#: ppc64le. Leave empty (default) for a fat-manifest / architecture-agnostic
#: reference (i.e. no suffix appended to the tag).
IMAGE_ARCH: str = os.getenv("IMAGE_ARCH", "")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Resolve image settings after loading the TUI .env file.

The configuration is captured at import time, while ContainerManager._get_env_from_file() loads .env later. Compose receives .env overrides, but cleanup/startup repository matching remains fixed to the initial process environment.

  • src/config/image_config.py#L11-L23: obtain image settings through config/settings.py; do not read os.environ here.
  • src/tui/managers/container_manager.py#L83-L83: resolve the allowlist from the loaded settings rather than materializing it as a class constant.
  • src/tui/utils/startup_checks.py#L20-L20: resolve the allowlist after settings initialization rather than at module import.

As per path instructions, “Config values must come from config/settings.py (the only place os.environ is read); never access os.environ elsewhere in the codebase.”

📍 Affects 3 files
  • src/config/image_config.py#L11-L23 (this comment)
  • src/tui/managers/container_manager.py#L83-L83
  • src/tui/utils/startup_checks.py#L20-L20
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/config/image_config.py` around lines 11 - 23, Move image-setting
resolution in src/config/image_config.py#L11-L23 to config/settings.py and
remove direct os.environ access there. In
src/tui/managers/container_manager.py#L83, resolve the image allowlist from
loaded settings at runtime instead of storing it as a class constant. In
src/tui/utils/startup_checks.py#L20, likewise resolve the allowlist after
settings initialization rather than at module import; preserve
config/settings.py as the sole os.environ access point.

Source: Path instructions

Comment on lines +71 to +85
def image_tag(version: str, arch: str = IMAGE_ARCH) -> str:
"""Return the image tag for *version*, optionally suffixed with *arch*.

If *arch* is empty or ``"multi"``, no suffix is added and the plain
version string is returned (suitable for a fat-manifest reference).

Examples::

image_tag("0.5.1") # -> "0.5.1"
image_tag("0.5.1", "ppc64le") # -> "0.5.1-ppc64le"
image_tag("0.5.1", "arm64") # -> "0.5.1-arm64"
"""
if arch and arch != "multi":
return f"{version}-{arch}"
return version

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Make IMAGE_ARCH=multi consistent across Python and Compose.

image_tag(version, "multi") returns the unsuffixed manifest tag, but Compose expands every non-empty value to version-multi. A multi configuration therefore makes TUI-derived references disagree with the images Compose pulls.

  • src/config/image_config.py#L71-L85: normalize the supported architecture contract so multi has the same meaning everywhere.
  • docker-compose.yml#L3-L3: use the normalized tag behavior for OpenSearch.
  • docker-compose.yml#L50-L50: use the normalized tag behavior for the backend.
  • docker-compose.yml#L141-L141: use the normalized tag behavior for the frontend.
  • docker-compose.yml#L154-L154: use the normalized tag behavior for Langflow.
📍 Affects 2 files
  • src/config/image_config.py#L71-L85 (this comment)
  • docker-compose.yml#L3-L3
  • docker-compose.yml#L50-L50
  • docker-compose.yml#L141-L141
  • docker-compose.yml#L154-L154
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/config/image_config.py` around lines 71 - 85, Normalize the
architecture-tag contract in image_tag so IMAGE_ARCH=multi produces the same
unsuffixed manifest tag in every consumer. Update the OpenSearch, backend,
frontend, and Langflow image references in docker-compose.yml to apply this
normalized behavior, ensuring multi configurations use version rather than
version-multi while suffixed architectures remain unchanged.

Comment thread src/tui/utils/version_check.py
@owenzhang04
owenzhang04 force-pushed the refactored-multiarch-images branch from c40e911 to c241964 Compare July 22, 2026 18:02
@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Jul 22, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
src/tui/utils/version_check.py (1)

9-14: ⚠️ Potential issue | 🟠 Major

Private-registry version polling is still routed to Docker Hub.

_DEFAULT_VERSION_IMAGE omits IMAGE_REGISTRY, and get_latest_docker_version() always formats a hub.docker.com URL. Private or air-gapped deployments still query Docker Hub instead of the configured registry or disabling unsupported polling. This is the same unresolved finding from the previous review.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/tui/utils/version_check.py` around lines 9 - 14, Update
get_latest_docker_version and _DEFAULT_VERSION_IMAGE so version polling uses the
configured IMAGE_REGISTRY rather than always targeting Docker Hub. Preserve the
Docker Hub v2 format for public images, and disable or bypass polling when the
configured registry does not support that endpoint, preventing private or
air-gapped deployments from making Docker Hub requests.
🧹 Nitpick comments (1)
src/tui/utils/version_check.py (1)

42-51: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use SUPPORTED_ARCHITECTURES as the filter source.

The architecture list is duplicated here even though config.image_config.SUPPORTED_ARCHITECTURES is the canonical tuple. Reusing it prevents future architecture additions from being misclassified as version tags.

Proposed refactor
-from config.image_config import IMAGE_ORG, IMAGE_NAME_BACKEND
+from config.image_config import (
+    IMAGE_NAME_BACKEND,
+    IMAGE_ORG,
+    SUPPORTED_ARCHITECTURES,
+)

-                    if tag_name in ["latest", "amd64", "arm64", "ppc64le"]:
+                    if tag_name == "latest" or tag_name in SUPPORTED_ARCHITECTURES:
                         continue

-                        if suffix in ("amd64", "arm64", "ppc64le"):
+                        if suffix in SUPPORTED_ARCHITECTURES:
                             continue
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/tui/utils/version_check.py` around lines 42 - 51, Update the architecture
filtering in the version-tag logic to use
config.image_config.SUPPORTED_ARCHITECTURES instead of hardcoded architecture
lists. Apply the canonical tuple to both the direct tag check and the suffix
check, while preserving the existing "latest" exclusion and version-tag
behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/tui/managers/container_manager.py`:
- Line 17: Update src/tui/managers/container_manager.py:17-17 and
src/tui/utils/version_check.py:5-5 so both imports use image configuration
values backed by config/settings.py. Refactor image_config.py to consume
settings-provided values rather than reading environment variables directly,
ensuring imports do not capture overrides before settings are loaded; keep all
os.environ access confined to config/settings.py.
- Line 83: Initialize OPENRAG_IMAGE_REPOS only after ContainerManager.__init__
loads and resolves the .env configuration, rather than evaluating
all_openrag_repos() as a class attribute during import. Ensure detection, reset,
and pruning use the environment-resolved registry and organization values,
including private-registry overrides.

---

Duplicate comments:
In `@src/tui/utils/version_check.py`:
- Around line 9-14: Update get_latest_docker_version and _DEFAULT_VERSION_IMAGE
so version polling uses the configured IMAGE_REGISTRY rather than always
targeting Docker Hub. Preserve the Docker Hub v2 format for public images, and
disable or bypass polling when the configured registry does not support that
endpoint, preventing private or air-gapped deployments from making Docker Hub
requests.

---

Nitpick comments:
In `@src/tui/utils/version_check.py`:
- Around line 42-51: Update the architecture filtering in the version-tag logic
to use config.image_config.SUPPORTED_ARCHITECTURES instead of hardcoded
architecture lists. Apply the canonical tuple to both the direct tag check and
the suffix check, while preserving the existing "latest" exclusion and
version-tag behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 02ed3a5b-aabb-41fc-aa75-148de37302c0

📥 Commits

Reviewing files that changed from the base of the PR and between c40e911 and c241964.

📒 Files selected for processing (5)
  • docker-compose.yml
  • src/config/image_config.py
  • src/tui/managers/container_manager.py
  • src/tui/utils/startup_checks.py
  • src/tui/utils/version_check.py
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/tui/utils/startup_checks.py
  • docker-compose.yml
  • src/config/image_config.py

Comment thread src/tui/managers/container_manager.py
"opensearchproject/opensearch",
"opensearchproject/opensearch-dashboards",
}
OPENRAG_IMAGE_REPOS: set[str] = set(all_openrag_repos())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Resolve .env before constructing OPENRAG_IMAGE_REPOS.

This class attribute evaluates all_openrag_repos() during import, while ContainerManager.__init__ loads .env later. Overrides supplied only through .env therefore leave the allowlist on default registry/organization values, causing private-registry images to be skipped by detection, reset, and pruning.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/tui/managers/container_manager.py` at line 83, Initialize
OPENRAG_IMAGE_REPOS only after ContainerManager.__init__ loads and resolves the
.env configuration, rather than evaluating all_openrag_repos() as a class
attribute during import. Ensure detection, reset, and pruning use the
environment-resolved registry and organization values, including
private-registry overrides.

@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Jul 22, 2026
…on check

Co-authored-by: Kamryn Schock <kamrynschock@tamu.edu>
@owenzhang04
owenzhang04 force-pushed the refactored-multiarch-images branch from 1e557ec to 4496d02 Compare July 22, 2026 18:22
@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Jul 22, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/tui/utils/version_check.py (1)

51-60: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Reuse SUPPORTED_ARCHITECTURES to prevent configuration drift.

The shared image configuration already defines SUPPORTED_ARCHITECTURES, but this filter hardcodes the same values. Import and reuse that tuple for both exact-tag and suffix checks so newly supported architectures are consistently excluded.

Proposed fix
-from config.image_config import IMAGE_ORG, IMAGE_NAME_BACKEND, IMAGE_REGISTRY
+from config.image_config import (
+    IMAGE_ORG,
+    IMAGE_NAME_BACKEND,
+    IMAGE_REGISTRY,
+    SUPPORTED_ARCHITECTURES,
+)

-                    if tag_name in ["latest", "amd64", "arm64", "ppc64le"]:
+                    if tag_name == "latest" or tag_name in SUPPORTED_ARCHITECTURES:
...
-                        if suffix in ("amd64", "arm64", "ppc64le"):
+                        if suffix in SUPPORTED_ARCHITECTURES:

As per PR objectives, image_config.py is the single source of truth for architecture handling.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/tui/utils/version_check.py` around lines 51 - 60, Update the tag
filtering logic around the exact-tag and suffix checks to import and reuse the
shared SUPPORTED_ARCHITECTURES tuple from image_config.py, replacing both
hardcoded architecture lists while continuing to skip “latest” and
architecture-specific tags.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/tui/utils/version_check.py`:
- Around line 27-32: Update check_if_latest() and its TUI caller so the None
result from the non-Docker-Hub guard in the version-check flow is represented as
“not checked,” not as latest. Prevent the latest-version notification when
IMAGE_REGISTRY differs from _DOCKER_HUB_REGISTRY, while preserving normal
latest/outdated behavior for Docker Hub checks.
- Line 5: Move the environment-variable reads for IMAGE_REGISTRY, IMAGE_ORG, and
IMAGE_ARCH out of config.image_config and into config.settings, then update
image_config to import and consume those settings values while preserving its
existing public symbols and behavior. Ensure config.settings remains the only
module performing these environment reads.

---

Outside diff comments:
In `@src/tui/utils/version_check.py`:
- Around line 51-60: Update the tag filtering logic around the exact-tag and
suffix checks to import and reuse the shared SUPPORTED_ARCHITECTURES tuple from
image_config.py, replacing both hardcoded architecture lists while continuing to
skip “latest” and architecture-specific tags.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2967bc2a-8e20-4f3a-9423-b587d90ea9e5

📥 Commits

Reviewing files that changed from the base of the PR and between 1e557ec and 4496d02.

📒 Files selected for processing (3)
  • docker-compose.yml
  • src/tui/managers/container_manager.py
  • src/tui/utils/version_check.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • docker-compose.yml
  • src/tui/managers/container_manager.py

Comment thread src/tui/utils/version_check.py Outdated

from typing import Optional, Tuple
from utils.logging_config import get_logger
from config.image_config import IMAGE_ORG, IMAGE_NAME_BACKEND, IMAGE_REGISTRY

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Keep environment reads in config/settings.py.

The supplied src/config/image_config.py contract initializes IMAGE_REGISTRY, IMAGE_ORG, and IMAGE_ARCH with environment reads. Move those reads into config/settings.py and have image_config.py consume the settings values.

As per path instructions, config values must come from config/settings.py, the only environment-reading module.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/tui/utils/version_check.py` at line 5, Move the environment-variable
reads for IMAGE_REGISTRY, IMAGE_ORG, and IMAGE_ARCH out of config.image_config
and into config.settings, then update image_config to import and consume those
settings values while preserving its existing public symbols and behavior.
Ensure config.settings remains the only module performing these environment
reads.

Source: Path instructions

Comment thread src/tui/utils/version_check.py
@github-actions github-actions Bot removed the bug 🔴 Something isn't working. label Jul 22, 2026
@github-actions github-actions Bot added the bug 🔴 Something isn't working. label Jul 22, 2026
owenzhang04 and others added 2 commits July 22, 2026 13:43
…rsion check return value

Co-authored-by: Kamryn Schock <kamrynschock@tamu.edu>
Co-authored-by: Kamryn Schock <kamrynschock@tamu.edu>
@owenzhang04
owenzhang04 force-pushed the refactored-multiarch-images branch from 1019e80 to 3d6075a Compare July 22, 2026 18:44
@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Jul 22, 2026
@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Jul 22, 2026
@kamrynschock

Copy link
Copy Markdown

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Jul 22, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/tui/utils/version_check.py`:
- Around line 178-195: Update the return annotation of check_if_latest() to
Tuple[Optional[bool], Optional[str], Optional[str]] so it matches the existing
None result when the latest Docker version is unavailable, while preserving the
current runtime behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cd53f382-42fd-4933-8584-c4be882a5d50

📥 Commits

Reviewing files that changed from the base of the PR and between 4496d02 and f6f0479.

📒 Files selected for processing (3)
  • docker-compose.yml
  • src/tui/screens/monitor.py
  • src/tui/utils/version_check.py
💤 Files with no reviewable changes (1)
  • docker-compose.yml

Comment on lines +178 to +195
async def check_if_latest() -> Tuple[bool, Optional[str], Optional[str]]:
"""
Check if the current version is the latest available on Docker Hub.

Returns:
Tuple of (is_latest, latest_version, current_version)
Tuple of (is_latest, latest_version, current_version).
When the version check was skipped (e.g. non-Docker Hub registry),
``latest_version`` is ``None`` and ``is_latest`` is ``None`` to signal
"not checked" — distinct from a confirmed up-to-date result.
"""
current = get_current_version()
latest = await get_latest_docker_version()

if latest is None:
# If we can't check, assume current is latest
return True, None, current

# Check was skipped or failed — do not assume the current version is
# latest; return None for is_latest so callers can distinguish "not
# checked" from a confirmed up-to-date result.
return None, None, current

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

rg -n 'check_if_latest|Optional\[bool\]|return None, None, current' src/tui/utils/version_check.py

Repository: langflow-ai/openrag

Length of output: 274


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== version_check relevant sections =="
sed -n '150,220p' src/tui/utils/version_check.py

echo
echo "== check_if_latest usages =="
rg -n 'check_if_latest' src || true

echo
echo "== monitor relevant occurrences =="
for f in $(git ls-files | rg 'src/.*/monitor\.py$'); do
  echo "-- $f --"
  rg -n 'check_if_latest|is_latest|latest_version' "$f" || true
done

Repository: langflow-ai/openrag

Length of output: 2864


Widen the check_if_latest() return type.

This function documents and returns is_latest as None when the Docker Hub check is skipped, and monitor.py handles that case explicitly. Update the annotation to Tuple[Optional[bool], Optional[str], Optional[str]] so static type checking matches the runtime contract.

Proposed fix
-async def check_if_latest() -> Tuple[bool, Optional[str], Optional[str]]:
+async def check_if_latest() -> Tuple[Optional[bool], Optional[str], Optional[str]]:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
async def check_if_latest() -> Tuple[bool, Optional[str], Optional[str]]:
"""
Check if the current version is the latest available on Docker Hub.
Returns:
Tuple of (is_latest, latest_version, current_version)
Tuple of (is_latest, latest_version, current_version).
When the version check was skipped (e.g. non-Docker Hub registry),
``latest_version`` is ``None`` and ``is_latest`` is ``None`` to signal
"not checked"distinct from a confirmed up-to-date result.
"""
current = get_current_version()
latest = await get_latest_docker_version()
if latest is None:
# If we can't check, assume current is latest
return True, None, current
# Check was skipped or failed — do not assume the current version is
# latest; return None for is_latest so callers can distinguish "not
# checked" from a confirmed up-to-date result.
return None, None, current
async def check_if_latest() -> Tuple[Optional[bool], Optional[str], Optional[str]]:
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/tui/utils/version_check.py` around lines 178 - 195, Update the return
annotation of check_if_latest() to Tuple[Optional[bool], Optional[str],
Optional[str]] so it matches the existing None result when the latest Docker
version is unavailable, while preserving the current runtime behavior.

@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) bug 🔴 Something isn't working. community docker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: make container image registry, org, and architecture configurable

2 participants