chore: IP auto-detection fix#422
Conversation
When a task is cancelled, ApplyEvent now detects it via an etcd watch and cancels its own context, interrupting long-running operations rather than running to completion. PLAT-583
If no IPv4 address is found, fall back to the first available IPv6 address rather than returning an error. PLAT-669
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughAdds a task watcher subsystem in the task package (Watcher, sharedWatcher, watcherRegistry) backed by a new TaskStore.Watch method, wired into Service.NewWatcher and used by ApplyEvent to cancel activities on task terminal state. Separately, getFirstIP is updated to prefer IPv4 with IPv6 fallback. ChangesTask Watcher Subsystem
getFirstIP IPv4/IPv6 Preference Fix
Compact metadata: 5 files changed · +291/-11 · Go Related issues: None found Related PRs: None found Suggested labels: enhancement, backend Suggested reviewers: None found Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Up to standards ✅🟢 Issues
|
| Category | Results |
|---|---|
| Complexity | 1 medium |
🟢 Metrics 35 complexity · 0 duplication
Metric Results Complexity 35 Duplication 0
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Summary
If no IPv4 address is found, fall back to the first available IPv6 address rather than returning an error.
Changes
getFirstIPto scan all interfaces for both IPv4 and IPv6 addresses, returning IPv4 if found, otherwise IPv6, otherwise an errorTesting