[Chore][CI]: chmod +x scripts in k3 test entrypoints #2886
[Chore][CI]: chmod +x scripts in k3 test entrypoints #2886sammshen merged 1 commit intoLMCache:devfrom
Conversation
…rrors Git stores file permissions at add-time. If a contributor forgets chmod +x before staging a new .sh file, CI gets "Permission denied". Adding chmod +x in each run.sh entrypoint as a runtime safeguard.
There was a problem hiding this comment.
Code Review
This pull request adds a command to ensure scripts are executable across several test entrypoint files. The reviewer identified that this logic is duplicated across multiple scripts and recommended centralizing it within a shared setup script to improve maintainability and modularity.
| uv pip install yq jq openai pandas matplotlib 2>/dev/null || true | ||
|
|
||
| # ── Ensure all scripts are executable ──────────────────────── | ||
| chmod +x "${SCRIPT_DIR}"/scripts/*.sh |
There was a problem hiding this comment.
This chmod command is duplicated across multiple test entrypoint scripts. This code duplication increases maintenance overhead, as any future changes to this logic will need to be applied in several places.
To improve maintainability and follow the Don't Repeat Yourself (DRY) principle, this command should be moved to a shared script. The .buildkite/k3_harness/setup-env.sh script, which is already sourced in all affected files, seems like an appropriate location to centralize this logic.
References
- The repository style guide emphasizes modularity and maintainability (line 10). Duplicated code is categorized as an issue that should be fixed to improve modularity (line 61). (link)
| uv pip install aiohttp tqdm pandas huggingface_hub | ||
|
|
||
| # ── Ensure all scripts are executable ──────────────────────── | ||
| chmod +x "${SCRIPT_DIR}"/scripts/*.sh |
There was a problem hiding this comment.
This chmod command is duplicated across multiple test entrypoint scripts. This code duplication increases maintenance overhead, as any future changes to this logic will need to be applied in several places.
To improve maintainability and follow the Don't Repeat Yourself (DRY) principle, this command should be moved to a shared script. The .buildkite/k3_harness/setup-env.sh script, which is already sourced in all affected files, seems like an appropriate location to centralize this logic.
References
- The repository style guide emphasizes modularity and maintainability (line 10). Duplicated code is categorized as an issue that should be fixed to improve modularity (line 61). (link)
| uv pip install aiohttp | ||
|
|
||
| # ── Ensure all scripts are executable ──────────────────────── | ||
| chmod +x "${SCRIPT_DIR}"/scripts/*.sh |
There was a problem hiding this comment.
This chmod command is duplicated across multiple test entrypoint scripts. This code duplication increases maintenance overhead, as any future changes to this logic will need to be applied in several places.
To improve maintainability and follow the Don't Repeat Yourself (DRY) principle, this command should be moved to a shared script. The .buildkite/k3_harness/setup-env.sh script, which is already sourced in all affected files, seems like an appropriate location to centralize this logic.
References
- The repository style guide emphasizes modularity and maintainability (line 10). Duplicated code is categorized as an issue that should be fixed to improve modularity (line 61). (link)
| uv pip install 'lm-eval[api]' openai pandas matplotlib | ||
|
|
||
| # ── Ensure all scripts are executable ──────────────────────── | ||
| chmod +x "${SCRIPT_DIR}"/scripts/*.sh |
There was a problem hiding this comment.
This chmod command is duplicated across multiple test entrypoint scripts. This code duplication increases maintenance overhead, as any future changes to this logic will need to be applied in several places.
To improve maintainability and follow the Don't Repeat Yourself (DRY) principle, this command should be moved to a shared script. The .buildkite/k3_harness/setup-env.sh script, which is already sourced in all affected files, seems like an appropriate location to centralize this logic.
References
- The repository style guide emphasizes modularity and maintainability (line 10). Duplicated code is categorized as an issue that should be fixed to improve modularity (line 61). (link)
[CI]: chmod +x scripts in k3 test entrypoints to prevent permission errors Git stores file permissions at add-time. If a contributor forgets chmod +x before staging a new .sh file, CI gets "Permission denied". Adding chmod +x in each run.sh entrypoint as a runtime safeguard. Co-authored-by: Samuel Shen <slshen@uchciago.edu>
[CI]: chmod +x scripts in k3 test entrypoints to prevent permission errors Git stores file permissions at add-time. If a contributor forgets chmod +x before staging a new .sh file, CI gets "Permission denied". Adding chmod +x in each run.sh entrypoint as a runtime safeguard. Co-authored-by: Samuel Shen <slshen@uchciago.edu>
No description provided.