Skip to content

Fix 'occured' -> 'occurred' typos in AWX tasks and controller_api#16405

Open
SAY-5 wants to merge 3 commits intoansible:develfrom
SAY-5:fix-occured-typos
Open

Fix 'occured' -> 'occurred' typos in AWX tasks and controller_api#16405
SAY-5 wants to merge 3 commits intoansible:develfrom
SAY-5:fix-occured-typos

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented Apr 17, 2026

Fix 5 instances of occuredoccurred:

  • awx/main/tasks/receptor.py (×2): Comments
  • awx/main/tasks/jobs.py: PostRunError message (user-visible in job output)
  • awx_collection/plugins/module_utils/controller_api.py (×2): ConfigFileException messages

String/comment-only change.

Signed-off-by DCO.

Summary by CodeRabbit

  • Bug Fixes
    • Corrected spelling errors in error messages related to inventory data operations and configuration file handling.

@github-actions github-actions Bot added component:api component:awx_collection issues related to the collection for controlling AWX community labels Apr 17, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 17, 2026

📝 Walkthrough

Walkthrough

This 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

Cohort / File(s) Summary
Error message corrections
awx/main/tasks/jobs.py, awx_collection/plugins/module_utils/controller_api.py
Corrected spelling of "occured" to "occurred" in exception messages raised during inventory-saving and config-file-loading operations.
Comment corrections
awx/main/tasks/receptor.py
Fixed spelling of "occured" to "occurred" in inline code comments describing task-related behavior.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: correcting the misspelling of 'occured' to 'occurred' across multiple files.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
awx/main/tasks/jobs.py (1)

1967-1969: Preserve exception cause when re-raising PostRunError (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

📥 Commits

Reviewing files that changed from the base of the PR and between e5bae59 and af1a6fa.

📒 Files selected for processing (3)
  • awx/main/tasks/jobs.py
  • awx/main/tasks/receptor.py
  • awx_collection/plugins/module_utils/controller_api.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community component:api component:awx_collection issues related to the collection for controlling AWX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant