-
Notifications
You must be signed in to change notification settings - Fork 18
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
fix: resolve bug during upgrade from 2.0.7 #267
Conversation
This set of changes enhances the installation process and update checking mechanism. The installation script now removes old Docker images, fixes permissions for Docker volumes and the project directory, and handles configuration files for various tools. The update check has been improved to reduce unnecessary API calls. Additionally, minor updates have been made to the documentation links and Docker configuration.
This change modifies how reNgine checks for updates. Instead of always showing a UI notification when an update is available, the notification is now suppressed unless explicitly requested by the user (by clicking "Check for Updates" in the menu) or a day has passed since the last check. The update check itself still runs regularly in the background.
Reviewer's Guide by SourceryThis pull request enhances the installation script and update mechanism for reNgine-ng, focusing on handling Docker images and volumes, improving update checks, and managing configuration files. Key changes include the addition of functions to remove old Docker images, fix volume permissions, and manage project ownership. The update mechanism now reduces API calls and provides a better user experience by checking for updates more efficiently. Sequence diagram for Docker image and volume handling during installationsequenceDiagram
participant User
participant InstallScript
participant Docker
User->>InstallScript: Run installation script
InstallScript->>Docker: Check for old Docker images
Docker-->>InstallScript: List of old images
InstallScript->>Docker: Remove old images
Docker-->>InstallScript: Confirmation of removal
InstallScript->>Docker: Check and fix volume permissions
Docker-->>InstallScript: Confirmation of permission fix
InstallScript->>User: Installation complete
Sequence diagram for update check mechanismsequenceDiagram
participant User
participant WebApp
participant LocalStorage
participant API
User->>WebApp: Initiate update check
WebApp->>LocalStorage: Check 'update_available' flag
alt Update available
WebApp->>API: Fetch update details
API-->>WebApp: Update details
WebApp->>LocalStorage: Update 'update_available' and details
WebApp->>User: Notify update available
else No update available
WebApp->>LocalStorage: Check last update date
alt One day passed
WebApp->>API: Fetch update details
API-->>WebApp: No update available
WebApp->>LocalStorage: Update 'last_update_checked'
WebApp->>User: Notify no update
else Same day
WebApp->>User: Notify no update
end
end
Class diagram for installation script enhancementsclassDiagram
class InstallScript {
+install_make()
+remove_old_images()
+fix_volumes_permissions(user_id, group_id)
+fix_project_ownership(user_id, group_id)
+main()
}
class Docker {
+ps()
+rmi(image)
+volume_inspect(volume)
+run(command)
}
InstallScript --> Docker : uses
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @psyray - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding a rollback mechanism or detailed logging for the Docker image removal process to aid in debugging failed removals.
- The update logic in the web template could be simplified by extracting the API call into a separate function.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
By following the wiki step by step it works
No issues or bugs are detected
fix #263
Improve installation script and update handling from version below 2.1.0
This set of changes enhances the installation script and update mechanism of reNgine-ng. The installation script now handles potential issues with Docker images and volumes, ensuring a smoother installation process. The update check has been improved to reduce API calls and provide a better user experience. Additionally, configuration files for certain tools are now managed during installation.