-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Enqueue job to prepare chunk in case of honey pot job change #8772
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
Conversation
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe changes involve modifications to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant JobQueue as Queue
participant RQJob as Job
User->>Queue: Request to create chunk job
Queue->>RQJob: Check if job exists and status
alt Job not found or finished
Queue->>RQJob: Enqueue new job
else Job exists and not finished
Queue->>User: Job already in progress
end
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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 (
|
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
cvat/apps/engine/cache.py (1)
94-96
: LGTM! Consider clarifying the comment.The logic correctly handles the case when a chunk needs to be recreated after honeypot changes. The implementation is thread-safe and aligns with the PR objectives.
Consider making the comment more explicit about the honeypot scenario:
- # Need to enqueue job in case of chunk been deleted but rq job is still exists - # This may happens in case of job with honey pots + # Need to enqueue a new job when a chunk is deleted but its RQ job still exists. + # This happens when honeypots are modified in a job, requiring chunk regeneration.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #8772 +/- ##
===========================================
+ Coverage 73.92% 73.94% +0.01%
===========================================
Files 409 409
Lines 43942 43945 +3
Branches 3985 3985
===========================================
+ Hits 32483 32494 +11
+ Misses 11459 11451 -8
|
Co-authored-by: Maxim Zhiltsov <zhiltsov.max35@gmail.com>
|
Motivation and context
Fixed a problem that occured in case if honeypots were changed in job and a chunk inside of job was requested immideately after that. (In such a case rq_job still exists but in "finished" status)
How has this been tested?
Checklist
develop
branch[ ] I have updated the documentation accordingly[ ] I have linked related issues (see GitHub docs)[ ] I have increased versions of npm packages if it is necessary(cvat-canvas,
cvat-core,
cvat-data and
cvat-ui)
License
Feel free to contact the maintainers if that's a concern.
Summary by CodeRabbit