Skip to content

Conversation

@Alex-Burmak
Copy link
Owner

No description provided.

@github-actions
Copy link

@CodiumAI-Agent /describe

@github-actions
Copy link

@CodiumAI-Agent /improve

@QodoAI-Agent
Copy link

Title

Test PR 13


PR Type

Enhancement


Description

  • Add Docker & Compose availability checks

  • Update Makefile targets to use checks

  • Bump pyyaml and simplify requests constraints

  • Remove deprecated Docker Compose v1 dependency


Changes walkthrough 📝

Relevant files
Configuration changes
Makefile
Add Docker and UV checks in Makefile                                         

Makefile

  • Rename check-environment to check-uv
  • Add check-docker and check-docker-compose targets
  • Update build-deb-package & create-test-env dependencies
  • +19/-5   
    Dependencies
    pyproject.toml
    Bump PyYAML and simplify dependencies                                       

    pyproject.toml

  • Bump pyyaml to >=5.4
  • Simplify requests version constraints
  • Remove docker-compose dev dependency
  • Update docker dependency constraint
  • +3/-7     

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @QodoAI-Agent
    Copy link

    QodoAI-Agent commented May 18, 2025

    PR Code Suggestions ✨

    Latest suggestions up to 7d71a3a

    CategorySuggestion                                                                                                                                    Impact
    Possible issue
    Use POSIX redirection in UV check

    Replace the Bash-specific &>/dev/null redirection with POSIX-compliant > /dev/null
    2>&1 so the check works under /bin/sh on all systems.

    Makefile [197-199]

    -@if ! command -v "uv" &>/dev/null; then \
    +@if ! command -v uv > /dev/null 2>&1; then \
         echo 'Python project manager tool "uv" not found. Please follow installation instructions at https://docs.astral.sh/uv/getting-started/installation.' >&2; exit 1; \
     fi
    Suggestion importance[1-10]: 7

    __

    Why: The Bash-specific &>/dev/null redirection in the check-uv target isn’t POSIX-compliant; using > /dev/null 2>&1 ensures the command works under /bin/sh in Make.

    Medium
    Fix Docker check redirection

    Change the Bash-only &>/dev/null to > /dev/null 2>&1 so the Docker existence check
    works in POSIX shells.

    Makefile [204-206]

    -@if ! command -v "docker" &>/dev/null; then \
    +@if ! command -v docker > /dev/null 2>&1; then \
         echo 'Docker not found. Please follow installation instructions at https://docs.docker.com/engine/install.' >&2; exit 1; \
     fi
    Suggestion importance[1-10]: 7

    __

    Why: The docker existence check currently uses Bash-only &>/dev/null; replacing it with > /dev/null 2>&1 makes the check portable across all POSIX shells.

    Medium
    Correct Docker Compose check logic

    Replace the Bash grouping and redirection with POSIX-compatible commands, testing
    each tool separately and redirecting output with > /dev/null 2>&1 to ensure shell
    portability.

    Makefile [211-213]

    -@if ! (docker compose version || docker-compose version) &>/dev/null; then \
    +@if ! docker compose version > /dev/null 2>&1 && ! docker-compose version > /dev/null 2>&1; then \
         echo 'Docker Compose not found. Please follow installation instructions at https://docs.docker.com/compose/install.' >&2; exit 1; \
     fi
    Suggestion importance[1-10]: 7

    __

    Why: The Bash grouping and &>/dev/null in the check-docker-compose target break compatibility with /bin/sh; splitting into two negated commands with > /dev/null 2>&1 preserves logic and ensures POSIX compliance.

    Medium

    Previous suggestions

    Suggestions up to commit 7d71a3a
    CategorySuggestion                                                                                                                                    Impact
    Possible issue
    Make redirection POSIX-compliant

    The check-uv target uses the bash-only &>/dev/null redirection, which will fail in
    POSIX shells like dash. Use >/dev/null 2>&1 instead to suppress output reliably
    across shells.

    Makefile [197]

    -@if ! command -v "uv" &>/dev/null; then \
    +@if ! command -v "uv" >/dev/null 2>&1; then \
    Suggestion importance[1-10]: 7

    __

    Why: The check-uv target’s use of &>/dev/null isn’t POSIX-compliant and may break under shells like dash, so switching to >/dev/null 2>&1 ensures portability.

    Medium
    Fix shell redirection portability

    The check-docker target uses the bash-specific &>/dev/null operator, which is
    unsupported in POSIX shells. Change it to >/dev/null 2>&1 to ensure the check works
    in all environments.

    Makefile [204]

    -@if ! command -v "docker" &>/dev/null; then \
    +@if ! command -v "docker" >/dev/null 2>&1; then \
    Suggestion importance[1-10]: 7

    __

    Why: The check-docker command uses bash-specific redirection, which can fail in POSIX shells; using >/dev/null 2>&1 makes it portable.

    Medium
    Use POSIX redirection in compose check

    The check-docker-compose target relies on the bash-only &>/dev/null to hide output,
    which will break under POSIX shells. Redirect the entire subshell to /dev/null with
    >/dev/null 2>&1 (e.g., (docker compose version || docker-compose version) >/dev/null
    2>&1) for portability.

    Makefile [211]

    -@if ! (docker compose version || docker-compose version) &>/dev/null; then \
    +@if ! (docker compose version || docker-compose version) >/dev/null 2>&1; then \
    Suggestion importance[1-10]: 7

    __

    Why: Redirecting the subshell output with bash-specific &>/dev/null isn’t portable, so >/dev/null 2>&1 ensures compatibility.

    Medium

    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.

    2 participants