Add update checker management command and documentation#3127
Add update checker management command and documentation#3127mlodic merged 36 commits intointelowlproject:developfrom
Conversation
fgibertoni
left a comment
There was a problem hiding this comment.
Hey @lvb05 thanks for your contribution. Can you please compile the checklist in PR template ? It contains many important step to follow before asking for a review.
I’ve added and completed the PR checklist in the description. |
|
I can tell you've not read it carefully since your PR is pointing to the master branch. |
|
Hi @fgibertoni, |
fgibertoni
left a comment
There was a problem hiding this comment.
Looking good, thanks!
@mlodic for last check on expected results, otherwise we can merge this.
mlodic
left a comment
There was a problem hiding this comment.
can you please show an example output of this command? a screenshot
Also there's no cronjob here but only the management command even if we agreed on that in the issue. This won't be run by the normal user manually, we need something that runs automatically and notify the user.
Also, the cronjob would need to add a notification through the current notification system. In that way, the user would see that notification in the GUI at the top right as a message.
README.md
Outdated
| All info about installation, usage, configuration and contribution can be found [here](https://intelowlproject.github.io/docs/) | ||
|
|
||
|
|
||
| ### Update Checker |
There was a problem hiding this comment.
we cannot pollute the ReadMe with this content. Please remove this line and add this instead with a new PR in the Installation section: https://github.com/intelowlproject/docs/blob/main/docs/IntelOwl/installation.md
There was a problem hiding this comment.
Thanks for highlighting this
I’ve restored the README to its original state. I’ll add the Update Checker documentation under the Installation section in the docs repository (as suggested) via a separate PR.
|
For this PR, I kept the update checker as a management command only, mainly to introduce and validate the core logic first. |
|
We won't merge this PR with these changes only because they are actually incomplete work, by themselves they don't help solving the issue. So we can merge to the project only an implementation that contain all the necessary changes |
|
Before implementing the automatic update check, I want to confirm some things. |
|
|
By log/admin-level message, I mean a complementary signal, not a replacement for the GUI. |
Fine with this, thanks! |
|
Summary of current status
Once aligned, I’ll add GUI integration, periodic scheduling, and documentation in a follow-up PR. |
|
I'll review as soon as I can |
|
there are still conflicts and, as mentioned, this requires GUI changes otherwise it won't make a lot of sense adding this as a feature |
Yep I'll add a frontend system update panel and an API endpoint '/system/update-check/ ' to expose update status. Let me know if you’d like any specific fields or UI adjustments. |
|
Hi! |
mlodic
left a comment
There was a problem hiding this comment.
we need a showcase about how this actually works to be able to merge this, otherwise we don't know the outcome
api_app/models.py
Outdated
| logger = logging.getLogger(__name__) | ||
|
|
||
|
|
||
| # UpdateCheckStatus (replace the existing class in api_app/models.py) |
There was a problem hiding this comment.
I don't understand this comment, can you please explain?
| logger = logging.getLogger(__name__) | ||
|
|
||
|
|
||
| class UpdateCheckStatus(models.Model): |
| </div> | ||
|
|
||
| {data.update_available ? ( | ||
| <div style={styles.updateBox}>A new system update is available!</div> |
There was a problem hiding this comment.
please show GUI screenshots/video fpr both cases
|
thanks for showcasing it, it really helps. The change is fine, just one thing: I think this should be shown in the Home page, just before the "IntelOWl News" section and, in case we have the most recent version, it should not render anything because it would uselessly clutter the page. |
That makes sense. To keep things simple and avoid duplication, I can move the entire System Updates component to the Home page and render it only when an update is available. |
Hi! Done with all the refinements. Check once @mlodic @fgibertoni |
|
that's nice, thanks |
|
Thanks for the merge! @mlodic @fgibertoni |
|
feel free to open a PR about it |
…ect#3127) * Add update checker management command, settings, and docs * Format update checker with black and branch update * Fix linting issues and improve update checker command output * Fix ruff linting issues * Restore README.md (remove update checker documentation) * Fix formatting in update checker management command * Add persistent update check status model * Fix trailing whitespace in UpdateCheckStatus docstring * Use persistent state for update checks and add Celery task * Add admin GUI notification for update availability and formatting * Add IntelOwl update check system with model, migration, scheduler and unit tests * style: fix import ordering per ruff * fix: apply black formatting on tasks.py * fix(update-checker): safe lazy imports and robust version handling * fix(update-checker): prevent duplicate notifications and improve version handling * Restore intel_owl/tasks.py to upstream version * Add automated update check system with celery task, model, command and tests * fix: use __latest__ for django_celery_beat migration dependency * Fix migration 0072: use literal 'days' instead of IntervalSchedule.DAYS in historical model * Fix update-check notifications to work correctly with transactions and tests * Fix update checker tests to use UserEventQuerySet notifications and immediate execution in testing * Apply Black formatting after rebase * Fix ruff formatting issue in commons settings * Fix ruff formatting * . * . * Add system update panel and API endpoint * Fix lint issues and adjust tests * Add system update panel UI and fix lint/format issues * Fix Prettier formatting for update checker components * correct formatting and comments * system update notification show up on Home * style change in notification --------- Co-authored-by: Daniele Rosetti <55402684+drosetti@users.noreply.github.com>








This PR adds a basic update check mechanism for IntelOwl.
It allows to verify whether the running instance is behind the latest published GitHub release.
Included changes
api_app/core/update_checker.pyfor version fetch + comparison logiccheck_updatesUPDATE_CHECK_URL, version reuse via existing VERSION)How to use
The command will:
No version upgrade happens automatically.
Fixes #2876
Notes
UPDATE_CHECK_URLis now environment configurableVERSIONsecret settingChecklist
N/A – this PR does not introduce or modify any plugins.
N/A – this PR adds a management command and configuration logic only; existing functionality and tests are unaffected.
N/A – backend-only change.