Skip to content

Clarify Bash guards in Docker and CI scripts - #105

Open
bokalnv wants to merge 1 commit into
mainfrom
bokal/refactor/bash-script-guards
Open

bokalnv wants to merge 1 commit into
mainfrom
bokal/refactor/bash-script-guards

Conversation

@bokalnv

@bokalnv bokalnv commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Clarify Bash tests and option handling.

Detailed description

  • Use Bash compound tests for file, socket and terminal checks in the Docker scripts and for optional pytest arguments. Keep image IDs and the FORCE_REBUILD=true flag case-sensitive.
  • Stop before invoking Docker if an option is registered with getopts but has no handler. Keep the existing diagnostics for unknown options and missing arguments.

Testing

  • pre-commit run --all-files
  • python -m pytest -q autodata_tests/utils/test_ci_cache.py autodata_tests/utils/test_native_ci.py (25 passed)
  • Checked Bash syntax for all three scripts and exercised launcher help and option errors. No GPU workload was run.

Maintainer question

Should the option parser in conda_installer.sh use the same fallback? It already rejects unknown options and missing arguments; this patch leaves it unchanged.

Summary by CodeRabbit

  • Chores
    • Updated shell-script condition checks; existing behavior and outcomes are unchanged.

Signed-off-by: Billy Okal <bokal@nvidia.com>
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The shell scripts update conditional syntax in Docker launch, entrypoint, and CI test paths. The reported conditions and outcomes remain unchanged.

Changes: Shell Script Updates

Layer / File(s) Summary
Conditional syntax updates
docker/run_docker.sh, docker/setup/entrypoint.sh, scripts/ci/run_tests.sh
Docker launch checks, entrypoint checks, and CI rebuild and results-directory checks use updated conditional syntax. The option parser’s fallback pattern also changes. The summaries report no changes to conditions or outcomes.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Refactor

Suggested reviewers: hguillen

Merge Risk: Minimal · up to 61ff2

This change updates shell conditional syntax in the Docker and CI scripts without changing intended behavior. No concrete merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: Bash guard clauses in Docker and CI scripts were clarified. The raw summary confirms single-bracket tests were changed to double-bracket syntax in run_docker.sh, entry…
Description check Passed The description follows the template. It has a Summary line ("Clarify Bash tests and option handling.", 39 characters, within the 50-character limit) and a Detailed description with reasons and change…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: Bash guard clauses in Docker and CI scripts were clarified. The raw summary confirms single-bracket tests were changed to double-bracket syntax in run_docker.sh, entrypoint.sh, and run_tests.sh, with conditions unchanged. The title is specific and concise, and it is 44 characters long.

Full details: Description check

Explanation

The description follows the template. It has a Summary line ("Clarify Bash tests and option handling.", 39 characters, within the 50-character limit) and a Detailed description with reasons and changes. It also covers impact and testing. The detailed section lists the Bash test changes and the getopts fallback. The description does not explicitly state the impact on users, and the summary is not written as a short description of the change, so it could be sharper. Overall it is mostly complete.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between bbc3008 and 61ff2ea.

Files selected for processing: 3

  • docker/run_docker.sh
  • docker/setup/entrypoint.sh
  • scripts/ci/run_tests.sh

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

This branch has not been deployed

No deployments
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