Added 'patches.lock.json' to CLI docker container.#2532
Conversation
WalkthroughThe Docker CLI image COPY instruction now includes ChangesDocker CLI image patches lockfile + test tooling needle
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2532 +/- ##
==========================================
- Coverage 86.49% 86.04% -0.46%
==========================================
Files 94 87 -7
Lines 4674 4515 -159
Branches 47 3 -44
==========================================
- Hits 4043 3885 -158
+ Misses 631 630 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e12636b to
1c7c544
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 @.vortex/tests/phpunit/Traits/SutTrait.php:
- Line 135: The test currently defines $needle = 'COPY composer.json composer.*
patches.lock.* .env* auth* /app/' and uses str_replace to inject content but
doesn't assert the replacement happened; update the replacement logic in
SutTrait (the $needle variable and its str_replace usage) to use the str_replace
variant that returns a replacement count (or use substr_count to detect
occurrences), then assert or throw if the count is zero so the test fails loudly
when the Dockerfile line changes; specifically modify the code that calls
str_replace($needle, $replacement, $dockerfileContents) to capture the $count
and add an assertion like assert($count > 0) or throw a descriptive exception.
🪄 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: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 6f98433e-210c-44e9-8748-401e1efd3cf2
⛔ Files ignored due to path filters (1)
.vortex/installer/tests/Fixtures/handler_process/_baseline/.docker/cli.dockerfileis excluded by!.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (1)
.vortex/tests/phpunit/Traits/SutTrait.php
| if (file_exists($dockerfile_path)) { | ||
| $content = (string) file_get_contents($dockerfile_path); | ||
| $needle = 'COPY composer.json composer.* .env* auth* /app/'; | ||
| $needle = 'COPY composer.json composer.* patches.lock.* .env* auth* /app/'; |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Verify that the needle string matches the COPY instruction in cli.dockerfile
# Expected: Find exactly one matching line in .docker/cli.dockerfile
rg -nF 'COPY composer.json composer.* patches.lock.* .env* auth* /app/' .docker/cli.dockerfileRepository: drevops/vortex
Length of output: 124
Needle matches cli.dockerfile; current str_replace() injection should work
- The needle
COPY composer.json composer.* patches.lock.* .env* auth* /app/from.vortex/tests/phpunit/Traits/SutTrait.php:135matches the exactCOPYline in.docker/cli.dockerfile(line 73), so the replacement shouldn’t silently miss. - To prevent future breakage, avoid silent failure by asserting the replacement occurred (e.g., check
str_replaceresults / count matches) if the Dockerfile line changes.
🤖 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 @.vortex/tests/phpunit/Traits/SutTrait.php at line 135, The test currently
defines $needle = 'COPY composer.json composer.* patches.lock.* .env* auth*
/app/' and uses str_replace to inject content but doesn't assert the replacement
happened; update the replacement logic in SutTrait (the $needle variable and its
str_replace usage) to use the str_replace variant that returns a replacement
count (or use substr_count to detect occurrences), then assert or throw if the
count is zero so the test fails loudly when the Dockerfile line changes;
specifically modify the code that calls str_replace($needle, $replacement,
$dockerfileContents) to capture the $count and add an assertion like
assert($count > 0) or throw a descriptive exception.
|
Code coverage (threshold: 90%) Per-class coverage |
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
|
Code coverage (threshold: 90%) Per-class coverage |
Summary by CodeRabbit