Skip to content

migrate aurora v2 to v4 + bump pd deps#983

Merged
Mzack9999 merged 2 commits into
devfrom
aurora-v4-migration-dev
May 19, 2026
Merged

migrate aurora v2 to v4 + bump pd deps#983
Mzack9999 merged 2 commits into
devfrom
aurora-v4-migration-dev

Conversation

@Mzack9999

@Mzack9999 Mzack9999 commented May 19, 2026

Copy link
Copy Markdown
Member

Migrates dnsx from logrusorgru/aurora v2 to v4 (new *Aurora struct + New(WithColors(...)) constructor) and bumps the projectdiscovery group of deps to current versions. Supersedes Dependabot PR #981 which couldn't merge on its own because the dep bump requires this aurora migration.

Summary by CodeRabbit

  • Chores
    • Updated Aurora logging library to version 4.
    • Bumped several projectdiscovery dependencies to newer versions.
    • Updated test entrypoints to use the new logging module.
    • Improved runtime input handling to stream file/argument lines more efficiently.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 19, 2026

Copy link
Copy Markdown

Walkthrough

The PR migrates the codebase to use github.com/logrusorgru/aurora/v4, updates go.mod, replaces Aurora API calls with options-based aurora.New(...), and changes runner input handling to stream lines via fileutil.Lines with a helper bridging iterator → channel.

Changes

Aurora v4 Migration

Layer / File(s) Summary
Dependency update in go.mod
go.mod
Aurora is moved to github.com/logrusorgru/aurora/v4 v4.0.0 in the direct require block; the indirect aurora/v4 entry is removed; several github.com/projectdiscovery/* versions are bumped.
Import path updates across codebase
cmd/functional-test/main.go, cmd/integration-test/integration-test.go, internal/runner/options.go, internal/runner/runner.go
All aurora import paths updated to github.com/logrusorgru/aurora/v4.
Runner: Aurora API, field change, and streamed input handling
internal/runner/runner.go, internal/runner/util.go, internal/runner/options.go
Runner.aurora changes from aurora.Aurora to *aurora.Aurora; initialization uses aurora.New(aurora.WithColors(...)); input preprocessing now streams lines with fileutil.Lines and uses linesIterToChan; linesInFile rewritten to iterate fileutil.Lines.

🎯 3 (Moderate) | ⏱️ ~20 minutes

"I nibbled through imports with care and cheer,
Pointers and streams now hop into gear,
Lines flow like carrots down a tuned-up chute,
Aurora v4 makes the logs look cute! 🐇✨"

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: migrating Aurora logging from v2 to v4 and bumping ProjectDiscovery dependencies, which are the core objectives of the PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch aurora-v4-migration-dev

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
internal/runner/runner.go (1)

444-447: ⚡ Quick win

Silent error handling may hide input processing failures.

When iteration encounters an error, the goroutine returns silently without logging. This could leave users unaware that their input was only partially processed (e.g., file read errors, permission issues mid-stream). Consider logging the error before returning to aid debugging.

Additionally, this behavior is inconsistent with linesInFile in util.go which propagates errors to callers.

Proposed fix
 		for line, err := range it {
 			if err != nil {
+				gologger.Debug().Msgf("error reading input: %v", err)
 				return
 			}
 			ch <- line
 		}
🤖 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 `@internal/runner/runner.go` around lines 444 - 447, The goroutine iterating
with the iterator variable `it` currently returns silently on error (in the
loop: `for line, err := range it { if err != nil { return } }`), which hides
failures; change this to surface the error—log the error via the same logger
used in this package (or `processLogger`/contextual logger) before returning
and/or send the error to the caller (e.g., return it on an error channel or set
an error variable) to match the behavior of `linesInFile` in `util.go`; update
the loop in the function containing `for line, err := range it` to log `err`
with clear context and ensure callers can observe the failure (propagate the
error instead of silently returning).
🤖 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.

Nitpick comments:
In `@internal/runner/runner.go`:
- Around line 444-447: The goroutine iterating with the iterator variable `it`
currently returns silently on error (in the loop: `for line, err := range it {
if err != nil { return } }`), which hides failures; change this to surface the
error—log the error via the same logger used in this package (or
`processLogger`/contextual logger) before returning and/or send the error to the
caller (e.g., return it on an error channel or set an error variable) to match
the behavior of `linesInFile` in `util.go`; update the loop in the function
containing `for line, err := range it` to log `err` with clear context and
ensure callers can observe the failure (propagate the error instead of silently
returning).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3a08c8c3-43bf-4625-a047-94501ff1391d

📥 Commits

Reviewing files that changed from the base of the PR and between f26d1ba and 932c24e.

📒 Files selected for processing (2)
  • internal/runner/runner.go
  • internal/runner/util.go

@Mzack9999 Mzack9999 merged commit 5f181be into dev May 19, 2026
12 checks passed
@Mzack9999 Mzack9999 deleted the aurora-v4-migration-dev branch May 19, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant