Skip to content

Conversation

@matt-bernstein
Copy link
Contributor

FSM bugfix

@matt-bernstein matt-bernstein requested a review from a team as a code owner December 1, 2025 21:52
@netlify
Copy link

netlify bot commented Dec 1, 2025

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit ec459b2
🔍 Latest deploy log https://app.netlify.com/projects/heartex-docs/deploys/69335184e5d5810008936e0a

@netlify
Copy link

netlify bot commented Dec 1, 2025

Deploy Preview for label-studio-storybook canceled.

Name Link
🔨 Latest commit ec459b2
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-storybook/deploys/693351844f8d850009908c4d

@github-actions github-actions bot added the fix label Dec 1, 2025
@netlify
Copy link

netlify bot commented Dec 1, 2025

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit ec459b2
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-docs-new-theme/deploys/69335184b9b4ea0008cde6b7

@netlify
Copy link

netlify bot commented Dec 1, 2025

Deploy Preview for label-studio-playground canceled.

Name Link
🔨 Latest commit ec459b2
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-playground/deploys/693351841424dd00087372fb

Comment on lines 1310 to 1319
instance.project.update_tasks_states(
maximum_annotations_changed=False,
overlap_cohort_percentage_changed=False,
tasks_number_changed=True,
)
# FSM: Recalculate project state after a single task deletion (signal-based path) via settings
from core.utils.common import load_func

update_func = load_func(settings.FSM_UPDATE_PROJECT_STATE_AFTER_TASK_CHANGE)
update_func(instance.project, user=getattr(instance, 'updated_by', None))
Copy link
Contributor

@bmartel bmartel Dec 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already had an update running here, I guess the same question as above?

Comment on lines 62 to 67
project.update_tasks_states(
maximum_annotations_changed=False, overlap_cohort_percentage_changed=False, tasks_number_changed=True
)
# FSM: Recalculate project state after deletion/unlink using swappable setting
update_func = load_func(settings.FSM_UPDATE_PROJECT_STATE_AFTER_TASK_CHANGE)
update_func(project, user=user)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already had a project update running here, is there something wrong with the update_tasks_states function? Is that an FSM-based function, or what is that doing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It predates FSM, it updates task counters in the project. It also runs async in Redis, so I need to do some thinking about whether this new update is best done sync or async.

@codecov
Copy link

codecov bot commented Dec 1, 2025

Codecov Report

❌ Patch coverage is 87.50000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.34%. Comparing base (4f6860d) to head (ec459b2).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
label_studio/fsm/state_manager.py 50.00% 1 Missing ⚠️
label_studio/fsm/utils.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #8932       +/-   ##
============================================
+ Coverage    65.93%   81.34%   +15.40%     
============================================
  Files          828      267      -561     
  Lines        64588    24049    -40539     
  Branches     10984        0    -10984     
============================================
- Hits         42585    19562    -23023     
+ Misses       21999     4487    -17512     
+ Partials         4        0        -4     
Flag Coverage Δ
lsf-e2e ?
lsf-integration ?
lsf-unit ?
pytests 81.34% <87.50%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@matt-bernstein
Copy link
Contributor Author

matt-bernstein commented Dec 3, 2025

/git merge develop

Workflow run
Successfully merged: 2 files changed, 32 insertions(+), 5 deletions(-)

@matt-bernstein
Copy link
Contributor Author

matt-bernstein commented Dec 3, 2025

/git merge develop

Workflow run
Successfully merged: 6 files changed, 106 insertions(+), 33 deletions(-)

@matt-bernstein
Copy link
Contributor Author

matt-bernstein commented Dec 3, 2025

/git merge develop

Workflow run
Successfully merged: create mode 100644 docs/themes/v2/source/images/releases/flight_app_builder.gif

@matt-bernstein matt-bernstein requested a review from a team December 3, 2025 20:01
@matt-bernstein
Copy link
Contributor Author

matt-bernstein commented Dec 3, 2025

/fmt

Workflow run

@matt-bernstein
Copy link
Contributor Author

matt-bernstein commented Dec 3, 2025

/fmt

Workflow run

@matt-bernstein
Copy link
Contributor Author

Realized this is more complex than I thought while using the async job - have to plumb user through all usages of it to set the FSM transition history correctly.

@matt-bernstein
Copy link
Contributor Author

matt-bernstein commented Dec 4, 2025

/fmt

Workflow run

@matt-bernstein
Copy link
Contributor Author

matt-bernstein commented Dec 4, 2025

/git merge develop

Workflow run
Successfully merged: 2 files changed, 55 insertions(+), 51 deletions(-)

@matt-bernstein
Copy link
Contributor Author

matt-bernstein commented Dec 4, 2025

/git merge develop

Workflow run
Successfully merged: 2 files changed, 30 insertions(+), 3 deletions(-)

@matt-bernstein
Copy link
Contributor Author

matt-bernstein commented Dec 4, 2025

/git merge develop

Workflow run
Successfully merged: 1 file changed, 3 insertions(+), 1 deletion(-)

@matt-bernstein
Copy link
Contributor Author

matt-bernstein commented Dec 4, 2025

/git merge develop

Workflow run
Successfully merged: 2 files changed, 4 insertions(+), 1 deletion(-)

@matt-bernstein
Copy link
Contributor Author

matt-bernstein commented Dec 5, 2025

/git merge develop

Workflow run
Successfully merged: 4 files changed, 61 insertions(+), 5 deletions(-)

@matt-bernstein
Copy link
Contributor Author

matt-bernstein commented Dec 5, 2025

/git merge develop

Workflow run
Successfully merged: 3 files changed, 12 insertions(+), 12 deletions(-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants