Skip to content
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

Merged
merged 18 commits into from
Oct 24, 2024
Merged

Release v2.21.2 #8591

merged 18 commits into from
Oct 24, 2024

Conversation

cvat-bot[bot]
Copy link
Contributor

@cvat-bot cvat-bot bot commented Oct 24, 2024

Added

Fixed

cvat-bot bot and others added 18 commits October 18, 2024 11:01
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.
Copy link
Contributor

coderabbitai bot commented Oct 24, 2024

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 73.43750% with 34 lines in your changes missing coverage. Please review.

Project coverage is 74.26%. Comparing base (5be5d59) to head (2f282d5).
Report is 35 commits behind head on master.

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     
Components Coverage Δ
cvat-ui 78.71% <69.69%> (-0.01%) ⬇️
cvat-server 70.47% <74.73%> (+0.01%) ⬆️

@cvat-bot cvat-bot bot merged commit 5022eaa into master Oct 24, 2024
31 checks passed
@cvat-bot cvat-bot bot deleted the release-2.21.2 branch October 24, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants