-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fixed updating job/task status after changing job state #7901
Conversation
Warning Rate Limit Exceeded@bsekachev has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 3 minutes and 59 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. WalkthroughThe changes in the Changes
Assessment against linked issues
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 as PR comments)
Additionally, you can add CodeRabbit Configration 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: 2
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- cvat/apps/engine/serializers.py (1 hunks)
Additional Context Used
Ruff (2)
cvat/apps/engine/serializers.py (2)
703-703: f-string without any placeholders
1138-1138: f-string without any placeholders
Additional comments not posted (1)
cvat/apps/engine/serializers.py (1)
Line range hint
739-748
: Ensure the logic for updatingstatus
is correct.The logic for updating the
status
based onstage
andstate
seems correct, but please verify that all possible combinations ofstage
andstate
are handled appropriately.
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
Out of diff range and nitpick comments (2)
cvat/apps/engine/serializers.py (2)
Line range hint
703-703
: Remove unnecessary f-string.The f-string does not contain any placeholders and can be replaced with a regular string.
- f"Unexpected job type '{validated_data['type']}'" + "Unexpected job type '{}'".format(validated_data['type'])
Line range hint
1141-1141
: Remove unnecessary f-string.The f-string does not contain any placeholders and can be replaced with a regular string.
- f'label:create Skeleton id:{db_skeleton.id} for label_id:{db_label.id}' + "label:create Skeleton id:{} for label_id:{}".format(db_skeleton.id, db_label.id)
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- changelog.d/20240516_144912_boris_fixed_job_status.md (1 hunks)
- cvat/apps/engine/serializers.py (1 hunks)
Files skipped from review due to trivial changes (1)
- changelog.d/20240516_144912_boris_fixed_job_status.md
Additional Context Used
Ruff (2)
cvat/apps/engine/serializers.py (2)
703-703: f-string without any placeholders
1141-1141: f-string without any placeholders
Additional comments not posted (1)
cvat/apps/engine/serializers.py (1)
739-742
: Ensurestage
andstate
are correctly handled.The logic for handling
stage
andstate
attributes looks correct. The status is set based on the combination ofstage
andstate
.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #7901 +/- ##
===========================================
- Coverage 83.34% 83.34% -0.01%
===========================================
Files 380 380
Lines 40024 40023 -1
Branches 3766 3766
===========================================
- Hits 33357 33356 -1
Misses 6667 6667
|
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: 2
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- cvat/apps/engine/serializers.py (1 hunks)
Additional Context Used
Ruff (2)
cvat/apps/engine/serializers.py (2)
703-703: f-string without any placeholders
1139-1139: f-string without any placeholders
Additional comments not posted (1)
cvat/apps/engine/serializers.py (1)
737-738
: Ensure correct handling ofstage
andstate
attributes.Please verify that the logic for handling
stage
andstate
attributes is correct and consistent with the intended behavior.
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
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- cvat/apps/engine/serializers.py (1 hunks)
Additional Context Used
Ruff (2)
cvat/apps/engine/serializers.py (2)
703-703: f-string without any placeholders
1138-1138: f-string without any placeholders
Additional comments not posted (3)
cvat/apps/engine/serializers.py (3)
737-739
: LGTM! The logic for settingstate
based onstage
is correct.
740-746
: LGTM! The logic for settingstatus
based onstage
andstate
is correct.
748-749
: LGTM! The logic for updating thestate
if it has changed is correct.
Motivation and context
Resolved #7900
How has this been tested?
Checklist
develop
branch(cvat-canvas,
cvat-core,
cvat-data and
cvat-ui)
License
Feel free to contact the maintainers if that's a concern.
Summary by CodeRabbit