Fix 'occured' -> 'occurred' typos in AWX tasks and controller_api#16405
Fix 'occured' -> 'occurred' typos in AWX tasks and controller_api#16405SAY-5 wants to merge 3 commits intoansible:develfrom
Conversation
Signed-off-by: SAY-5 <[email protected]>
Signed-off-by: SAY-5 <[email protected]>
Signed-off-by: SAY-5 <[email protected]>
📝 WalkthroughWalkthroughThis PR addresses spelling corrections across the codebase, fixing "occured" to "occurred" in error messages and comments within the jobs, receptor, and controller API modules. No functional changes or control flow modifications are introduced. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
awx/main/tasks/jobs.py (1)
1967-1969: Preserve exception cause when re-raisingPostRunError(Line 1969).Use explicit chaining so the original failure is retained in traceback context during debugging.
Proposed change
- except Exception: + except Exception as exc: logger.exception('Exception saving {} content, rolling back changes.'.format(inventory_update.log_format)) - raise PostRunError('Error occurred while saving inventory data, see traceback or server logs', status='error', tb=traceback.format_exc()) + raise PostRunError( + 'Error occurred while saving inventory data, see traceback or server logs', + status='error', + tb=traceback.format_exc(), + ) from exc🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@awx/main/tasks/jobs.py` around lines 1967 - 1969, Change the bare except to "except Exception as e" to capture the original exception, keep the existing logger.exception call with inventory_update.log_format, and re-raise the PostRunError with explicit exception chaining using "raise PostRunError(... ) from e" so the original cause is preserved in the traceback; you can continue to include traceback.format_exc() in the PostRunError message if desired.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@awx/main/tasks/jobs.py`:
- Around line 1967-1969: Change the bare except to "except Exception as e" to
capture the original exception, keep the existing logger.exception call with
inventory_update.log_format, and re-raise the PostRunError with explicit
exception chaining using "raise PostRunError(... ) from e" so the original cause
is preserved in the traceback; you can continue to include
traceback.format_exc() in the PostRunError message if desired.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: d2ce1795-6d76-4647-84c3-4658b94e7498
📒 Files selected for processing (3)
awx/main/tasks/jobs.pyawx/main/tasks/receptor.pyawx_collection/plugins/module_utils/controller_api.py
Fix 5 instances of
occured→occurred:awx/main/tasks/receptor.py(×2): Commentsawx/main/tasks/jobs.py: PostRunError message (user-visible in job output)awx_collection/plugins/module_utils/controller_api.py(×2): ConfigFileException messagesString/comment-only change.
Signed-off-by DCO.
Summary by CodeRabbit