Skip to content

[chores] Added firmware upgrader websocket routes#529

Merged
nemesifier merged 12 commits into
openwisp:masterfrom
Adityashandilya555:feature/add-firmware-upgrader-websocket-routes
Jun 3, 2026
Merged

[chores] Added firmware upgrader websocket routes#529
nemesifier merged 12 commits into
openwisp:masterfrom
Adityashandilya555:feature/add-firmware-upgrader-websocket-routes

Conversation

@Adityashandilya555

@Adityashandilya555 Adityashandilya555 commented Oct 26, 2025

Copy link
Copy Markdown

Adds websocket routes for the OpenWISP firmware upgrader module when USE_OPENWISP_FIRMWARE environment variable is enabled.

This enables real-time upgrade progress tracking for:

  • Individual upgrade operations
  • Batch upgrade operations
  • Device-specific upgrade progress

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

Reference to Existing Issue

Closes #484.

Description of Changes

Modified images/common/openwisp/asgi.py to include firmware upgrader websocket routes
Please describe these changes.

Screenshot

Screenshot 2025-10-26 at 12 23 40 PM

Please include any relevant screenshots.

Adityashandilya555 and others added 3 commits October 26, 2025 12:13
Adds websocket routes for the OpenWISP firmware upgrader module
when USE_OPENWISP_FIRMWARE environment variable is enabled.

This enables real-time upgrade progress tracking for:
- Individual upgrade operations
- Batch upgrade operations
- Device-specific upgrade progress

@nemesifier nemesifier left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @Adityashandilya555, but openwisp/openwisp-firmware-upgrader#320 is not merged in master yet, so this will have to wait.

Adityashandilya555 and others added 5 commits November 5, 2025 20:24
Removed OPENWISP_MONITORING_API_BASEURL = API_BASEURL so that
monitoring charts use relative URLs and load from the dashboard
domain instead of the API domain.

This fixes SSL certificate issues for users without trusted certs
on the API domain.

Closes openwisp#526
@coderabbitai

coderabbitai Bot commented Jan 13, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds conditional websocket URL pattern routing to the ASGI application. When USE_OPENWISP_FIRMWARE is enabled, the application imports websocket_urlpatterns from openwisp_firmware_upgrader.routing and extends the existing routes list with these firmware upgrader websocket patterns.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title indicates [chores] but the PR objectives show [feature] and describe adding new functionality. The title doesn't match the actual nature of the change. Update the title to [feature] to match the actual PR objectives and the nature of the change, which adds new websocket routing functionality.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes implement the requirement from #484 by adding firmware upgrader websocket routes in asgi.py with conditional loading based on USE_OPENWISP_FIRMWARE environment variable.
Out of Scope Changes check ✅ Passed The pull request modifies only asgi.py to add firmware upgrader websocket routes as required by issue #484, with no out-of-scope changes detected.
Bug Fixes ✅ Passed This is a feature addition (adding firmware upgrader websocket routes), not a bug fix. The "Bug Fixes" check does not apply to feature implementations.
Description check ✅ Passed The PR description covers the main objective and includes most checklist items. However, documentation update is marked incomplete, and the generic template text is partially left in place.

✏️ 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.

@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.

Actionable comments posted: 0

🧹 Nitpick comments (1)
images/common/openwisp/asgi.py (1)

32-37: Implementation follows the established pattern correctly.

The conditional import and route extension for firmware upgrader websockets correctly mirrors the existing topology routes pattern (lines 25-30). The logic is sound and the import path aligns with the openwisp-firmware-upgrader routing module.

One minor formatting note: there's a blank line (line 31) separating the topology block from this new block, but no blank line between this block and the radius block (line 38). Consider adding a blank line after line 37 for visual consistency.

Regarding the static analysis hint about the unused noqa: E402 directive—keeping it is fine for consistency with the existing code style at lines 18 and 26.

Optional: Add blank line for consistency
     routes.extend(firmware_upgrader_routes)
+
 if env_bool(os.environ["USE_OPENWISP_RADIUS"]):
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 85f3ce1 and 0c13154.

📒 Files selected for processing (2)
  • images/common/openwisp/asgi.py
  • images/openwisp_dashboard/module_settings.py
💤 Files with no reviewable changes (1)
  • images/openwisp_dashboard/module_settings.py
🧰 Additional context used
🧬 Code graph analysis (1)
images/common/openwisp/asgi.py (1)
images/common/openwisp/utils.py (1)
  • env_bool (29-30)
🪛 Ruff (0.14.10)
images/common/openwisp/asgi.py

33-33: Unused noqa directive (non-enabled: E402)

Remove unused noqa directive

(RUF100)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: CI Build

@nemesifier nemesifier self-assigned this Jun 3, 2026
@nemesifier nemesifier added enhancement New feature or request docker Pull requests that update Docker code labels Jun 3, 2026
@nemesifier
nemesifier force-pushed the feature/add-firmware-upgrader-websocket-routes branch from 521eb18 to 47dd688 Compare June 3, 2026 20:25
@nemesifier nemesifier changed the title [feature] Add firmware upgrader websocket routes #484 [chores] Added firmware upgrader websocket routes Jun 3, 2026
@nemesifier
nemesifier merged commit 54a35d5 into openwisp:master Jun 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Pull requests that update Docker code enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[chores] Add firmware upgrader websocket routes

2 participants