Conversation
Add GOPLS_VERSION and PYRIGHT_VERSION ARGs to Containerfile.agents with pinned defaults (gopls 0.21.1, pyright 1.1.409). Propagate through Makefile variables and build.sh --build-arg flags. Extend update-deps target to auto-fetch latest gopls release from GitHub and pyright from PyPI. Fix plans/INDEX.md session separators from heading to thematic break.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jnpacker The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
📝 WalkthroughWalkthroughThis PR introduces LSP version pinning for gopls and pyright across the build system. Version variables are declared in the Makefile, propagated as container build arguments through the Containerfile, and installed with specific pinned versions. The Makefile's update-deps target automates fetching latest versions, and a new test script validates the entire integration. ChangesLSP Version Pinning and Build Integration
🎯 2 (Simple) | ⏱️ ~12 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Implementation SummaryWhat changed
Tests added
Known gaps
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/test_lsp_version_pinning.sh`:
- Around line 184-189: The test currently treats a missing plans/INDEX.md as a
pass because grep's non-zero exit is handled by the else branch; update the
check to fail fast if the file is missing by first testing the INDEX variable
with something like [ -f "$INDEX" ] || fail "plans/INDEX.md is missing", then
run the existing grep check (if grep -qP '^# ──' "$INDEX"; then fail
"plans/INDEX.md still contains # ── heading separators (should use ---)"; else
pass ...; fi). Reference INDEX and the grep invocation to locate where to add
the existence check and use the existing fail/pass functions.
- Around line 165-175: The test currently looks for occurrences like
GOPLS_VERSION="${GOPLS_VERSION which can pass even when the default-fallback
operator ':-' is missing; update the two grep checks in
tests/test_lsp_version_pinning.sh to match the explicit fallback form (search
for '\${GOPLS_VERSION:-' and '\${PYRIGHT_VERSION:-' respectively) and keep the
pass/fail messages, so the if blocks that reference BUILD_SH assert the presence
of the ':-' default operator in the build-arg lines.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Enterprise
Run ID: d4a5db66-19f3-4e14-829a-4b52852cf6a3
📒 Files selected for processing (5)
Makefilecontainerfiles/Containerfile.agentsplans/INDEX.mdscripts/build.shtests/test_lsp_version_pinning.sh
| if grep -q 'build-arg GOPLS_VERSION="${GOPLS_VERSION' "$BUILD_SH"; then | ||
| pass "--build-arg GOPLS_VERSION uses \${GOPLS_VERSION:-...} in build.sh" | ||
| else | ||
| fail "--build-arg GOPLS_VERSION does not use \${GOPLS_VERSION:-...} in build.sh" | ||
| fi | ||
|
|
||
| if grep -q 'build-arg PYRIGHT_VERSION="${PYRIGHT_VERSION' "$BUILD_SH"; then | ||
| pass "--build-arg PYRIGHT_VERSION uses \${PYRIGHT_VERSION:-...} in build.sh" | ||
| else | ||
| fail "--build-arg PYRIGHT_VERSION does not use \${PYRIGHT_VERSION:-...} in build.sh" | ||
| fi |
There was a problem hiding this comment.
Strengthen fallback-default assertions for build args.
Line 165 and Line 171 currently pass even if :-default is removed, so this can miss regressions in defaulting behavior.
Suggested test hardening
-if grep -q 'build-arg GOPLS_VERSION="${GOPLS_VERSION' "$BUILD_SH"; then
+if grep -qP 'build-arg GOPLS_VERSION="\$\{GOPLS_VERSION:-[^"]+\}"' "$BUILD_SH"; then
pass "--build-arg GOPLS_VERSION uses \${GOPLS_VERSION:-...} in build.sh"
else
fail "--build-arg GOPLS_VERSION does not use \${GOPLS_VERSION:-...} in build.sh"
fi
-if grep -q 'build-arg PYRIGHT_VERSION="${PYRIGHT_VERSION' "$BUILD_SH"; then
+if grep -qP 'build-arg PYRIGHT_VERSION="\$\{PYRIGHT_VERSION:-[^"]+\}"' "$BUILD_SH"; then
pass "--build-arg PYRIGHT_VERSION uses \${PYRIGHT_VERSION:-...} in build.sh"
else
fail "--build-arg PYRIGHT_VERSION does not use \${PYRIGHT_VERSION:-...} in build.sh"
fi🧰 Tools
🪛 Shellcheck (0.11.0)
[info] 165-165: Expressions don't expand in single quotes, use double quotes for that.
(SC2016)
[info] 171-171: Expressions don't expand in single quotes, use double quotes for that.
(SC2016)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tests/test_lsp_version_pinning.sh` around lines 165 - 175, The test currently
looks for occurrences like GOPLS_VERSION="${GOPLS_VERSION which can pass even
when the default-fallback operator ':-' is missing; update the two grep checks
in tests/test_lsp_version_pinning.sh to match the explicit fallback form (search
for '\${GOPLS_VERSION:-' and '\${PYRIGHT_VERSION:-' respectively) and keep the
pass/fail messages, so the if blocks that reference BUILD_SH assert the presence
of the ':-' default operator in the build-arg lines.
| INDEX="${REPO_ROOT}/plans/INDEX.md" | ||
| if grep -qP '^# ──' "$INDEX"; then | ||
| fail "plans/INDEX.md still contains # ── heading separators (should use ---)" | ||
| else | ||
| pass "plans/INDEX.md uses --- separators (no # ── headings)" | ||
| fi |
There was a problem hiding this comment.
Fail fast when plans/INDEX.md is missing.
Line 185 treats any non-zero grep result as success in the else branch; if the file is missing, this test incorrectly reports PASS.
Suggested fix
INDEX="${REPO_ROOT}/plans/INDEX.md"
-if grep -qP '^# ──' "$INDEX"; then
+if [[ ! -f "$INDEX" ]]; then
+ fail "plans/INDEX.md not found"
+elif grep -qP '^# ──' "$INDEX"; then
fail "plans/INDEX.md still contains # ── heading separators (should use ---)"
else
pass "plans/INDEX.md uses --- separators (no # ── headings)"
fi📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| INDEX="${REPO_ROOT}/plans/INDEX.md" | |
| if grep -qP '^# ──' "$INDEX"; then | |
| fail "plans/INDEX.md still contains # ── heading separators (should use ---)" | |
| else | |
| pass "plans/INDEX.md uses --- separators (no # ── headings)" | |
| fi | |
| INDEX="${REPO_ROOT}/plans/INDEX.md" | |
| if [[ ! -f "$INDEX" ]]; then | |
| fail "plans/INDEX.md not found" | |
| elif grep -qP '^# ──' "$INDEX"; then | |
| fail "plans/INDEX.md still contains # ── heading separators (should use ---)" | |
| else | |
| pass "plans/INDEX.md uses --- separators (no # ── headings)" | |
| fi |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tests/test_lsp_version_pinning.sh` around lines 184 - 189, The test currently
treats a missing plans/INDEX.md as a pass because grep's non-zero exit is
handled by the else branch; update the check to fail fast if the file is missing
by first testing the INDEX variable with something like [ -f "$INDEX" ] || fail
"plans/INDEX.md is missing", then run the existing grep check (if grep -qP '^#
──' "$INDEX"; then fail "plans/INDEX.md still contains # ── heading separators
(should use ---)"; else pass ...; fi). Reference INDEX and the grep invocation
to locate where to add the existence check and use the existing fail/pass
functions.
Summary
goplstov0.21.1andpyrightto1.1.409viaGOPLS_VERSION/PYRIGHT_VERSIONContainerfile ARGs, making LSP versions reproducible and consistent with all other dependency pins in the build toolchainscripts/build.sh --build-argflags so they can be overridden at build timemake update-depsto auto-fetch latest gopls (from GitHub golang/tools releases) and pyright (from PyPI) alongside all other dependenciesplans/INDEX.mdsession entry separators from# ──headings to---thematic breaksJira: https://redhat.atlassian.net/browse/ACM-34129
Follow-up to #7 (ACM-34104) which added LSP support with unpinned versions.
Summary by CodeRabbit
Chores
Tests