-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Release v2.21.2 #8591
Release v2.21.2 #8591
Conversation
Update develop after v2.21.1
My main motivation was really to add a mechanism to statically define periodic jobs in the project configuration (which I need to do for a feature I'm working on). Such a mechanism is needed for a few reasons: 1. There's no good place to put code that creates periodic jobs. You could do it on app initialization, but that means you have to run Redis to use `manage.py`, which is inconvenient for development; and it causes much more Redis traffic than necessary, since the code will run whenever any backend service starts (or restarts). This patch fixes this by adding a new management command, `syncperiodicjobs`, that runs once per deployment. 2. It allows to find and delete jobs that are no longer needed. This is done by recording all created jobs in a Redis set. Without this, even when you delete the code that creates a job, the job itself would persist in Redis forever and require manual intervention to delete. 3. It contains common logic to recreate a job when its parameters change. Besides the general mechanism, I also added one concrete job that cleans up expired Django sessions. This helps to demonstrate the mechanism, and is useful in its own right.
Nowadays it's available from the Ubuntu repositories, so install it from there. This declutters our root directory a bit, plus it makes enumerating 3rd-party dependencies easier.
<!-- Raise an issue to propose your change (https://github.com/cvat-ai/cvat/issues). It helps to avoid duplication of efforts from multiple independent contributors. Discuss your ideas with maintainers to be sure that changes will be approved and merged. Read the [Contribution guide](https://docs.cvat.ai/docs/contributing/). --> <!-- Provide a general summary of your changes in the Title above --> ### Motivation and context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. Describe your changes in detail, add screenshots. --> Fixes #8576 ### How has this been tested? <!-- Please describe in detail how you tested your changes. Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. --> I've tried it on my CVAT installation and it works. ### Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. If an item isn't applicable for some reason, then ~~explicitly strikethrough~~ the whole line. If you don't do that, GitHub will show incorrect progress for the pull request. If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] I submit my changes into the `develop` branch - [x] I have created a changelog fragment <!-- see top comment in CHANGELOG.md --> - [ ] I have updated the documentation accordingly - [ ] I have added tests to cover my changes - [x] I have linked related issues (see [GitHub docs]( https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)) <!-- - [ ] I have increased versions of npm packages if it is necessary ([cvat-canvas](https://github.com/cvat-ai/cvat/tree/develop/cvat-canvas#versioning), [cvat-core](https://github.com/cvat-ai/cvat/tree/develop/cvat-core#versioning), [cvat-data](https://github.com/cvat-ai/cvat/tree/develop/cvat-data#versioning) and [cvat-ui](https://github.com/cvat-ai/cvat/tree/develop/cvat-ui#versioning)) --> ### License - [x] I submit _my code changes_ under the same [MIT License]( https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the project. Feel free to contact the maintainers if that's a concern. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new service, `cvat_grafana`, for enhanced Grafana container management. - Configured automatic restart and integrated with ClickHouse environment settings. - Added authentication options and plugin installations for Grafana. - Custom entrypoint script for setup of data sources and dashboards. - **Bug Fixes** - Resolved issues with the Grafana container restart policy to ensure proper management. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
`_patched_retry` tries to schedule a copy of the current job. In particular, it copies the dependencies of the old job using `current_rq_job.dependency_ids`. Unfortunately, `dependency_ids` does not return IDs of dependency jobs, as one might expect. It actually returns the Redis _keys_ corresponding to those jobs, as bytestrings. The RQ job creation code does not support bytestrings as dependency specifiers, so it unintentionally treats them as sequences, saving the individual bytes (as integers) as the dependency job IDs. But since IDs have to be strings, the scheduler quickly crashes when it tries to use those integer "IDs" to construct Redis keys. Thankfully, we don't actually need to get the dependency IDs. `_patched_retry` is only used inside running jobs, and if a job is running, it means that all its dependencies are already completed. Thus, the newly scheduled job doesn't need to have any dependencies at all.
Checkbox for granting access to analytics
There is no need to load all images into memory during chunk preparation
…ult once if `CVAT_ANALYTICS` is not provided (#8580) <!-- Raise an issue to propose your change (https://github.com/cvat-ai/cvat/issues). It helps to avoid duplication of efforts from multiple independent contributors. Discuss your ideas with maintainers to be sure that changes will be approved and merged. Read the [Contribution guide](https://docs.cvat.ai/docs/contributing/). --> <!-- Provide a general summary of your changes in the Title above --> ### Motivation and context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. Describe your changes in detail, add screenshots. --> ### How has this been tested? <!-- Please describe in detail how you tested your changes. Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. --> ### Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. If an item isn't applicable for some reason, then ~~explicitly strikethrough~~ the whole line. If you don't do that, GitHub will show incorrect progress for the pull request. If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] I submit my changes into the `develop` branch - [ ] I have created a changelog fragment <!-- see top comment in CHANGELOG.md --> - [ ] I have updated the documentation accordingly - [ ] I have added tests to cover my changes - [ ] I have linked related issues (see [GitHub docs]( https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)) - [ ] I have increased versions of npm packages if it is necessary ([cvat-canvas](https://github.com/cvat-ai/cvat/tree/develop/cvat-canvas#versioning), [cvat-core](https://github.com/cvat-ai/cvat/tree/develop/cvat-core#versioning), [cvat-data](https://github.com/cvat-ai/cvat/tree/develop/cvat-data#versioning) and [cvat-ui](https://github.com/cvat-ai/cvat/tree/develop/cvat-ui#versioning)) ### License - [x] I submit _my code changes_ under the same [MIT License]( https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the project. Feel free to contact the maintainers if that's a concern. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced dataset import functionality with additional parameters for projects. - New method for retrieving cloud storage content with improved filtering options. - Added preview functionality for cloud storage images. - **Improvements** - Improved error handling across various viewsets. - Enhanced import/export functionality for job annotations. - Updated analytics configuration for better flexibility. - **Bug Fixes** - Ensured proper association of projects with organizations upon creation. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
…ils (#8587) Currently, if an auto-annotation request fails, the UI doesn't re-enable the "Automatic annotation" menu item. This seems like a mistake, since at that point there's no reason why a new request could not be started - in fact, it's possible to do if you just refresh the page. Fix this by only disabling the menu item if the current AR is still in progress.
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Quality Gate passedIssues Measures |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8591 +/- ##
==========================================
- Coverage 74.26% 74.26% -0.01%
==========================================
Files 400 403 +3
Lines 43224 43315 +91
Branches 3909 3914 +5
==========================================
+ Hits 32100 32167 +67
- Misses 11124 11148 +24
|
Added
Fixed
Expired sessions are now cleared from the database daily (Add a mechanism for statically defining periodic background jobs #8552)
Fixed export/import errors for tracks with duplicated shapes. Fixed a bug which caused shape duplication on track import. (Fixing import and export issues with invalid tracks #8553)
Fix Grafana container restart policy (Fix grafana container restart policy #8577)
Fixed some interface tooltips having 'undefined' shortcuts (Fixed tooltips with undefined shortcuts #8578)
Memory consumption during preparation of image chunks (Memory optimization for image chunk preparation #8581)
Fixed a bug where an export RQ job being retried may break scheduling of new jobs (Fix a bug where retrying an export RQ job may break scheduling #8584)
UI now allows the user to start automatic annotation again if the previous request fails (Allow users to start auto-annotation again if the previous request fails #8587)