-
-
Notifications
You must be signed in to change notification settings - Fork 91
[feat] Allow REST API to specify upgrade_options for upgrade operations #371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
youhaveme9
wants to merge
9
commits into
master
Choose a base branch
from
issue/366-allow-upgrade-options
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a960350
remove the commit
4b1112e
Merge branch 'master' of https://github.com/openwisp/openwisp-firmwar…
youhaveme9 88b4977
Merge branch 'master' of https://github.com/openwisp/openwisp-firmwar…
c39df41
Merge branch 'master' of https://github.com/openwisp/openwisp-firmwar…
ff09769
[fix] Add option for upgrade_options in upgrade operation
2e8d1ea
[tests] Add test for upgrade options
3322a08
[chores] Format code with qa formatter
82d4cae
[chores] Reverted settings.py
dcd6624
[chores] Fix CI errors
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 128
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 3298
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 186
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 5170
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 20393
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 3446
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 504
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 505
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 1134
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 172
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 109
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 265
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 1034
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 61
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 851
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 1641
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 61
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 150
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 1768
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 61
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 172
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 350
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 1483
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 61
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 543
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 3511
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 1551
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 1073
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 591
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 61
🏁 Script executed:
Repository: openwisp/openwisp-firmware-upgrader
Length of output: 61
Fix N+1 query issue in DeviceFirmwareDetailView.
The query count increases (13, 29, 28, 30, 31) are caused by an unoptimized N+1 pattern in
DeviceFirmwareSerializer.to_representation()(line 187), which callsinstance.device.upgradeoperation_set.latest("created")without prefetching. This same pattern is repeated in the view'sputandpatchhandlers (lines 341, 348).Add
prefetch_related("device__upgradeoperation_set")toDeviceFirmwareDetailView.querysetto batch the queries, similar to the pattern used inBatchUpgradeOperationDetailView(line 169).🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@youhaveme9 this seems a good catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.