Skip to content

Conversation

@Eldies
Copy link
Contributor

@Eldies Eldies commented Feb 4, 2026

Motivation and context

JobReadSerializer has a field issues. The field is only filled when jobs are requested in API.
When update handler for jobs is triggered, the field is empty for old job instance.
Due to that, if the job has X issues, every update to the job, even if it does not involve issues, creates a server event which incorrectly says that number of issues changed from 0 to X.

Since the only way to fix the value is to introduce an additional join on every update, and since there exists another way to get changes of issues (their own create/delete events), the best way to deal with the problem is to split JobReadSerializer into two serialisers: JobReadForEventSerializer for logging events and JobReadSerializer(JobReadForEventSerializer) which is used in API

How has this been tested?

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

@Eldies Eldies requested a review from SpecLad as a code owner February 4, 2026 12:26
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.91%. Comparing base (e9fae7a) to head (1f873f3).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #10257      +/-   ##
===========================================
+ Coverage    75.90%   75.91%   +0.01%     
===========================================
  Files          430      430              
  Lines        46573    46578       +5     
  Branches      4198     4198              
===========================================
+ Hits         35352    35362      +10     
+ Misses       11221    11216       -5     
Components Coverage Δ
cvat-ui 77.68% <ø> (+<0.01%) ⬆️
cvat-server 74.41% <100.00%> (+0.02%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants