Conversation
|
""" WalkthroughThe functional test run script now determines executable extensions from the environment, creates required config directories and files, adjusts macOS file descriptor limits during CI runs, builds multiple binaries with debug logs, installs and validates templates, and runs tests using eval. The main.go debug mode check now also activates on Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant run_sh as run.sh script
participant OS
participant nuclei_dev
participant functional_test
User->>run_sh: Execute run.sh
run_sh->>OS: Determine RUNNER_OS and set executable extension
alt macOS on CI
run_sh->>OS: Increase file descriptor limits (sysctl, launchctl, ulimit)
end
run_sh->>OS: Create .nuclei-config/nuclei/ directory and .nuclei-ignore file
run_sh->>run_sh: Build binaries (functional-test, nuclei_dev, nuclei)
run_sh->>nuclei_dev: Install templates (-update-templates)
run_sh->>nuclei_dev: Validate templates (-validate)
run_sh->>run_sh: Output .nuclei-ignore contents
run_sh->>nuclei_dev: Validate templates (-validate -debug -v)
run_sh->>nuclei_dev: List templates (-tl)
run_sh->>functional_test: Run functional tests with binaries and test cases
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure 📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
cmd/functional-test/run.sh (2)
10-13: Ensure robust creation of config directory and ignore file
Consider adding error handling or enabling strict mode to fail early if directory or file creation fails. For example:+# Enable strict mode immediately after the shebang +set -euo pipefail mkdir -p .nuclei-config/nuclei/ || { echo "Error: could not create config directory"; exit 1; } touch .nuclei-config/nuclei/.nuclei-ignore || { echo "Error: could not create ignore file"; exit 1; }
34-37: Clarify comment for ignore file debug output
The comment “Check .nuclei-ignore file format” is misleading since it only prints the file contents. Rename it to accurately reflect its purpose:- # Check .nuclei-ignore file format + # Debug: Display contents of .nuclei-ignore file
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
.github/workflows/tests.yamlis excluded by!**/*.yaml
📒 Files selected for processing (1)
cmd/functional-test/run.sh(2 hunks)
* uses CI runtime env vars (`RUNNER_OS` & `RUNNER_DEBUG`) * restores originial `ulimit` Signed-off-by: Dwi Siswanto <git@dw1.io>
dwisiswant0
left a comment
There was a problem hiding this comment.
thanks for catching this and helping out, really appreciate it, @knakul853!
|
it’s been tricky for me, and i think this requires further investigation to understand why it’s failing to create the cc: @Mzack9999 |
Proposed changes
while running function test it looks for .nuclei-ignore which doesn't exist, created this to avoid file not found error
Checklist
Summary by CodeRabbit