-
Notifications
You must be signed in to change notification settings - Fork 120
opendatahub-io/notebooks#1271: fix(scripts): posix noncompliance in nginx/root/usr/share/container-scripts/nginx/common.sh and duplicates of thereof
#1628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughShebangs for nginx common.sh scripts changed to Bash; variable assignments and all filename/path usages were quoted; loops use Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Assessment against linked issues
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate 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. Comment |
|
Hi @satnam72. Thanks for your PR. I'm waiting for a opendatahub-io member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh(2 hunks)
🧰 Additional context used
🧠 Learnings (10)
📓 Common learnings
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:4-11
Timestamp: 2025-07-03T12:08:47.691Z
Learning: jiridanek requests GitHub issue creation for shell script quality improvements identified during PR #1269 review, specifically for POSIX compliance and security issues in codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh. Issue #1275 was created with comprehensive problem descriptions, acceptance criteria, implementation guidance, and proper context linking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T13:31:35.667Z
Learning: jiridanek requested GitHub issue creation for comprehensive shell scripting improvements in codeserver image during PR #1269 review, covering process management, JSON parsing robustness, variable quoting security, and sed pattern fixes. Issue #1295 was created with systematic phased approach, detailed problem descriptions, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T13:27:38.813Z
Learning: jiridanek requested GitHub issue creation for comprehensive shell scripting improvements in codeserver image during PR #1269 review, covering process management, JSON parsing robustness, variable quoting security, and sed pattern fixes. Issue #1293 was created with systematic phased approach, detailed problem descriptions, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T13:27:38.813Z
Learning: jiridanek requested GitHub issue creation for comprehensive shell scripting improvements in codeserver image during PR #1269 review, covering process management, JSON parsing robustness, variable quoting security, and sed pattern fixes. Issue #1293 was created with systematic phased approach, detailed problem descriptions, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:4-11
Timestamp: 2025-07-03T16:04:22.695Z
Learning: jiridanek requested GitHub issue creation for shell script quality improvements in codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh during PR #1269 review. Issue #1307 was created with comprehensive problem description covering variable scoping issues, POSIX compliance concerns, multiple solution options, acceptance criteria, implementation guidance with code examples, testing approaches, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/utils/process.sh:1-2
Timestamp: 2025-07-03T16:00:46.191Z
Learning: jiridanek requested GitHub issue creation for shell script strict-mode improvement in codeserver/ubi9-python-3.12/utils/process.sh during PR #1269 review. Issue #1303 was created with comprehensive problem description covering silent failures and production risks, phased acceptance criteria for basic strict-mode implementation and enhanced error handling, implementation guidance with code examples and flag explanations, benefits section, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:5-5
Timestamp: 2025-07-03T12:25:26.453Z
Learning: jiridanek requested GitHub issue creation for shell script safety improvements identified during PR #1269 review, specifically for unsafe globbing patterns in codeserver/ubi9-python-3.12/run-code-server.sh. Issue #1281 was created with comprehensive problem descriptions, solution options, acceptance criteria, and proper context linking, following the established pattern for systematic tracking of technical improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/opt/app-root/etc/generate_container_user:4-9
Timestamp: 2025-07-03T16:05:35.448Z
Learning: jiridanek requested GitHub issue creation for shell script error handling improvements in codeserver/ubi9-python-3.12/nginx/root/opt/app-root/etc/generate_container_user during PR #1269 review. A comprehensive issue was created covering silent failures, unquoted variable expansions, missing template validation, and strict mode implementation with detailed problem descriptions, phased acceptance criteria, implementation guidance with code examples, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:17-17
Timestamp: 2025-07-03T12:26:24.084Z
Learning: jiridanek requests GitHub issue creation for shell script quality improvements identified during PR #1269 review, specifically for unquoted command substitution in codeserver/ubi9-python-3.12/run-code-server.sh. Issue #1283 was created with comprehensive problem descriptions, acceptance criteria, implementation guidance, and proper context linking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:1-2
Timestamp: 2025-07-03T16:08:47.251Z
Learning: jiridanek requested GitHub issue creation for shell strict mode improvement in codeserver/ubi9-python-3.12/run-code-server.sh during PR #1269 review. Issue #1310 was created with comprehensive problem description covering silent failures, production risks, implementation guidance with code examples, acceptance criteria, testing approach, and proper context linking, continuing the established pattern of systematic code quality improvements for the codeserver image entrypoint script.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T14:04:05.280Z
Learning: In opendatahub-io/notebooks, shell scripting robustness and efficiency issues in extension management loops (such as unquoted globs, word-splitting, and unnecessary repeated copies in run-code-server.sh) are systematically tracked and fixed by quoting variables, using `cp -a --`, and toggling `nullglob`, following the established pattern of operational correctness improvements.
📚 Learning: jiridanek requested github issue creation for shell script quality improvements in codeserver/ubi9-p...
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:4-11
Timestamp: 2025-07-03T16:04:22.695Z
Learning: jiridanek requested GitHub issue creation for shell script quality improvements in codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh during PR #1269 review. Issue #1307 was created with comprehensive problem description covering variable scoping issues, POSIX compliance concerns, multiple solution options, acceptance criteria, implementation guidance with code examples, testing approaches, and proper context linking, continuing the established pattern of systematic code quality improvements.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: jiridanek requested github issue creation for shell script error handling improvements in codeserver...
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/opt/app-root/etc/generate_container_user:4-9
Timestamp: 2025-07-03T16:05:35.448Z
Learning: jiridanek requested GitHub issue creation for shell script error handling improvements in codeserver/ubi9-python-3.12/nginx/root/opt/app-root/etc/generate_container_user during PR #1269 review. A comprehensive issue was created covering silent failures, unquoted variable expansions, missing template validation, and strict mode implementation with detailed problem descriptions, phased acceptance criteria, implementation guidance with code examples, and proper context linking, continuing the established pattern of systematic code quality improvements.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: jiridanek requests github issue creation for shell script quality improvements identified during pr ...
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:4-11
Timestamp: 2025-07-03T12:08:47.691Z
Learning: jiridanek requests GitHub issue creation for shell script quality improvements identified during PR #1269 review, specifically for POSIX compliance and security issues in codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh. Issue #1275 was created with comprehensive problem descriptions, acceptance criteria, implementation guidance, and proper context linking.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: jiridanek requested github issue creation for shell script safety improvement in codeserver/ubi9-pyt...
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:23-23
Timestamp: 2025-07-03T12:29:24.067Z
Learning: jiridanek requested GitHub issue creation for shell script safety improvement in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review, specifically for replacing unsafe in-place file modification with tee. Issue #1285 was created with comprehensive problem descriptions, risk assessment, recommended atomic file operations solution, acceptance criteria, and proper context linking.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: in opendatahub-io/notebooks, shell scripting robustness and efficiency issues in extension managemen...
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T14:04:05.280Z
Learning: In opendatahub-io/notebooks, shell scripting robustness and efficiency issues in extension management loops (such as unquoted globs, word-splitting, and unnecessary repeated copies in run-code-server.sh) are systematically tracked and fixed by quoting variables, using `cp -a --`, and toggling `nullglob`, following the established pattern of operational correctness improvements.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: jiridanek requested github issue creation for shell script variable quoting security concern in code...
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:18-23
Timestamp: 2025-07-03T16:17:23.065Z
Learning: jiridanek requested GitHub issue creation for shell script variable quoting security concern in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review. The issue covers unquoted variables NB_PREFIX, NOTEBOOK_ARGS, and BASE_URL that pose security risks including command injection, word-splitting vulnerabilities, and globbing issues. A comprehensive issue was created with detailed problem description, security concerns, solution with code examples, acceptance criteria, implementation guidance, and proper context linking, continuing the established pattern of systematic code quality improvements.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: jiridanek requested github issue creation for nginx process management improvement in codeserver/ubi...
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:26-26
Timestamp: 2025-07-03T16:34:07.901Z
Learning: jiridanek requested GitHub issue creation for NGINX process management improvement in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review, specifically for replacing plain `nginx` command with `exec nginx -g 'daemon off;'` to improve signal handling, PID 1 management, and container best practices. Issue #1319 was created with comprehensive problem description, benefits analysis, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: jiridanek requested github issue creation for shell script strict mode improvement in codeserver/ubi...
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:5-6
Timestamp: 2025-07-03T16:04:30.516Z
Learning: jiridanek requested GitHub issue creation for shell script strict mode improvement in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review. Issue #1308 was created with comprehensive problem description covering limitations of `set -e`, detailed solution with `set -euo pipefail`, benefits explanation for each flag, acceptance criteria, risk assessment, testing approach, and proper context linking, continuing the established pattern of systematic code quality improvements for shell scripts.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: jiridanek requested github issue creation for fastcgi configuration improvement in codeserver/ubi9-p...
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/serverconf/proxy.conf.template:23-32
Timestamp: 2025-07-03T16:15:19.673Z
Learning: jiridanek requested GitHub issue creation for FastCGI configuration improvement in codeserver/ubi9-python-3.12/nginx/serverconf/proxy.conf.template during PR #1269 review, specifically for replacing hard-coded /opt/app-root path with $document_root variable to maintain DRY principle and improve maintainability. The issue includes comprehensive architectural overview of FastCGI, NGINX, and supervisord integration for health checking and activity monitoring, designed for compatibility with JupyterHub idle culler and Kubeflow notebook controller culling systems.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
🪛 Shellcheck (0.10.0)
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
[warning] 22-22: ShellCheck can't follow non-constant source. Use a directive to specify location.
(SC1090)
[warning] 24-24: ShellCheck can't follow non-constant source. Use a directive to specify location.
(SC1090)
🔇 Additional comments (1)
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh (1)
4-10: POSIX-compliant function declaration looks goodRemoving the
functionkeyword and switching to a plainname()definition is the correct step toward strict POSIX compliance. Thefind … -printf "%f\n"construct is also portable to GNU/BusyBox and avoids word-splitting issues because all parameters are properly quoted.
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
Show resolved
Hide resolved
| get_matched_files "$custom_dir" "$default_dir" '*.sh' | sort -u | while read -r filename; do | ||
| if [ "$filename" ]; then | ||
| echo "=> sourcing $filename ..." | ||
| if [ -f "$custom_dir/$filename" ]; then | ||
| . "$custom_dir/$filename" | ||
| elif [ -f "$default_dir/$filename" ]; then | ||
| . "$default_dir/$filename" | ||
| fi | ||
| done <<<"$(get_matched_files "$custom_dir" "$default_dir" '*.sh' | sort -u)" | ||
| fi | ||
| done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
❓ Verification inconclusive
Sub-shell created by pipeline may surprise future modifications
Piping into while read -r (… | while read …; do) runs the loop in a subshell in POSIX sh. That is fine today because the body only performs sourcing and logging, but if somebody later tries to mutate a variable outside the loop (e.g., sourced+=1), the change will be lost.
Two POSIX-safe alternatives that avoid the subshell:
# 1. Redirect loop body (preferred)
while IFS= read -r filename; do
...
done <<EOF
$(get_matched_files "$custom_dir" "$default_dir" '*.sh' | sort -u)
EOF
# 2. Use a temporary file
tmp=$(mktemp) || exit 1
get_matched_files "$custom_dir" "$default_dir" '*.sh' | sort -u >"$tmp"
while IFS= read -r filename; do
...
done <"$tmp"
rm -f "$tmp"Consider refactoring now while context is fresh to prevent future bugs.
Avoid subshell in pipeline-driven loops
Piping into while read …; do …; done runs the loop body in a subshell under POSIX /bin/sh, so any variables you modify inside (e.g. counters, flags) won’t propagate back out. Today you’re only sourcing and logging, but future changes could silently break.
Please refactor the loop in
• codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh (lines 18–27)
to one of these POSIX-compliant patterns:
-
Here-document with command substitution (preferred for small lists)
while IFS= read -r filename; do echo "=> sourcing $filename …" if [ -f "$custom_dir/$filename" ]; then . "$custom_dir/$filename" elif [ -f "$default_dir/$filename" ]; then . "$default_dir/$filename" fi done <<EOF $(get_matched_files "$custom_dir" "$default_dir" '*.sh' | sort -u) EOF
-
Temporary file (safer for large output)
tmp=$(mktemp) || exit 1 get_matched_files "$custom_dir" "$default_dir" '*.sh' | sort -u >"$tmp" while IFS= read -r filename; do echo "=> sourcing $filename …" if [ -f "$custom_dir/$filename" ]; then . "$custom_dir/$filename" elif [ -f "$default_dir/$filename" ]; then . "$default_dir/$filename" fi done <"$tmp" rm -f "$tmp"
Refactoring now will safeguard future additions that rely on variables set inside this loop.
🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 22-22: ShellCheck can't follow non-constant source. Use a directive to specify location.
(SC1090)
[warning] 24-24: ShellCheck can't follow non-constant source. Use a directive to specify location.
(SC1090)
🤖 Prompt for AI Agents
In
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
around lines 18 to 27, the current loop uses a pipeline which causes the loop
body to run in a subshell, preventing any variable changes inside the loop from
propagating outside. Refactor the loop to avoid the pipeline by using a
here-document with command substitution or a temporary file to feed the
filenames into the while-read loop. This change will ensure any variables
modified inside the loop persist after it completes and maintain POSIX
compliance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coderabbitai what about changing the #! to read /bin/bash, and then it would not be necessary to worry about POSIX compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jiridanek, that's an excellent architectural point! Changing to #!/bin/bash would indeed eliminate the POSIX compatibility constraints entirely, which aligns with your preference for solutions that remove complexity at the source.
However, this creates a trade-off with the current PR objectives:
Advantages of switching to bash:
- Eliminates subshell concerns with pipelines
- Allows using more robust constructs like arrays,
localvariables, and here-strings - Reduces cognitive overhead of POSIX limitations
Advantages of maintaining POSIX compliance:
- Better portability across minimal container images and embedded systems
- Guaranteed availability since
/bin/shis more universally present than/bin/bash - Smaller runtime dependencies
- Aligns with the current PR opendatahub-io/notebooks#1271: fix(scripts): posix noncompliance in
nginx/root/usr/share/container-scripts/nginx/common.shand duplicates of thereof #1628 goal of POSIX compliance
Given that this PR was specifically created to address issue #1271 requesting POSIX compliance for portability, switching to bash would fundamentally change the scope.
Question: Should we pivot this PR to use bash for simplicity, or do you want to maintain the POSIX compliance goal for portability reasons? If we switch to bash, we could revert most of the POSIX changes and use more robust bash constructs instead.
What's your priority here - maximum portability or implementation simplicity?
🧠 Learnings used
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:4-11
Timestamp: 2025-07-03T16:04:22.695Z
Learning: jiridanek requested GitHub issue creation for shell script quality improvements in codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh during PR #1269 review. Issue #1307 was created with comprehensive problem description covering variable scoping issues, POSIX compliance concerns, multiple solution options, acceptance criteria, implementation guidance with code examples, testing approaches, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T14:04:05.280Z
Learning: In opendatahub-io/notebooks, shell scripting robustness and efficiency issues in extension management loops (such as unquoted globs, word-splitting, and unnecessary repeated copies in run-code-server.sh) are systematically tracked and fixed by quoting variables, using `cp -a --`, and toggling `nullglob`, following the established pattern of operational correctness improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:4-11
Timestamp: 2025-07-03T12:08:47.691Z
Learning: jiridanek requests GitHub issue creation for shell script quality improvements identified during PR #1269 review, specifically for POSIX compliance and security issues in codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh. Issue #1275 was created with comprehensive problem descriptions, acceptance criteria, implementation guidance, and proper context linking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/opt/app-root/etc/generate_container_user:4-9
Timestamp: 2025-07-03T16:05:35.448Z
Learning: jiridanek requested GitHub issue creation for shell script error handling improvements in codeserver/ubi9-python-3.12/nginx/root/opt/app-root/etc/generate_container_user during PR #1269 review. A comprehensive issue was created covering silent failures, unquoted variable expansions, missing template validation, and strict mode implementation with detailed problem descriptions, phased acceptance criteria, implementation guidance with code examples, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:23-23
Timestamp: 2025-07-03T12:29:24.067Z
Learning: jiridanek requested GitHub issue creation for shell script safety improvement in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review, specifically for replacing unsafe in-place file modification with tee. Issue #1285 was created with comprehensive problem descriptions, risk assessment, recommended atomic file operations solution, acceptance criteria, and proper context linking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:26-26
Timestamp: 2025-07-03T16:34:07.901Z
Learning: jiridanek requested GitHub issue creation for NGINX process management improvement in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review, specifically for replacing plain `nginx` command with `exec nginx -g 'daemon off;'` to improve signal handling, PID 1 management, and container best practices. Issue #1319 was created with comprehensive problem description, benefits analysis, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:5-6
Timestamp: 2025-07-03T16:04:30.516Z
Learning: jiridanek requested GitHub issue creation for shell script strict mode improvement in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review. Issue #1308 was created with comprehensive problem description covering limitations of `set -e`, detailed solution with `set -euo pipefail`, benefits explanation for each flag, acceptance criteria, risk assessment, testing approach, and proper context linking, continuing the established pattern of systematic code quality improvements for shell scripts.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:20-40
Timestamp: 2025-07-03T12:27:09.739Z
Learning: jiridanek requested GitHub issue creation for shell script error handling improvements in codeserver/ubi9-python-3.12/run-code-server.sh create_dir_and_file function during PR #1269 review. Issue #1284 was created with comprehensive problem description, acceptance criteria, implementation guidance, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:18-23
Timestamp: 2025-07-03T16:17:23.065Z
Learning: jiridanek requested GitHub issue creation for shell script variable quoting security concern in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review. The issue covers unquoted variables NB_PREFIX, NOTEBOOK_ARGS, and BASE_URL that pose security risks including command injection, word-splitting vulnerabilities, and globbing issues. A comprehensive issue was created with detailed problem description, security concerns, solution with code examples, acceptance criteria, implementation guidance, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/serverconf/proxy.conf.template:23-32
Timestamp: 2025-07-03T16:15:19.673Z
Learning: jiridanek requested GitHub issue creation for FastCGI configuration improvement in codeserver/ubi9-python-3.12/nginx/serverconf/proxy.conf.template during PR #1269 review, specifically for replacing hard-coded /opt/app-root path with $document_root variable to maintain DRY principle and improve maintainability. The issue includes comprehensive architectural overview of FastCGI, NGINX, and supervisord integration for health checking and activity monitoring, designed for compatibility with JupyterHub idle culler and Kubeflow notebook controller culling systems.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:17-17
Timestamp: 2025-07-03T12:26:24.084Z
Learning: jiridanek requests GitHub issue creation for shell script quality improvements identified during PR #1269 review, specifically for unquoted command substitution in codeserver/ubi9-python-3.12/run-code-server.sh. Issue #1283 was created with comprehensive problem descriptions, acceptance criteria, implementation guidance, and proper context linking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:5-5
Timestamp: 2025-07-03T12:25:26.453Z
Learning: jiridanek requested GitHub issue creation for shell script safety improvements identified during PR #1269 review, specifically for unsafe globbing patterns in codeserver/ubi9-python-3.12/run-code-server.sh. Issue #1281 was created with comprehensive problem descriptions, solution options, acceptance criteria, and proper context linking, following the established pattern for systematic tracking of technical improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T13:27:38.813Z
Learning: jiridanek requested GitHub issue creation for comprehensive shell scripting improvements in codeserver image during PR #1269 review, covering process management, JSON parsing robustness, variable quoting security, and sed pattern fixes. Issue #1293 was created with systematic phased approach, detailed problem descriptions, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T13:27:38.813Z
Learning: jiridanek requested GitHub issue creation for comprehensive shell scripting improvements in codeserver image during PR #1269 review, covering process management, JSON parsing robustness, variable quoting security, and sed pattern fixes. Issue #1293 was created with systematic phased approach, detailed problem descriptions, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T13:31:35.667Z
Learning: jiridanek requested GitHub issue creation for comprehensive shell scripting improvements in codeserver image during PR #1269 review, covering process management, JSON parsing robustness, variable quoting security, and sed pattern fixes. Issue #1295 was created with systematic phased approach, detailed problem descriptions, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/utils/process.sh:1-2
Timestamp: 2025-07-03T16:00:46.191Z
Learning: jiridanek requested GitHub issue creation for shell script strict-mode improvement in codeserver/ubi9-python-3.12/utils/process.sh during PR #1269 review. Issue #1303 was created with comprehensive problem description covering silent failures and production risks, phased acceptance criteria for basic strict-mode implementation and enhanced error handling, implementation guidance with code examples and flag explanations, benefits section, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:1-3
Timestamp: 2025-07-03T12:07:19.365Z
Learning: jiridanek consistently requests GitHub issue creation for technical improvements identified during code reviews in opendatahub-io/notebooks, ensuring systematic tracking of code quality enhancements like shell script portability issues with comprehensive descriptions, solution options, and acceptance criteria.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#968
File: codeserver/ubi9-python-3.11/Dockerfile.cpu:138-140
Timestamp: 2025-08-01T16:07:58.701Z
Learning: jiridanek prefers architectural solutions that eliminate problems entirely rather than just fixing immediate technical issues. When presented with a pipeline safety concern about micropipenv requirements generation, he suggested removing micropipenv from the build process altogether by using pre-committed requirements.txt files, demonstrating preference for simplification and deterministic builds over complex workarounds.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1600
File: Makefile:0-0
Timestamp: 2025-08-02T08:49:03.735Z
Learning: jiridanek decided to eliminate '+' characters entirely from Makefile target names during PR #1600 review instead of implementing complex substitution workarounds, demonstrating his consistent preference for architectural solutions that eliminate problems at the source rather than adding complexity to handle edge cases.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/utils/process.sh:17-19
Timestamp: 2025-07-03T14:00:00.909Z
Learning: jiridanek efficiently identifies when CodeRabbit review suggestions are already covered by existing comprehensive issues, demonstrating excellent issue management and avoiding duplicate tracking of the same improvements across multiple locations.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1151
File: jupyter/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb:31-34
Timestamp: 2025-07-01T07:03:05.385Z
Learning: jiridanek demonstrates excellent pattern recognition for identifying duplicated code issues across the opendatahub-io/notebooks repository. When spotting a potential problem in test notebooks, he correctly assesses that such patterns are likely replicated across multiple similar files rather than being isolated incidents, leading to more effective systematic solutions.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1259
File: jupyter/rocm/tensorflow/ubi9-python-3.12/Dockerfile.rocm:56-66
Timestamp: 2025-07-02T18:19:49.397Z
Learning: jiridanek consistently creates comprehensive follow-up GitHub issues for security concerns raised during PR reviews in opendatahub-io/notebooks, ensuring systematic tracking and resolution of supply-chain security improvements like GPG signature verification for package repositories.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:1-2
Timestamp: 2025-07-03T16:08:47.251Z
Learning: jiridanek requested GitHub issue creation for shell strict mode improvement in codeserver/ubi9-python-3.12/run-code-server.sh during PR #1269 review. Issue #1310 was created with comprehensive problem description covering silent failures, production risks, implementation guidance with code examples, acceptance criteria, testing approach, and proper context linking, continuing the established pattern of systematic code quality improvements for the codeserver image entrypoint script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do have bash available in all our docker images, so it makes sense to me to make use of it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jiridanek Perfect! That's a much cleaner architectural solution. Since bash is guaranteed available in your Docker images, switching to #!/bin/bash eliminates the POSIX constraints entirely and allows using more robust shell constructs.
This would mean:
- Reverting the POSIX changes in this PR and using bash-specific features instead
- Keeping
localvariables for better scoping - Using here-strings or arrays for cleaner loop constructs
- Adding
set -euo pipefailfor better error handling - Eliminating the subshell pipeline issue I flagged completely
Should we:
- Pivot this PR to convert the shebang to bash and revert the POSIX changes, or
- Create a follow-up issue for systematic bash adoption across the codeserver shell scripts?
Given your preference for architectural solutions, option 1 would address the root cause immediately rather than layering POSIX workarounds on top.
✏️ Learnings added
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1628
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:18-27
Timestamp: 2025-08-04T08:26:31.110Z
Learning: jiridanek confirmed that bash is available in all Docker images in the opendatahub-io/notebooks project, preferring to use bash instead of maintaining POSIX compliance for shell scripts. This aligns with his architectural preference for eliminating complexity at the source rather than implementing workarounds for POSIX limitations.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
🧠 Learnings used
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:4-11
Timestamp: 2025-07-03T16:04:22.695Z
Learning: jiridanek requested GitHub issue creation for shell script quality improvements in codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh during PR #1269 review. Issue #1307 was created with comprehensive problem description covering variable scoping issues, POSIX compliance concerns, multiple solution options, acceptance criteria, implementation guidance with code examples, testing approaches, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T14:04:05.280Z
Learning: In opendatahub-io/notebooks, shell scripting robustness and efficiency issues in extension management loops (such as unquoted globs, word-splitting, and unnecessary repeated copies in run-code-server.sh) are systematically tracked and fixed by quoting variables, using `cp -a --`, and toggling `nullglob`, following the established pattern of operational correctness improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:4-11
Timestamp: 2025-07-03T12:08:47.691Z
Learning: jiridanek requests GitHub issue creation for shell script quality improvements identified during PR #1269 review, specifically for POSIX compliance and security issues in codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh. Issue #1275 was created with comprehensive problem descriptions, acceptance criteria, implementation guidance, and proper context linking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/opt/app-root/etc/generate_container_user:4-9
Timestamp: 2025-07-03T16:05:35.448Z
Learning: jiridanek requested GitHub issue creation for shell script error handling improvements in codeserver/ubi9-python-3.12/nginx/root/opt/app-root/etc/generate_container_user during PR #1269 review. A comprehensive issue was created covering silent failures, unquoted variable expansions, missing template validation, and strict mode implementation with detailed problem descriptions, phased acceptance criteria, implementation guidance with code examples, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:23-23
Timestamp: 2025-07-03T12:29:24.067Z
Learning: jiridanek requested GitHub issue creation for shell script safety improvement in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review, specifically for replacing unsafe in-place file modification with tee. Issue #1285 was created with comprehensive problem descriptions, risk assessment, recommended atomic file operations solution, acceptance criteria, and proper context linking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:26-26
Timestamp: 2025-07-03T16:34:07.901Z
Learning: jiridanek requested GitHub issue creation for NGINX process management improvement in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review, specifically for replacing plain `nginx` command with `exec nginx -g 'daemon off;'` to improve signal handling, PID 1 management, and container best practices. Issue #1319 was created with comprehensive problem description, benefits analysis, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:5-6
Timestamp: 2025-07-03T16:04:30.516Z
Learning: jiridanek requested GitHub issue creation for shell script strict mode improvement in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review. Issue #1308 was created with comprehensive problem description covering limitations of `set -e`, detailed solution with `set -euo pipefail`, benefits explanation for each flag, acceptance criteria, risk assessment, testing approach, and proper context linking, continuing the established pattern of systematic code quality improvements for shell scripts.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:20-40
Timestamp: 2025-07-03T12:27:09.739Z
Learning: jiridanek requested GitHub issue creation for shell script error handling improvements in codeserver/ubi9-python-3.12/run-code-server.sh create_dir_and_file function during PR #1269 review. Issue #1284 was created with comprehensive problem description, acceptance criteria, implementation guidance, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:18-23
Timestamp: 2025-07-03T16:17:23.065Z
Learning: jiridanek requested GitHub issue creation for shell script variable quoting security concern in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review. The issue covers unquoted variables NB_PREFIX, NOTEBOOK_ARGS, and BASE_URL that pose security risks including command injection, word-splitting vulnerabilities, and globbing issues. A comprehensive issue was created with detailed problem description, security concerns, solution with code examples, acceptance criteria, implementation guidance, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/serverconf/proxy.conf.template:23-32
Timestamp: 2025-07-03T16:15:19.673Z
Learning: jiridanek requested GitHub issue creation for FastCGI configuration improvement in codeserver/ubi9-python-3.12/nginx/serverconf/proxy.conf.template during PR #1269 review, specifically for replacing hard-coded /opt/app-root path with $document_root variable to maintain DRY principle and improve maintainability. The issue includes comprehensive architectural overview of FastCGI, NGINX, and supervisord integration for health checking and activity monitoring, designed for compatibility with JupyterHub idle culler and Kubeflow notebook controller culling systems.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:17-17
Timestamp: 2025-07-03T12:26:24.084Z
Learning: jiridanek requests GitHub issue creation for shell script quality improvements identified during PR #1269 review, specifically for unquoted command substitution in codeserver/ubi9-python-3.12/run-code-server.sh. Issue #1283 was created with comprehensive problem descriptions, acceptance criteria, implementation guidance, and proper context linking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:5-5
Timestamp: 2025-07-03T12:25:26.453Z
Learning: jiridanek requested GitHub issue creation for shell script safety improvements identified during PR #1269 review, specifically for unsafe globbing patterns in codeserver/ubi9-python-3.12/run-code-server.sh. Issue #1281 was created with comprehensive problem descriptions, solution options, acceptance criteria, and proper context linking, following the established pattern for systematic tracking of technical improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T13:31:35.667Z
Learning: jiridanek requested GitHub issue creation for comprehensive shell scripting improvements in codeserver image during PR #1269 review, covering process management, JSON parsing robustness, variable quoting security, and sed pattern fixes. Issue #1295 was created with systematic phased approach, detailed problem descriptions, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:1-2
Timestamp: 2025-07-03T16:08:47.251Z
Learning: jiridanek requested GitHub issue creation for shell strict mode improvement in codeserver/ubi9-python-3.12/run-code-server.sh during PR #1269 review. Issue #1310 was created with comprehensive problem description covering silent failures, production risks, implementation guidance with code examples, acceptance criteria, testing approach, and proper context linking, continuing the established pattern of systematic code quality improvements for the codeserver image entrypoint script.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T13:27:38.813Z
Learning: jiridanek requested GitHub issue creation for comprehensive shell scripting improvements in codeserver image during PR #1269 review, covering process management, JSON parsing robustness, variable quoting security, and sed pattern fixes. Issue #1293 was created with systematic phased approach, detailed problem descriptions, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T13:27:38.813Z
Learning: jiridanek requested GitHub issue creation for comprehensive shell scripting improvements in codeserver image during PR #1269 review, covering process management, JSON parsing robustness, variable quoting security, and sed pattern fixes. Issue #1293 was created with systematic phased approach, detailed problem descriptions, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/utils/process.sh:1-2
Timestamp: 2025-07-03T16:00:46.191Z
Learning: jiridanek requested GitHub issue creation for shell script strict-mode improvement in codeserver/ubi9-python-3.12/utils/process.sh during PR #1269 review. Issue #1303 was created with comprehensive problem description covering silent failures and production risks, phased acceptance criteria for basic strict-mode implementation and enhanced error handling, implementation guidance with code examples and flag explanations, benefits section, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:1-3
Timestamp: 2025-07-03T12:07:19.365Z
Learning: jiridanek consistently requests GitHub issue creation for technical improvements identified during code reviews in opendatahub-io/notebooks, ensuring systematic tracking of code quality enhancements like shell script portability issues with comprehensive descriptions, solution options, and acceptance criteria.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#968
File: codeserver/ubi9-python-3.11/Dockerfile.cpu:138-140
Timestamp: 2025-08-01T16:07:58.701Z
Learning: jiridanek prefers architectural solutions that eliminate problems entirely rather than just fixing immediate technical issues. When presented with a pipeline safety concern about micropipenv requirements generation, he suggested removing micropipenv from the build process altogether by using pre-committed requirements.txt files, demonstrating preference for simplification and deterministic builds over complex workarounds.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1600
File: Makefile:0-0
Timestamp: 2025-08-02T08:49:03.735Z
Learning: jiridanek decided to eliminate '+' characters entirely from Makefile target names during PR #1600 review instead of implementing complex substitution workarounds, demonstrating his consistent preference for architectural solutions that eliminate problems at the source rather than adding complexity to handle edge cases.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/utils/process.sh:17-19
Timestamp: 2025-07-03T14:00:00.909Z
Learning: jiridanek efficiently identifies when CodeRabbit review suggestions are already covered by existing comprehensive issues, demonstrating excellent issue management and avoiding duplicate tracking of the same improvements across multiple locations.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1151
File: jupyter/tensorflow/ubi9-python-3.12/test/test_notebook.ipynb:31-34
Timestamp: 2025-07-01T07:03:05.385Z
Learning: jiridanek demonstrates excellent pattern recognition for identifying duplicated code issues across the opendatahub-io/notebooks repository. When spotting a potential problem in test notebooks, he correctly assesses that such patterns are likely replicated across multiple similar files rather than being isolated incidents, leading to more effective systematic solutions.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1259
File: jupyter/rocm/tensorflow/ubi9-python-3.12/Dockerfile.rocm:56-66
Timestamp: 2025-07-02T18:19:49.397Z
Learning: jiridanek consistently creates comprehensive follow-up GitHub issues for security concerns raised during PR reviews in opendatahub-io/notebooks, ensuring systematic tracking and resolution of supply-chain security improvements like GPG signature verification for package repositories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jiridanek what are your final thoughts on this? Are we going with POSIX-compliant or bash? Please let me know so I can make changes accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!
Let's rather add the `#!/usr/bin/env bash` and just use bash
a28109c to
a408dc0
Compare
|
/ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (4)
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh (4)
1-1: Switch to bash looks good; add strict mode.Enable fail-fast to surface sourcing errors early.
[study/approve_code_changes]#!/usr/bin/env bash +set -Eeuo pipefail
5-10: Avoid leaking files_matched to global scope.Declare it local to prevent accidental reuse.
- local custom_dir default_dir + local custom_dir default_dir files_matched custom_dir="$1" default_dir="$2" files_matched="$3"
20-31: Loop structure is bash-friendly; prefer an explicit non-empty check.Minor clarity/readability improvement.
- if [ "$filename" ]; then + if [[ -n $filename ]]; then
25-27: Silence ShellCheck SC1090 for dynamic sources.Document intent so CI lint passes cleanly.
- source "$custom_dir/$filename" + # shellcheck disable=SC1090 + source "$custom_dir/$filename" @@ - source "$default_dir/$filename" + # shellcheck disable=SC1090 + source "$default_dir/$filename"
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh(2 hunks)
🧰 Additional context used
🧠 Learnings (25)
📓 Common learnings
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:4-11
Timestamp: 2025-07-03T12:08:47.691Z
Learning: jiridanek requests GitHub issue creation for shell script quality improvements identified during PR #1269 review, specifically for POSIX compliance and security issues in codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh. Issue #1275 was created with comprehensive problem descriptions, acceptance criteria, implementation guidance, and proper context linking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:4-11
Timestamp: 2025-07-03T16:04:22.695Z
Learning: jiridanek requested GitHub issue creation for shell script quality improvements in codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh during PR #1269 review. Issue #1307 was created with comprehensive problem description covering variable scoping issues, POSIX compliance concerns, multiple solution options, acceptance criteria, implementation guidance with code examples, testing approaches, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T13:31:35.667Z
Learning: jiridanek requested GitHub issue creation for comprehensive shell scripting improvements in codeserver image during PR #1269 review, covering process management, JSON parsing robustness, variable quoting security, and sed pattern fixes. Issue #1295 was created with systematic phased approach, detailed problem descriptions, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T13:27:38.813Z
Learning: jiridanek requested GitHub issue creation for comprehensive shell scripting improvements in codeserver image during PR #1269 review, covering process management, JSON parsing robustness, variable quoting security, and sed pattern fixes. Issue #1293 was created with systematic phased approach, detailed problem descriptions, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T13:27:38.813Z
Learning: jiridanek requested GitHub issue creation for comprehensive shell scripting improvements in codeserver image during PR #1269 review, covering process management, JSON parsing robustness, variable quoting security, and sed pattern fixes. Issue #1293 was created with systematic phased approach, detailed problem descriptions, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:5-5
Timestamp: 2025-07-03T12:25:26.453Z
Learning: jiridanek requested GitHub issue creation for shell script safety improvements identified during PR #1269 review, specifically for unsafe globbing patterns in codeserver/ubi9-python-3.12/run-code-server.sh. Issue #1281 was created with comprehensive problem descriptions, solution options, acceptance criteria, and proper context linking, following the established pattern for systematic tracking of technical improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:17-17
Timestamp: 2025-07-03T12:26:24.084Z
Learning: jiridanek requests GitHub issue creation for shell script quality improvements identified during PR #1269 review, specifically for unquoted command substitution in codeserver/ubi9-python-3.12/run-code-server.sh. Issue #1283 was created with comprehensive problem descriptions, acceptance criteria, implementation guidance, and proper context linking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/opt/app-root/etc/generate_container_user:4-9
Timestamp: 2025-07-03T16:05:35.448Z
Learning: jiridanek requested GitHub issue creation for shell script error handling improvements in codeserver/ubi9-python-3.12/nginx/root/opt/app-root/etc/generate_container_user during PR #1269 review. A comprehensive issue was created covering silent failures, unquoted variable expansions, missing template validation, and strict mode implementation with detailed problem descriptions, phased acceptance criteria, implementation guidance with code examples, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-09-10T21:19:43.576Z
Learning: jiridanek requested GitHub issue creation for shell syntax fix in codeserver/ubi9-python-3.12/get_code_server_rpm.sh during PR #2356 review. Issue #2397 was created addressing missing whitespace around || operator on line 20 that can cause parsing errors, with exact code diff showing the required fix, continuing the established pattern of systematic shell script quality improvements through detailed issue tracking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-09-10T21:19:43.576Z
Learning: jiridanek requested GitHub issue creation for shell syntax fix in codeserver/ubi9-python-3.12/get_code_server_rpm.sh during PR #2356 review. Issue #2397 was created addressing missing whitespace around || operator on line 20 that can cause parsing errors, with exact code diff showing the required fix, continuing the established pattern of systematic shell script quality improvements through detailed issue tracking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T14:04:05.280Z
Learning: In opendatahub-io/notebooks, shell scripting robustness and efficiency issues in extension management loops (such as unquoted globs, word-splitting, and unnecessary repeated copies in run-code-server.sh) are systematically tracked and fixed by quoting variables, using `cp -a --`, and toggling `nullglob`, following the established pattern of operational correctness improvements.
📚 Learning: 2025-07-03T16:04:22.695Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:4-11
Timestamp: 2025-07-03T16:04:22.695Z
Learning: jiridanek requested GitHub issue creation for shell script quality improvements in codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh during PR #1269 review. Issue #1307 was created with comprehensive problem description covering variable scoping issues, POSIX compliance concerns, multiple solution options, acceptance criteria, implementation guidance with code examples, testing approaches, and proper context linking, continuing the established pattern of systematic code quality improvements.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T12:08:47.691Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:4-11
Timestamp: 2025-07-03T12:08:47.691Z
Learning: jiridanek requests GitHub issue creation for shell script quality improvements identified during PR #1269 review, specifically for POSIX compliance and security issues in codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh. Issue #1275 was created with comprehensive problem descriptions, acceptance criteria, implementation guidance, and proper context linking.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T16:05:35.448Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/opt/app-root/etc/generate_container_user:4-9
Timestamp: 2025-07-03T16:05:35.448Z
Learning: jiridanek requested GitHub issue creation for shell script error handling improvements in codeserver/ubi9-python-3.12/nginx/root/opt/app-root/etc/generate_container_user during PR #1269 review. A comprehensive issue was created covering silent failures, unquoted variable expansions, missing template validation, and strict mode implementation with detailed problem descriptions, phased acceptance criteria, implementation guidance with code examples, and proper context linking, continuing the established pattern of systematic code quality improvements.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T12:29:24.067Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:23-23
Timestamp: 2025-07-03T12:29:24.067Z
Learning: jiridanek requested GitHub issue creation for shell script safety improvement in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review, specifically for replacing unsafe in-place file modification with tee. Issue #1285 was created with comprehensive problem descriptions, risk assessment, recommended atomic file operations solution, acceptance criteria, and proper context linking.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T16:17:23.065Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:18-23
Timestamp: 2025-07-03T16:17:23.065Z
Learning: jiridanek requested GitHub issue creation for shell script variable quoting security concern in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review. The issue covers unquoted variables NB_PREFIX, NOTEBOOK_ARGS, and BASE_URL that pose security risks including command injection, word-splitting vulnerabilities, and globbing issues. A comprehensive issue was created with detailed problem description, security concerns, solution with code examples, acceptance criteria, implementation guidance, and proper context linking, continuing the established pattern of systematic code quality improvements.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T16:34:07.901Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:26-26
Timestamp: 2025-07-03T16:34:07.901Z
Learning: jiridanek requested GitHub issue creation for NGINX process management improvement in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review, specifically for replacing plain `nginx` command with `exec nginx -g 'daemon off;'` to improve signal handling, PID 1 management, and container best practices. Issue #1319 was created with comprehensive problem description, benefits analysis, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T16:04:30.516Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:5-6
Timestamp: 2025-07-03T16:04:30.516Z
Learning: jiridanek requested GitHub issue creation for shell script strict mode improvement in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review. Issue #1308 was created with comprehensive problem description covering limitations of `set -e`, detailed solution with `set -euo pipefail`, benefits explanation for each flag, acceptance criteria, risk assessment, testing approach, and proper context linking, continuing the established pattern of systematic code quality improvements for shell scripts.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T16:15:19.673Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/serverconf/proxy.conf.template:23-32
Timestamp: 2025-07-03T16:15:19.673Z
Learning: jiridanek requested GitHub issue creation for FastCGI configuration improvement in codeserver/ubi9-python-3.12/nginx/serverconf/proxy.conf.template during PR #1269 review, specifically for replacing hard-coded /opt/app-root path with $document_root variable to maintain DRY principle and improve maintainability. Issue #1311 was created with comprehensive architectural overview of FastCGI, NGINX, and supervisord integration for health checking and activity monitoring, designed for compatibility with JupyterHub idle culler and Kubeflow notebook controller culling systems.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T16:15:19.673Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/serverconf/proxy.conf.template:23-32
Timestamp: 2025-07-03T16:15:19.673Z
Learning: jiridanek requested GitHub issue creation for FastCGI configuration improvement in codeserver/ubi9-python-3.12/nginx/serverconf/proxy.conf.template during PR #1269 review, specifically for replacing hard-coded /opt/app-root path with $document_root variable to maintain DRY principle and improve maintainability. The issue includes comprehensive architectural overview of FastCGI, NGINX, and supervisord integration for health checking and activity monitoring, designed for compatibility with JupyterHub idle culler and Kubeflow notebook controller culling systems.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T12:26:24.084Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:17-17
Timestamp: 2025-07-03T12:26:24.084Z
Learning: jiridanek requests GitHub issue creation for shell script quality improvements identified during PR #1269 review, specifically for unquoted command substitution in codeserver/ubi9-python-3.12/run-code-server.sh. Issue #1283 was created with comprehensive problem descriptions, acceptance criteria, implementation guidance, and proper context linking.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-09-10T21:21:29.972Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-09-10T21:21:29.972Z
Learning: jiridanek requested GitHub issue creation for shell syntax fix in codeserver/ubi9-python-3.12/get_code_server_rpm.sh during PR #2356 review. Issue #2399 was created addressing missing whitespace around || operator on line 20 that can cause parsing errors, with exact code diff showing the required fix, continuing the established pattern of systematic shell script quality improvements through detailed issue tracking.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-09-10T21:19:43.576Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-09-10T21:19:43.576Z
Learning: jiridanek requested GitHub issue creation for shell syntax fix in codeserver/ubi9-python-3.12/get_code_server_rpm.sh during PR #2356 review. Issue #2397 was created addressing missing whitespace around || operator on line 20 that can cause parsing errors, with exact code diff showing the required fix, continuing the established pattern of systematic shell script quality improvements through detailed issue tracking.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T12:25:26.453Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:5-5
Timestamp: 2025-07-03T12:25:26.453Z
Learning: jiridanek requested GitHub issue creation for shell script safety improvements identified during PR #1269 review, specifically for unsafe globbing patterns in codeserver/ubi9-python-3.12/run-code-server.sh. Issue #1281 was created with comprehensive problem descriptions, solution options, acceptance criteria, and proper context linking, following the established pattern for systematic tracking of technical improvements.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T14:04:05.280Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T14:04:05.280Z
Learning: In opendatahub-io/notebooks, shell scripting robustness and efficiency issues in extension management loops (such as unquoted globs, word-splitting, and unnecessary repeated copies in run-code-server.sh) are systematically tracked and fixed by quoting variables, using `cp -a --`, and toggling `nullglob`, following the established pattern of operational correctness improvements.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T16:19:19.763Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:22-22
Timestamp: 2025-07-03T16:19:19.763Z
Learning: jiridanek requested GitHub issue creation for envsubst variable delimiter syntax error in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review. Issue #1316 was created with comprehensive problem description covering the comma vs. space delimiter issue in envsubst command, impact analysis including silent failures and security risks, proposed solutions with validation, acceptance criteria, testing approach, and proper context linking, continuing the established pattern of systematic code quality improvements.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-09-05T12:35:05.115Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#2227
File: codeserver/ubi9-python-3.12/get_code_server_rpm.sh:48-48
Timestamp: 2025-09-05T12:35:05.115Z
Learning: jiridanek requested GitHub issue creation for shell script quality improvement in codeserver/ubi9-python-3.12/get_code_server_rpm.sh during PR #2227 review, specifically for PKG_CONFIG_PATH assignment issues including SC2155 shellcheck warning and expensive global find operation. Issue was created with comprehensive problem description, three solution options with pkg-config built-in functionality as recommended approach, detailed acceptance criteria, and implementation guidance, continuing the established pattern of systematic code quality improvements through detailed issue tracking.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-09-05T12:35:05.115Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#2227
File: codeserver/ubi9-python-3.12/get_code_server_rpm.sh:48-48
Timestamp: 2025-09-05T12:35:05.115Z
Learning: jiridanek requested GitHub issue creation for shell script quality improvement in codeserver/ubi9-python-3.12/get_code_server_rpm.sh during PR #2227 review, specifically for PKG_CONFIG_PATH assignment issues including SC2155 shellcheck warning and expensive global find operation. Issue #2319 was created with comprehensive problem description, three solution options with pkg-config built-in functionality as recommended approach, detailed acceptance criteria, and implementation guidance, continuing the established pattern of systematic code quality improvements through detailed issue tracking.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-08-04T08:26:31.135Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1628
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:18-27
Timestamp: 2025-08-04T08:26:31.135Z
Learning: jiridanek confirmed that bash is available in all Docker images in the opendatahub-io/notebooks project, preferring to use bash instead of maintaining POSIX compliance for shell scripts. This aligns with his architectural preference for eliminating complexity at the source rather than implementing workarounds for POSIX limitations.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T16:00:46.191Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/utils/process.sh:1-2
Timestamp: 2025-07-03T16:00:46.191Z
Learning: jiridanek requested GitHub issue creation for shell script strict-mode improvement in codeserver/ubi9-python-3.12/utils/process.sh during PR #1269 review. Issue #1303 was created with comprehensive problem description covering silent failures and production risks, phased acceptance criteria for basic strict-mode implementation and enhanced error handling, implementation guidance with code examples and flag explanations, benefits section, and proper context linking, continuing the established pattern of systematic code quality improvements.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T16:08:47.251Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:1-2
Timestamp: 2025-07-03T16:08:47.251Z
Learning: jiridanek requested GitHub issue creation for shell strict mode improvement in codeserver/ubi9-python-3.12/run-code-server.sh during PR #1269 review. Issue #1310 was created with comprehensive problem description covering silent failures, production risks, implementation guidance with code examples, acceptance criteria, testing approach, and proper context linking, continuing the established pattern of systematic code quality improvements for the codeserver image entrypoint script.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T13:31:35.667Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T13:31:35.667Z
Learning: jiridanek requested GitHub issue creation for comprehensive shell scripting improvements in codeserver image during PR #1269 review, covering process management, JSON parsing robustness, variable quoting security, and sed pattern fixes. Issue #1295 was created with systematic phased approach, detailed problem descriptions, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T13:27:38.813Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T13:27:38.813Z
Learning: jiridanek requested GitHub issue creation for comprehensive shell scripting improvements in codeserver image during PR #1269 review, covering process management, JSON parsing robustness, variable quoting security, and sed pattern fixes. Issue #1293 was created with systematic phased approach, detailed problem descriptions, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-09-05T12:25:58.344Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#2227
File: codeserver/ubi9-python-3.12/Dockerfile.cpu:126-128
Timestamp: 2025-09-05T12:25:58.344Z
Learning: jiridanek expressed concern about code-server installation complexity in codeserver/ubi9-python-3.12/Dockerfile.cpu during PR #2227 review, describing the multi-stage cache mount approach as a "hack" that worries them. GitHub issue #2315 was created addressing the architectural complexity with comprehensive problem description, four solution options, clear acceptance criteria, and implementation considerations, assigned to jiridanek, continuing the established pattern of systematic technical improvement tracking.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-09-05T12:10:50.856Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#2215
File: runtimes/datascience/ubi9-python-3.12/Dockerfile.cpu:0-0
Timestamp: 2025-09-05T12:10:50.856Z
Learning: jiridanek requested GitHub issue creation for Dockerfile environment variable refactoring during PR #2215 review. Issue #2311 was created addressing build-only variables (OPENBLAS_VERSION, ONNX_VERSION, GRPC_PYTHON_BUILD_SYSTEM_OPENSSL) being unnecessarily written to /etc/profile.d/ppc64le.sh in runtimes/datascience/ubi9-python-3.12/Dockerfile.cpu, causing variable duplication across stages, unreliable sourcing in non-login build contexts, and violation of DRY principles. The issue includes comprehensive problem description covering affected lines 30-37, detailed impact analysis of build reliability and maintenance overhead, three solution options with centralized ARG/ENV approach as recommended, clear acceptance criteria for version centralization and build-only variable cleanup, and specific implementation guidance with code examples, assigned to jiridanek, continuing the established pattern of systematic infrastructure improvements through detailed issue tracking.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
🧬 Code graph analysis (1)
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh (2)
rstudio/rhel9-python-3.11/nginx/root/usr/share/container-scripts/nginx/common.sh (1)
get_matched_files(4-11)rstudio/c9s-python-3.11/nginx/root/usr/share/container-scripts/nginx/common.sh (1)
get_matched_files(4-11)
🪛 Shellcheck (0.10.0)
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
[warning] 25-25: ShellCheck can't follow non-constant source. Use a directive to specify location.
(SC1090)
[warning] 27-27: ShellCheck can't follow non-constant source. Use a directive to specify location.
(SC1090)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build (cuda-rstudio-c9s-python-3.11, 3.11, linux/amd64, false) / build
- GitHub Check: build (codeserver-ubi9-python-3.12, 3.12, linux/arm64, false) / build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
tests/test_main.py (1)
335-335: Remove commented-out write-through to avoid accidental repo mutation in tests.This is dead code and risky if uncommented during debugging.
- # file.write_text(first_file.read_text()) # update rest according to first
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
tests/test_main.py(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:4-11
Timestamp: 2025-07-03T12:08:47.691Z
Learning: jiridanek requests GitHub issue creation for shell script quality improvements identified during PR #1269 review, specifically for POSIX compliance and security issues in codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh. Issue #1275 was created with comprehensive problem descriptions, acceptance criteria, implementation guidance, and proper context linking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T13:31:35.667Z
Learning: jiridanek requested GitHub issue creation for comprehensive shell scripting improvements in codeserver image during PR #1269 review, covering process management, JSON parsing robustness, variable quoting security, and sed pattern fixes. Issue #1295 was created with systematic phased approach, detailed problem descriptions, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:4-11
Timestamp: 2025-07-03T16:04:22.695Z
Learning: jiridanek requested GitHub issue creation for shell script quality improvements in codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh during PR #1269 review. Issue #1307 was created with comprehensive problem description covering variable scoping issues, POSIX compliance concerns, multiple solution options, acceptance criteria, implementation guidance with code examples, testing approaches, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T13:27:38.813Z
Learning: jiridanek requested GitHub issue creation for comprehensive shell scripting improvements in codeserver image during PR #1269 review, covering process management, JSON parsing robustness, variable quoting security, and sed pattern fixes. Issue #1293 was created with systematic phased approach, detailed problem descriptions, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T13:27:38.813Z
Learning: jiridanek requested GitHub issue creation for comprehensive shell scripting improvements in codeserver image during PR #1269 review, covering process management, JSON parsing robustness, variable quoting security, and sed pattern fixes. Issue #1293 was created with systematic phased approach, detailed problem descriptions, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:5-5
Timestamp: 2025-07-03T12:25:26.453Z
Learning: jiridanek requested GitHub issue creation for shell script safety improvements identified during PR #1269 review, specifically for unsafe globbing patterns in codeserver/ubi9-python-3.12/run-code-server.sh. Issue #1281 was created with comprehensive problem descriptions, solution options, acceptance criteria, and proper context linking, following the established pattern for systematic tracking of technical improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:17-17
Timestamp: 2025-07-03T12:26:24.084Z
Learning: jiridanek requests GitHub issue creation for shell script quality improvements identified during PR #1269 review, specifically for unquoted command substitution in codeserver/ubi9-python-3.12/run-code-server.sh. Issue #1283 was created with comprehensive problem descriptions, acceptance criteria, implementation guidance, and proper context linking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/utils/process.sh:1-2
Timestamp: 2025-07-03T16:00:46.191Z
Learning: jiridanek requested GitHub issue creation for shell script strict-mode improvement in codeserver/ubi9-python-3.12/utils/process.sh during PR #1269 review. Issue #1303 was created with comprehensive problem description covering silent failures and production risks, phased acceptance criteria for basic strict-mode implementation and enhanced error handling, implementation guidance with code examples and flag explanations, benefits section, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/opt/app-root/etc/generate_container_user:4-9
Timestamp: 2025-07-03T16:05:35.448Z
Learning: jiridanek requested GitHub issue creation for shell script error handling improvements in codeserver/ubi9-python-3.12/nginx/root/opt/app-root/etc/generate_container_user during PR #1269 review. A comprehensive issue was created covering silent failures, unquoted variable expansions, missing template validation, and strict mode implementation with detailed problem descriptions, phased acceptance criteria, implementation guidance with code examples, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-09-10T21:19:43.576Z
Learning: jiridanek requested GitHub issue creation for shell syntax fix in codeserver/ubi9-python-3.12/get_code_server_rpm.sh during PR #2356 review. Issue #2397 was created addressing missing whitespace around || operator on line 20 that can cause parsing errors, with exact code diff showing the required fix, continuing the established pattern of systematic shell script quality improvements through detailed issue tracking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:23-23
Timestamp: 2025-07-03T12:29:24.067Z
Learning: jiridanek requested GitHub issue creation for shell script safety improvement in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review, specifically for replacing unsafe in-place file modification with tee. Issue #1285 was created with comprehensive problem descriptions, risk assessment, recommended atomic file operations solution, acceptance criteria, and proper context linking.
🔇 Additional comments (1)
tests/test_main.py (1)
326-330: Enforce POSIX compliance for nginx/common.sh (add test)Good to assert the three files are identical, but that doesn't guarantee POSIX sh (see #1271). Add a focused test that bans common bashisms and enforces an sh-compatible shebang.
Add to tests/test_main.py (near the current snippet):
def test_nginx_common_sh_is_posix_compliant(): targets = [ PROJECT_ROOT / "codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh", PROJECT_ROOT / "rstudio/c9s-python-3.11/nginx/root/usr/share/container-scripts/nginx/common.sh", PROJECT_ROOT / "rstudio/rhel9-python-3.11/nginx/root/usr/share/container-scripts/nginx/common.sh", ] banned = { r"^\s*#!.*\bbash\b": "shebang must be /bin/sh or /usr/bin/env sh, not bash", r"\bsource\b": "use '.' instead of 'source'", r"<<<": "here-strings are bash-only", r"\[\[": "use [ ] not [[ ]]", r"\bfunction\b": "avoid 'function' keyword", r"\blocal\b": "avoid 'local' in POSIX sh", r"<\([^)]*\)|>\([^)]*\)": "process substitution is bash-only", } for f in targets: text = f.read_text() for pat, msg in banned.items(): m = re.search(pat, text, flags=re.MULTILINE) assert not m, f"{f}: {msg} (matched: {m.group(0)!r})"Optional quick repo check (run locally or in CI — sandbox may lack utilities like tee):
#!/bin/bash set -euo pipefail fd -t f common.sh | rg -n '/container-scripts/nginx/common\.sh$' | cut -d: -f1 | sort -u > /tmp/common_sh_list rg -nP '^\s*#\!.*\bbash\b' -f /tmp/common_sh_list || true rg -n --fixed-strings -e '<<<' -e 'source ' -e '[[ ' -e 'function ' -e ' local ' -f /tmp/common_sh_list || true
|
@satnam72: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (1)
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh (1)
18-19: Quote positional-parameter assignments (repeat)Same nit as previously flagged: quote $1 and $2 to preserve spaces.
- custom_dir=$1 - default_dir=$2 + custom_dir="$1" + default_dir="$2"
🧹 Nitpick comments (9)
tests/test_main.py (1)
335-335: Drop commented-out mutation line in a testRemove dead/commented code to keep tests clean.
- # file.write_text(first_file.read_text()) # update rest according to firstrstudio/rhel9-python-3.11/nginx/root/usr/share/container-scripts/nginx/common.sh (3)
5-10: Scope and directory guard nits
- files_matched is not local; it leaks globally.
- Guard default_dir before find to avoid noisy errors if it’s missing.
-function get_matched_files() { - local custom_dir default_dir +function get_matched_files() { + local custom_dir default_dir files_matched custom_dir="$1" default_dir="$2" files_matched="$3" - find "$default_dir" -maxdepth 1 -type f -name "$files_matched" -printf "%f\n" + [ -d "$default_dir" ] && find "$default_dir" -maxdepth 1 -type f -name "$files_matched" -printf "%f\n" [ -d "$custom_dir" ] && find "$custom_dir" -maxdepth 1 -type f -name "$files_matched" -printf "%f\n" }
18-19: Quote positional-parameter assignmentsProtect against word-splitting/globbing in paths with spaces.
- custom_dir=$1 - default_dir=$2 + custom_dir="$1" + default_dir="$2"
20-31: Prefer bash arrays over here-string; annotate dynamic sourcesmapfile + for preserves lines with spaces and avoids command-substitution edge cases. Add ShellCheck directives for non-constant sources.
- while read -r filename ; do - if [ "$filename" ]; then - echo "=> sourcing $filename ..." - # custom file has precedence - if [ -f "$custom_dir/$filename" ]; then - source "$custom_dir/$filename" - elif [ -f "$default_dir/$filename" ]; then - source "$default_dir/$filename" - fi - fi - done <<<"$(get_matched_files "$custom_dir" "$default_dir" '*.sh' | sort -u)" + mapfile -t _files < <(get_matched_files "$custom_dir" "$default_dir" '*.sh' | sort -u) + for filename in "${_files[@]}"; do + [ -n "$filename" ] || continue + printf '=> sourcing %s ...\n' "$filename" + # custom file has precedence + if [ -f "$custom_dir/$filename" ]; then + # shellcheck source=/dev/null + source "$custom_dir/$filename" + elif [ -f "$default_dir/$filename" ]; then + # shellcheck source=/dev/null + source "$default_dir/$filename" + fi + doneAlso applies to: 24-27
rstudio/c9s-python-3.11/nginx/root/usr/share/container-scripts/nginx/common.sh (3)
5-10: Scope and directory guard nitsSame as the rhel9 variant: make files_matched local and guard default_dir.
-function get_matched_files() { - local custom_dir default_dir +function get_matched_files() { + local custom_dir default_dir files_matched custom_dir="$1" default_dir="$2" files_matched="$3" - find "$default_dir" -maxdepth 1 -type f -name "$files_matched" -printf "%f\n" + [ -d "$default_dir" ] && find "$default_dir" -maxdepth 1 -type f -name "$files_matched" -printf "%f\n" [ -d "$custom_dir" ] && find "$custom_dir" -maxdepth 1 -type f -name "$files_matched" -printf "%f\n" }
18-19: Quote positional-parameter assignmentsHarden against spaces/globs in arguments.
- custom_dir=$1 - default_dir=$2 + custom_dir="$1" + default_dir="$2"
20-31: Use bash arrays; annotate dynamic source for ShellCheckMatches the recommendation in the other nginx/common.sh.
- while read -r filename ; do - if [ "$filename" ]; then - echo "=> sourcing $filename ..." - # custom file has precedence - if [ -f "$custom_dir/$filename" ]; then - source "$custom_dir/$filename" - elif [ -f "$default_dir/$filename" ]; then - source "$default_dir/$filename" - fi - fi - done <<<"$(get_matched_files "$custom_dir" "$default_dir" '*.sh' | sort -u)" + mapfile -t _files < <(get_matched_files "$custom_dir" "$default_dir" '*.sh' | sort -u) + for filename in "${_files[@]}"; do + [ -n "$filename" ] || continue + printf '=> sourcing %s ...\n' "$filename" + # custom file has precedence + if [ -f "$custom_dir/$filename" ]; then + # shellcheck source=/dev/null + source "$custom_dir/$filename" + elif [ -f "$default_dir/$filename" ]; then + # shellcheck source=/dev/null + source "$default_dir/$filename" + fi + doneAlso applies to: 24-27
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh (2)
5-10: files_matched should be local; guard default_dir before findAvoid global leakage and noisy errors.
-function get_matched_files() { - local custom_dir default_dir +function get_matched_files() { + local custom_dir default_dir files_matched custom_dir="$1" default_dir="$2" files_matched="$3" - find "$default_dir" -maxdepth 1 -type f -name "$files_matched" -printf "%f\n" + [ -d "$default_dir" ] && find "$default_dir" -maxdepth 1 -type f -name "$files_matched" -printf "%f\n" [ -d "$custom_dir" ] && find "$custom_dir" -maxdepth 1 -type f -name "$files_matched" -printf "%f\n" }
20-31: Bash-native loop and ShellCheck-friendly sourcingmapfile + for improves robustness; add source directives to appease SC1090.
- while read -r filename ; do - if [ "$filename" ]; then - echo "=> sourcing $filename ..." - # custom file has precedence - if [ -f "$custom_dir/$filename" ]; then - source "$custom_dir/$filename" - elif [ -f "$default_dir/$filename" ]; then - source "$default_dir/$filename" - fi - fi - done <<<"$(get_matched_files "$custom_dir" "$default_dir" '*.sh' | sort -u)" + mapfile -t _files < <(get_matched_files "$custom_dir" "$default_dir" '*.sh' | sort -u) + for filename in "${_files[@]}"; do + [ -n "$filename" ] || continue + printf '=> sourcing %s ...\n' "$filename" + # custom file has precedence + if [ -f "$custom_dir/$filename" ]; then + # shellcheck source=/dev/null + source "$custom_dir/$filename" + elif [ -f "$default_dir/$filename" ]; then + # shellcheck source=/dev/null + source "$default_dir/$filename" + fi + doneAlso applies to: 24-27
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh(2 hunks)rstudio/c9s-python-3.11/nginx/root/usr/share/container-scripts/nginx/common.sh(2 hunks)rstudio/rhel9-python-3.11/nginx/root/usr/share/container-scripts/nginx/common.sh(2 hunks)tests/test_main.py(1 hunks)
🧰 Additional context used
🧠 Learnings (24)
📓 Common learnings
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:4-11
Timestamp: 2025-07-03T12:08:47.691Z
Learning: jiridanek requests GitHub issue creation for shell script quality improvements identified during PR #1269 review, specifically for POSIX compliance and security issues in codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh. Issue #1275 was created with comprehensive problem descriptions, acceptance criteria, implementation guidance, and proper context linking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T13:31:35.667Z
Learning: jiridanek requested GitHub issue creation for comprehensive shell scripting improvements in codeserver image during PR #1269 review, covering process management, JSON parsing robustness, variable quoting security, and sed pattern fixes. Issue #1295 was created with systematic phased approach, detailed problem descriptions, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T13:27:38.813Z
Learning: jiridanek requested GitHub issue creation for comprehensive shell scripting improvements in codeserver image during PR #1269 review, covering process management, JSON parsing robustness, variable quoting security, and sed pattern fixes. Issue #1293 was created with systematic phased approach, detailed problem descriptions, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T13:27:38.813Z
Learning: jiridanek requested GitHub issue creation for comprehensive shell scripting improvements in codeserver image during PR #1269 review, covering process management, JSON parsing robustness, variable quoting security, and sed pattern fixes. Issue #1293 was created with systematic phased approach, detailed problem descriptions, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:4-11
Timestamp: 2025-07-03T16:04:22.695Z
Learning: jiridanek requested GitHub issue creation for shell script quality improvements in codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh during PR #1269 review. Issue #1307 was created with comprehensive problem description covering variable scoping issues, POSIX compliance concerns, multiple solution options, acceptance criteria, implementation guidance with code examples, testing approaches, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:5-5
Timestamp: 2025-07-03T12:25:26.453Z
Learning: jiridanek requested GitHub issue creation for shell script safety improvements identified during PR #1269 review, specifically for unsafe globbing patterns in codeserver/ubi9-python-3.12/run-code-server.sh. Issue #1281 was created with comprehensive problem descriptions, solution options, acceptance criteria, and proper context linking, following the established pattern for systematic tracking of technical improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:17-17
Timestamp: 2025-07-03T12:26:24.084Z
Learning: jiridanek requests GitHub issue creation for shell script quality improvements identified during PR #1269 review, specifically for unquoted command substitution in codeserver/ubi9-python-3.12/run-code-server.sh. Issue #1283 was created with comprehensive problem descriptions, acceptance criteria, implementation guidance, and proper context linking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/utils/process.sh:1-2
Timestamp: 2025-07-03T16:00:46.191Z
Learning: jiridanek requested GitHub issue creation for shell script strict-mode improvement in codeserver/ubi9-python-3.12/utils/process.sh during PR #1269 review. Issue #1303 was created with comprehensive problem description covering silent failures and production risks, phased acceptance criteria for basic strict-mode implementation and enhanced error handling, implementation guidance with code examples and flag explanations, benefits section, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/opt/app-root/etc/generate_container_user:4-9
Timestamp: 2025-07-03T16:05:35.448Z
Learning: jiridanek requested GitHub issue creation for shell script error handling improvements in codeserver/ubi9-python-3.12/nginx/root/opt/app-root/etc/generate_container_user during PR #1269 review. A comprehensive issue was created covering silent failures, unquoted variable expansions, missing template validation, and strict mode implementation with detailed problem descriptions, phased acceptance criteria, implementation guidance with code examples, and proper context linking, continuing the established pattern of systematic code quality improvements.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-09-10T21:19:43.576Z
Learning: jiridanek requested GitHub issue creation for shell syntax fix in codeserver/ubi9-python-3.12/get_code_server_rpm.sh during PR #2356 review. Issue #2397 was created addressing missing whitespace around || operator on line 20 that can cause parsing errors, with exact code diff showing the required fix, continuing the established pattern of systematic shell script quality improvements through detailed issue tracking.
📚 Learning: 2025-07-03T16:04:22.695Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:4-11
Timestamp: 2025-07-03T16:04:22.695Z
Learning: jiridanek requested GitHub issue creation for shell script quality improvements in codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh during PR #1269 review. Issue #1307 was created with comprehensive problem description covering variable scoping issues, POSIX compliance concerns, multiple solution options, acceptance criteria, implementation guidance with code examples, testing approaches, and proper context linking, continuing the established pattern of systematic code quality improvements.
Applied to files:
rstudio/rhel9-python-3.11/nginx/root/usr/share/container-scripts/nginx/common.shcodeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.shrstudio/c9s-python-3.11/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T12:08:47.691Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:4-11
Timestamp: 2025-07-03T12:08:47.691Z
Learning: jiridanek requests GitHub issue creation for shell script quality improvements identified during PR #1269 review, specifically for POSIX compliance and security issues in codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh. Issue #1275 was created with comprehensive problem descriptions, acceptance criteria, implementation guidance, and proper context linking.
Applied to files:
rstudio/rhel9-python-3.11/nginx/root/usr/share/container-scripts/nginx/common.shcodeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.shrstudio/c9s-python-3.11/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T16:05:35.448Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/root/opt/app-root/etc/generate_container_user:4-9
Timestamp: 2025-07-03T16:05:35.448Z
Learning: jiridanek requested GitHub issue creation for shell script error handling improvements in codeserver/ubi9-python-3.12/nginx/root/opt/app-root/etc/generate_container_user during PR #1269 review. A comprehensive issue was created covering silent failures, unquoted variable expansions, missing template validation, and strict mode implementation with detailed problem descriptions, phased acceptance criteria, implementation guidance with code examples, and proper context linking, continuing the established pattern of systematic code quality improvements.
Applied to files:
rstudio/rhel9-python-3.11/nginx/root/usr/share/container-scripts/nginx/common.shcodeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.shrstudio/c9s-python-3.11/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T12:29:24.067Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:23-23
Timestamp: 2025-07-03T12:29:24.067Z
Learning: jiridanek requested GitHub issue creation for shell script safety improvement in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review, specifically for replacing unsafe in-place file modification with tee. Issue #1285 was created with comprehensive problem descriptions, risk assessment, recommended atomic file operations solution, acceptance criteria, and proper context linking.
Applied to files:
rstudio/rhel9-python-3.11/nginx/root/usr/share/container-scripts/nginx/common.shcodeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.shrstudio/c9s-python-3.11/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T16:34:07.901Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:26-26
Timestamp: 2025-07-03T16:34:07.901Z
Learning: jiridanek requested GitHub issue creation for NGINX process management improvement in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review, specifically for replacing plain `nginx` command with `exec nginx -g 'daemon off;'` to improve signal handling, PID 1 management, and container best practices. Issue #1319 was created with comprehensive problem description, benefits analysis, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Applied to files:
rstudio/rhel9-python-3.11/nginx/root/usr/share/container-scripts/nginx/common.shcodeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T16:17:23.065Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:18-23
Timestamp: 2025-07-03T16:17:23.065Z
Learning: jiridanek requested GitHub issue creation for shell script variable quoting security concern in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review. The issue covers unquoted variables NB_PREFIX, NOTEBOOK_ARGS, and BASE_URL that pose security risks including command injection, word-splitting vulnerabilities, and globbing issues. A comprehensive issue was created with detailed problem description, security concerns, solution with code examples, acceptance criteria, implementation guidance, and proper context linking, continuing the established pattern of systematic code quality improvements.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.shrstudio/c9s-python-3.11/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T16:04:30.516Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:5-6
Timestamp: 2025-07-03T16:04:30.516Z
Learning: jiridanek requested GitHub issue creation for shell script strict mode improvement in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review. Issue #1308 was created with comprehensive problem description covering limitations of `set -e`, detailed solution with `set -euo pipefail`, benefits explanation for each flag, acceptance criteria, risk assessment, testing approach, and proper context linking, continuing the established pattern of systematic code quality improvements for shell scripts.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T14:04:05.280Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T14:04:05.280Z
Learning: In opendatahub-io/notebooks, shell scripting robustness and efficiency issues in extension management loops (such as unquoted globs, word-splitting, and unnecessary repeated copies in run-code-server.sh) are systematically tracked and fixed by quoting variables, using `cp -a --`, and toggling `nullglob`, following the established pattern of operational correctness improvements.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T16:15:19.673Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/nginx/serverconf/proxy.conf.template:23-32
Timestamp: 2025-07-03T16:15:19.673Z
Learning: jiridanek requested GitHub issue creation for FastCGI configuration improvement in codeserver/ubi9-python-3.12/nginx/serverconf/proxy.conf.template during PR #1269 review, specifically for replacing hard-coded /opt/app-root path with $document_root variable to maintain DRY principle and improve maintainability. The issue includes comprehensive architectural overview of FastCGI, NGINX, and supervisord integration for health checking and activity monitoring, designed for compatibility with JupyterHub idle culler and Kubeflow notebook controller culling systems.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T12:26:24.084Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:17-17
Timestamp: 2025-07-03T12:26:24.084Z
Learning: jiridanek requests GitHub issue creation for shell script quality improvements identified during PR #1269 review, specifically for unquoted command substitution in codeserver/ubi9-python-3.12/run-code-server.sh. Issue #1283 was created with comprehensive problem descriptions, acceptance criteria, implementation guidance, and proper context linking.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-09-10T21:21:29.972Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-09-10T21:21:29.972Z
Learning: jiridanek requested GitHub issue creation for shell syntax fix in codeserver/ubi9-python-3.12/get_code_server_rpm.sh during PR #2356 review. Issue #2399 was created addressing missing whitespace around || operator on line 20 that can cause parsing errors, with exact code diff showing the required fix, continuing the established pattern of systematic shell script quality improvements through detailed issue tracking.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-09-10T21:19:43.576Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-09-10T21:19:43.576Z
Learning: jiridanek requested GitHub issue creation for shell syntax fix in codeserver/ubi9-python-3.12/get_code_server_rpm.sh during PR #2356 review. Issue #2397 was created addressing missing whitespace around || operator on line 20 that can cause parsing errors, with exact code diff showing the required fix, continuing the established pattern of systematic shell script quality improvements through detailed issue tracking.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T12:25:26.453Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:5-5
Timestamp: 2025-07-03T12:25:26.453Z
Learning: jiridanek requested GitHub issue creation for shell script safety improvements identified during PR #1269 review, specifically for unsafe globbing patterns in codeserver/ubi9-python-3.12/run-code-server.sh. Issue #1281 was created with comprehensive problem descriptions, solution options, acceptance criteria, and proper context linking, following the established pattern for systematic tracking of technical improvements.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T16:19:19.763Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-nginx.sh:22-22
Timestamp: 2025-07-03T16:19:19.763Z
Learning: jiridanek requested GitHub issue creation for envsubst variable delimiter syntax error in codeserver/ubi9-python-3.12/run-nginx.sh during PR #1269 review. Issue #1316 was created with comprehensive problem description covering the comma vs. space delimiter issue in envsubst command, impact analysis including silent failures and security risks, proposed solutions with validation, acceptance criteria, testing approach, and proper context linking, continuing the established pattern of systematic code quality improvements.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-09-05T12:35:05.115Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#2227
File: codeserver/ubi9-python-3.12/get_code_server_rpm.sh:48-48
Timestamp: 2025-09-05T12:35:05.115Z
Learning: jiridanek requested GitHub issue creation for shell script quality improvement in codeserver/ubi9-python-3.12/get_code_server_rpm.sh during PR #2227 review, specifically for PKG_CONFIG_PATH assignment issues including SC2155 shellcheck warning and expensive global find operation. Issue was created with comprehensive problem description, three solution options with pkg-config built-in functionality as recommended approach, detailed acceptance criteria, and implementation guidance, continuing the established pattern of systematic code quality improvements through detailed issue tracking.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-09-05T12:35:05.115Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#2227
File: codeserver/ubi9-python-3.12/get_code_server_rpm.sh:48-48
Timestamp: 2025-09-05T12:35:05.115Z
Learning: jiridanek requested GitHub issue creation for shell script quality improvement in codeserver/ubi9-python-3.12/get_code_server_rpm.sh during PR #2227 review, specifically for PKG_CONFIG_PATH assignment issues including SC2155 shellcheck warning and expensive global find operation. Issue #2319 was created with comprehensive problem description, three solution options with pkg-config built-in functionality as recommended approach, detailed acceptance criteria, and implementation guidance, continuing the established pattern of systematic code quality improvements through detailed issue tracking.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-08-04T08:26:31.135Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1628
File: codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh:18-27
Timestamp: 2025-08-04T08:26:31.135Z
Learning: jiridanek confirmed that bash is available in all Docker images in the opendatahub-io/notebooks project, preferring to use bash instead of maintaining POSIX compliance for shell scripts. This aligns with his architectural preference for eliminating complexity at the source rather than implementing workarounds for POSIX limitations.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T16:00:46.191Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/utils/process.sh:1-2
Timestamp: 2025-07-03T16:00:46.191Z
Learning: jiridanek requested GitHub issue creation for shell script strict-mode improvement in codeserver/ubi9-python-3.12/utils/process.sh during PR #1269 review. Issue #1303 was created with comprehensive problem description covering silent failures and production risks, phased acceptance criteria for basic strict-mode implementation and enhanced error handling, implementation guidance with code examples and flag explanations, benefits section, and proper context linking, continuing the established pattern of systematic code quality improvements.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T16:08:47.251Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1269
File: codeserver/ubi9-python-3.12/run-code-server.sh:1-2
Timestamp: 2025-07-03T16:08:47.251Z
Learning: jiridanek requested GitHub issue creation for shell strict mode improvement in codeserver/ubi9-python-3.12/run-code-server.sh during PR #1269 review. Issue #1310 was created with comprehensive problem description covering silent failures, production risks, implementation guidance with code examples, acceptance criteria, testing approach, and proper context linking, continuing the established pattern of systematic code quality improvements for the codeserver image entrypoint script.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T13:31:35.667Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T13:31:35.667Z
Learning: jiridanek requested GitHub issue creation for comprehensive shell scripting improvements in codeserver image during PR #1269 review, covering process management, JSON parsing robustness, variable quoting security, and sed pattern fixes. Issue #1295 was created with systematic phased approach, detailed problem descriptions, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-07-03T13:27:38.813Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-03T13:27:38.813Z
Learning: jiridanek requested GitHub issue creation for comprehensive shell scripting improvements in codeserver image during PR #1269 review, covering process management, JSON parsing robustness, variable quoting security, and sed pattern fixes. Issue #1293 was created with systematic phased approach, detailed problem descriptions, implementation guidance, acceptance criteria, and proper context linking, continuing the established pattern of systematic code quality improvements.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-09-05T12:25:58.344Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#2227
File: codeserver/ubi9-python-3.12/Dockerfile.cpu:126-128
Timestamp: 2025-09-05T12:25:58.344Z
Learning: jiridanek expressed concern about code-server installation complexity in codeserver/ubi9-python-3.12/Dockerfile.cpu during PR #2227 review, describing the multi-stage cache mount approach as a "hack" that worries them. GitHub issue #2315 was created addressing the architectural complexity with comprehensive problem description, four solution options, clear acceptance criteria, and implementation considerations, assigned to jiridanek, continuing the established pattern of systematic technical improvement tracking.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
📚 Learning: 2025-09-05T12:10:50.856Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#2215
File: runtimes/datascience/ubi9-python-3.12/Dockerfile.cpu:0-0
Timestamp: 2025-09-05T12:10:50.856Z
Learning: jiridanek requested GitHub issue creation for Dockerfile environment variable refactoring during PR #2215 review. Issue #2311 was created addressing build-only variables (OPENBLAS_VERSION, ONNX_VERSION, GRPC_PYTHON_BUILD_SYSTEM_OPENSSL) being unnecessarily written to /etc/profile.d/ppc64le.sh in runtimes/datascience/ubi9-python-3.12/Dockerfile.cpu, causing variable duplication across stages, unreliable sourcing in non-login build contexts, and violation of DRY principles. The issue includes comprehensive problem description covering affected lines 30-37, detailed impact analysis of build reliability and maintenance overhead, three solution options with centralized ARG/ENV approach as recommended, clear acceptance criteria for version centralization and build-only variable cleanup, and specific implementation guidance with code examples, assigned to jiridanek, continuing the established pattern of systematic infrastructure improvements through detailed issue tracking.
Applied to files:
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
🪛 Shellcheck (0.10.0)
rstudio/rhel9-python-3.11/nginx/root/usr/share/container-scripts/nginx/common.sh
[warning] 25-25: ShellCheck can't follow non-constant source. Use a directive to specify location.
(SC1090)
[warning] 27-27: ShellCheck can't follow non-constant source. Use a directive to specify location.
(SC1090)
codeserver/ubi9-python-3.12/nginx/root/usr/share/container-scripts/nginx/common.sh
[warning] 25-25: ShellCheck can't follow non-constant source. Use a directive to specify location.
(SC1090)
[warning] 27-27: ShellCheck can't follow non-constant source. Use a directive to specify location.
(SC1090)
rstudio/c9s-python-3.11/nginx/root/usr/share/container-scripts/nginx/common.sh
[warning] 25-25: ShellCheck can't follow non-constant source. Use a directive to specify location.
(SC1090)
[warning] 27-27: ShellCheck can't follow non-constant source. Use a directive to specify location.
(SC1090)
🔇 Additional comments (1)
tests/test_main.py (1)
326-330: LGTM: asserting nginx/common.sh parity across imagesGood addition; it will prevent silent divergence.
|
@coderabbitai provide comprehensive summary of the PR's status |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chainI'll gather comprehensive information about the PR's current status, including examining the changes, CI status, and compliance with the original requirements. @jiridanek Here's a comprehensive summary of PR #1628's current status: 🔍 PR Overview
📝 Changes MadeThe PR modifies shell scripts across three nginx
Key improvements implemented:
🧪 Testing & Validation
|
nginx/root/usr/share/container-scripts/nginx/common.sh and duplicates of thereof
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jiridanek The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…tainer-scripts/nginx/common.sh` and duplicates of thereof (#1628) * fix(nginx/common.sh) fix shell script that was not POSIX-complaint Let's rather add the `#!/usr/bin/env bash` and just use bash --------- Co-authored-by: Jiri Daněk <[email protected]>
* RHOAIENG-34309: fix(jupyterlab-extension): remove gio command call and use custom code to clean trashed files (#2510) * #1271: fix(scripts): posix noncompliance in `nginx/root/usr/share/container-scripts/nginx/common.sh` and duplicates of thereof (#1628) * fix(nginx/common.sh) fix shell script that was not POSIX-complaint Let's rather add the `#!/usr/bin/env bash` and just use bash --------- Co-authored-by: Jiri Daněk <[email protected]> * update all runtimes imagestreams name to reflect to the new naming format * RHAIENG-1186: chore(dockerfile): bump code-server version to v4.104.0 in UBI9 Python 3.12 image * RHAIENG-1186: chore(dockerfile): remove custom patch, change is already in code-sever * coder/code-server#7418 Revert "increase available memory for the nodejs javascript vm (#2356)" This reverts commit e3f47c1. * RHAIENG-1186: chore(code-server): update nodejs to a compatible version Choosing 2.24 because we're building for RHOAI 2.25 EUS. ``` > [email protected] preinstall > node build/npm/preinstall.js *** Please use Node.js v22.15.1 or later for development. /root/code-server/lib/vscode/build/npm/preinstall.js:14 ``` * RHAIENG-1186: chore(code-server): update to gcc-toolset-14 with CXXFLAGS="-std=c++20" ``` npm error /root/.cache/node-gyp/24.8.0/include/node/v8config.h:13:2: error: #error "C++20 or later required." npm error 13 | #error "C++20 or later required." ``` * RHAIENG-1186: chore(code-server): the build is unhappy about nodejs 24, so use 22.19.0 ``` npm warn EBADENGINE Unsupported engine { npm warn EBADENGINE package: '[email protected]', npm warn EBADENGINE required: { node: '22' }, npm warn EBADENGINE current: { node: 'v24.8.0', npm: '11.6.0' } npm warn EBADENGINE } ``` * RHAIENG-1186: chore(code-server): it looks like there may be a justification for installing node 22.18 When I had 22.19.0, the build downloaded 22.18.0 at one point. ``` [18:37:46] Starting node-linux-x64 ... [18:37:46] Downloading node.js 22.18.0 linux x64 from https://nodejs.org... ``` * RHAIENG-1186: chore(code-server): disable the getting started override about deploying code-server for the team https://github.com/coder/code-server/blob/v4.104.0/patches/getting-started.diff * RHAIENG-1023: fix(rstudio): update the esbuild inside of rstudio's installation as it was done in the poc (#2513) * Fix typos * Issue #1789: chore(repo): set up lfs for vscode extensions vendored into the repo (#2516) For now, only move existing extensions already on main into lfs. Will not rewrite history to remove the previously added versions. This means that repository size is not decreased by this commit. But it should not grow so much any more every time code-server is updated. ``` ❯ brew install git-lfs ❯ git lfs track "*.vsix" Tracking "*.vsix" ❯ cat .gitattributes ci/secrets/** filter=git-crypt diff=git-crypt *.vsix filter=lfs diff=lfs merge=lfs -text ❯ git add .gitattributes ``` Issue #1789: chore(repo): update docs with git-lfs instructions for codeserver in Extensions.md * Issue #1789: chore(repo): convert the ``*.vsix` files on main into git-lfs (#2516) codeserver/ubi9-python-3.12/utils/[email protected],codeserver/ubi9-python-3.12/utils/ms-python.python-2025.2.0.vsix,codeserver/ubi9-python-3.12/utils/ms-toolsai.jupyter-2025.2.0.vsix,codeserver/ubi9-python-3.12/utils/ms-toolsai.jupyter-keymap-1.1.2.vsix,codeserver/ubi9-python-3.12/utils/ms-toolsai.jupyter-renderers-1.1.0.vsix,codeserver/ubi9-python-3.12/utils/ms-toolsai.vscode-jupyter-cell-tags-0.1.9.vsix,codeserver/ubi9-python-3.12/utils/ms-toolsai.vscode-jupyter-slideshow-0.1.6.vsix: convert to Git LFS ``` ❯ git lfs migrate import --no-rewrite codeserver/ubi9-python-3.12/utils/*.vsix override changes in your working copy? All uncommitted changes will be lost! [y/N] y changes in your working copy will be overridden ... Checkout: ..., done. ``` * Issue #1789: chore(repo): add a conditional git-lfs checkout in github actions when needed (#2516) ``` [4/6] STEP 13/33: RUN mkdir -p /opt/app-root/extensions-temp && code-server --install-extension /opt/app-root/bin/utils/ms-python.python-2025.2.0.vsix --extensions-dir /opt/app-root/extensions-temp && code-server --install-extension /opt/app-root/bin/utils/ms-toolsai.jupyter-2025.2.0.vsix --extensions-dir /opt/app-root/extensions-temp [2025-09-19T08:59:44.572Z] info Wrote default config file to /opt/app-root/src/.config/code-server/config.yaml Installing extensions... Error: End of central directory record signature not found. Either not a zip file, or file is truncated. at k8 (file:///usr/lib/code-server/lib/vscode/out/server-main.js:48:2239) at file:///usr/lib/code-server/lib/vscode/out/server-main.js:48:3567 at /usr/lib/code-server/lib/vscode/node_modules/yauzl/index.js:40:7 at /usr/lib/code-server/lib/vscode/node_modules/yauzl/index.js:190:5 at /usr/lib/code-server/lib/vscode/node_modules/yauzl/index.js:712:5 at /usr/lib/code-server/lib/vscode/node_modules/yauzl/fd-slicer.js:33:7 at FSReqCallback.wrapper [as oncomplete] (node:fs:671:5) { code: 'Extract', name: 'Extract' } Failed Installing Extensions: file:///opt/app-root/bin/utils/ms-python.python-2025.2.0.vsix ``` I'll locate the workflow template and the code paths that determine when a codeserver image is being built, then update the checkout step to use LFS conditionally. [2 tools called] I'll open the workflow template to see the checkout step and the job matrix to identify how to detect codeserver builds, then edit it to set checkout lfs conditionally. [1 tool called] I’m going to update the workflow template to set the checkout action’s LFS option conditionally: enabled when `inputs.target` contains `codeserver`, disabled otherwise, for both the normal and pull_request_target checkout steps. [2 tools called] - I found the workflow template and updated the checkout steps to toggle LFS based on whether we’re building a codeserver image. Changes made in `.github/workflows/build-notebooks-TEMPLATE.yaml`: - For both checkout steps, added `with.lfs: ${{ contains(inputs.target, 'codeserver') }}`. - This sets LFS to true when `inputs.target` contains `codeserver`, and false otherwise, including the `pull_request_target` case. Example of the updated blocks: ```12:16:.github/workflows/build-notebooks-TEMPLATE.yaml - uses: actions/checkout@v5 if: ${{ fromJson(inputs.github).event_name != 'pull_request_target' }} with: lfs: ${{ contains(inputs.target, 'codeserver') }} ``` ```66:71:.github/workflows/build-notebooks-TEMPLATE.yaml - uses: actions/checkout@v5 if: ${{ fromJson(inputs.github).event_name == 'pull_request_target' }} with: ref: "refs/pull/${{ fromJson(inputs.github).event.number }}/merge" lfs: ${{ contains(inputs.target, 'codeserver') }} ``` Summary: - Conditional LFS checkout implemented in the workflow template for codeserver builds; no lints reported. * RHAIENG-286: 2025b images package upgrade (#2414) * Upgrade CodeServer packages for 2025b * Upgrade Jupyter DataScience packages for 2025b * Upgrade Jupyter Minimal packages for 2025b * Upgrade Jupyter PyTorch LLMCompressor packages for 2025b * Upgrade Jupyter PyTorch packages for 2025b * Upgrade Jupyter ROCm PyTorch packages for 2025b * Upgrade Jupyter ROCm TensorFlow packages for 2025b * Upgrade Jupyter TensorFlow packages for 2025b * Upgrade Jupyter TrustyAI packages for 2025b * Upgrade RStudio packages for 2025b * Upgrade Runtime images for 2025b * Update Makefile's RELEASE flag to `2025b` version * Change build-args to use CUDA 12.8 instead of CUDA 12.6 * Fix tests, manifests and try to ensure consistency between packages and images * Fix minor package version check and ruff linter issues * Add missing comma to tuples on tests * Ignore RUFF's COM819 about commas and lists * Use RUFF format to fix minor indentation issues * Update wrong CodeFlare SDK version on packages to standardize them * Update build-args for ROCm-based images to use ROCm v6.4 instead of ROCm v6.2 * RHAIENG-1193: codeserver(repo): update vscode extensions for 2025b release from Open VSX Registry (#2518) --------- Co-authored-by: William Antônio Siqueira <[email protected]> Co-authored-by: satnam72 <[email protected]> Co-authored-by: Jiri Daněk <[email protected]> Co-authored-by: dibryant <[email protected]> Co-authored-by: Daniel Lutz <[email protected]>
* RHOAIENG-34309: fix(jupyterlab-extension): remove gio command call and use custom code to clean trashed files (#2510) * #1271: fix(scripts): posix noncompliance in `nginx/root/usr/share/container-scripts/nginx/common.sh` and duplicates of thereof (#1628) * fix(nginx/common.sh) fix shell script that was not POSIX-complaint Let's rather add the `#!/usr/bin/env bash` and just use bash --------- Co-authored-by: Jiri Daněk <[email protected]> * update all runtimes imagestreams name to reflect to the new naming format * RHAIENG-1186: chore(dockerfile): bump code-server version to v4.104.0 in UBI9 Python 3.12 image * RHAIENG-1186: chore(dockerfile): remove custom patch, change is already in code-sever * coder/code-server#7418 Revert "increase available memory for the nodejs javascript vm (#2356)" This reverts commit e3f47c1. * RHAIENG-1186: chore(code-server): update nodejs to a compatible version Choosing 2.24 because we're building for RHOAI 2.25 EUS. ``` > [email protected] preinstall > node build/npm/preinstall.js *** Please use Node.js v22.15.1 or later for development. /root/code-server/lib/vscode/build/npm/preinstall.js:14 ``` * RHAIENG-1186: chore(code-server): update to gcc-toolset-14 with CXXFLAGS="-std=c++20" ``` npm error /root/.cache/node-gyp/24.8.0/include/node/v8config.h:13:2: error: #error "C++20 or later required." npm error 13 | #error "C++20 or later required." ``` * RHAIENG-1186: chore(code-server): the build is unhappy about nodejs 24, so use 22.19.0 ``` npm warn EBADENGINE Unsupported engine { npm warn EBADENGINE package: '[email protected]', npm warn EBADENGINE required: { node: '22' }, npm warn EBADENGINE current: { node: 'v24.8.0', npm: '11.6.0' } npm warn EBADENGINE } ``` * RHAIENG-1186: chore(code-server): it looks like there may be a justification for installing node 22.18 When I had 22.19.0, the build downloaded 22.18.0 at one point. ``` [18:37:46] Starting node-linux-x64 ... [18:37:46] Downloading node.js 22.18.0 linux x64 from https://nodejs.org... ``` * RHAIENG-1186: chore(code-server): disable the getting started override about deploying code-server for the team https://github.com/coder/code-server/blob/v4.104.0/patches/getting-started.diff * RHAIENG-1023: fix(rstudio): update the esbuild inside of rstudio's installation as it was done in the poc (#2513) * Fix typos * Issue #1789: chore(repo): set up lfs for vscode extensions vendored into the repo (#2516) For now, only move existing extensions already on main into lfs. Will not rewrite history to remove the previously added versions. This means that repository size is not decreased by this commit. But it should not grow so much any more every time code-server is updated. ``` ❯ brew install git-lfs ❯ git lfs track "*.vsix" Tracking "*.vsix" ❯ cat .gitattributes ci/secrets/** filter=git-crypt diff=git-crypt *.vsix filter=lfs diff=lfs merge=lfs -text ❯ git add .gitattributes ``` Issue #1789: chore(repo): update docs with git-lfs instructions for codeserver in Extensions.md * Issue #1789: chore(repo): convert the ``*.vsix` files on main into git-lfs (#2516) codeserver/ubi9-python-3.12/utils/[email protected],codeserver/ubi9-python-3.12/utils/ms-python.python-2025.2.0.vsix,codeserver/ubi9-python-3.12/utils/ms-toolsai.jupyter-2025.2.0.vsix,codeserver/ubi9-python-3.12/utils/ms-toolsai.jupyter-keymap-1.1.2.vsix,codeserver/ubi9-python-3.12/utils/ms-toolsai.jupyter-renderers-1.1.0.vsix,codeserver/ubi9-python-3.12/utils/ms-toolsai.vscode-jupyter-cell-tags-0.1.9.vsix,codeserver/ubi9-python-3.12/utils/ms-toolsai.vscode-jupyter-slideshow-0.1.6.vsix: convert to Git LFS ``` ❯ git lfs migrate import --no-rewrite codeserver/ubi9-python-3.12/utils/*.vsix override changes in your working copy? All uncommitted changes will be lost! [y/N] y changes in your working copy will be overridden ... Checkout: ..., done. ``` * Issue #1789: chore(repo): add a conditional git-lfs checkout in github actions when needed (#2516) ``` [4/6] STEP 13/33: RUN mkdir -p /opt/app-root/extensions-temp && code-server --install-extension /opt/app-root/bin/utils/ms-python.python-2025.2.0.vsix --extensions-dir /opt/app-root/extensions-temp && code-server --install-extension /opt/app-root/bin/utils/ms-toolsai.jupyter-2025.2.0.vsix --extensions-dir /opt/app-root/extensions-temp [2025-09-19T08:59:44.572Z] info Wrote default config file to /opt/app-root/src/.config/code-server/config.yaml Installing extensions... Error: End of central directory record signature not found. Either not a zip file, or file is truncated. at k8 (file:///usr/lib/code-server/lib/vscode/out/server-main.js:48:2239) at file:///usr/lib/code-server/lib/vscode/out/server-main.js:48:3567 at /usr/lib/code-server/lib/vscode/node_modules/yauzl/index.js:40:7 at /usr/lib/code-server/lib/vscode/node_modules/yauzl/index.js:190:5 at /usr/lib/code-server/lib/vscode/node_modules/yauzl/index.js:712:5 at /usr/lib/code-server/lib/vscode/node_modules/yauzl/fd-slicer.js:33:7 at FSReqCallback.wrapper [as oncomplete] (node:fs:671:5) { code: 'Extract', name: 'Extract' } Failed Installing Extensions: file:///opt/app-root/bin/utils/ms-python.python-2025.2.0.vsix ``` I'll locate the workflow template and the code paths that determine when a codeserver image is being built, then update the checkout step to use LFS conditionally. [2 tools called] I'll open the workflow template to see the checkout step and the job matrix to identify how to detect codeserver builds, then edit it to set checkout lfs conditionally. [1 tool called] I’m going to update the workflow template to set the checkout action’s LFS option conditionally: enabled when `inputs.target` contains `codeserver`, disabled otherwise, for both the normal and pull_request_target checkout steps. [2 tools called] - I found the workflow template and updated the checkout steps to toggle LFS based on whether we’re building a codeserver image. Changes made in `.github/workflows/build-notebooks-TEMPLATE.yaml`: - For both checkout steps, added `with.lfs: ${{ contains(inputs.target, 'codeserver') }}`. - This sets LFS to true when `inputs.target` contains `codeserver`, and false otherwise, including the `pull_request_target` case. Example of the updated blocks: ```12:16:.github/workflows/build-notebooks-TEMPLATE.yaml - uses: actions/checkout@v5 if: ${{ fromJson(inputs.github).event_name != 'pull_request_target' }} with: lfs: ${{ contains(inputs.target, 'codeserver') }} ``` ```66:71:.github/workflows/build-notebooks-TEMPLATE.yaml - uses: actions/checkout@v5 if: ${{ fromJson(inputs.github).event_name == 'pull_request_target' }} with: ref: "refs/pull/${{ fromJson(inputs.github).event.number }}/merge" lfs: ${{ contains(inputs.target, 'codeserver') }} ``` Summary: - Conditional LFS checkout implemented in the workflow template for codeserver builds; no lints reported. * RHAIENG-286: 2025b images package upgrade (#2414) * Upgrade CodeServer packages for 2025b * Upgrade Jupyter DataScience packages for 2025b * Upgrade Jupyter Minimal packages for 2025b * Upgrade Jupyter PyTorch LLMCompressor packages for 2025b * Upgrade Jupyter PyTorch packages for 2025b * Upgrade Jupyter ROCm PyTorch packages for 2025b * Upgrade Jupyter ROCm TensorFlow packages for 2025b * Upgrade Jupyter TensorFlow packages for 2025b * Upgrade Jupyter TrustyAI packages for 2025b * Upgrade RStudio packages for 2025b * Upgrade Runtime images for 2025b * Update Makefile's RELEASE flag to `2025b` version * Change build-args to use CUDA 12.8 instead of CUDA 12.6 * Fix tests, manifests and try to ensure consistency between packages and images * Fix minor package version check and ruff linter issues * Add missing comma to tuples on tests * Ignore RUFF's COM819 about commas and lists * Use RUFF format to fix minor indentation issues * Update wrong CodeFlare SDK version on packages to standardize them * Update build-args for ROCm-based images to use ROCm v6.4 instead of ROCm v6.2 * RHAIENG-1193: codeserver(repo): update vscode extensions for 2025b release from Open VSX Registry (#2518) --------- Co-authored-by: William Antônio Siqueira <[email protected]> Co-authored-by: satnam72 <[email protected]> Co-authored-by: Jiri Daněk <[email protected]> Co-authored-by: dibryant <[email protected]> Co-authored-by: Daniel Lutz <[email protected]>
…io#1628) --------- Signed-off-by: Nishan Acharya <[email protected]>
Description
Fixes: #1271
Make various updates to shell script to ensure POSIX-compliant by removing bash specific syntax
localandfunctionkeywords as they are bash specificHow Has This Been Tested?
Tested the POSIX-compliance using various online resources.
Merge criteria:
Summary by CodeRabbit
Bug Fixes
Refactor
Tests