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

fix(variant): generates cascades of variants synchronously to avoid timeout dead locks #1806

Merged
merged 22 commits into from
Nov 14, 2023

Conversation

laurent-laporte-pro
Copy link
Contributor

No description provided.

@laurent-laporte-pro laurent-laporte-pro self-assigned this Nov 13, 2023
Copy link

commit-lint bot commented Nov 13, 2023

Chore

  • typing: simplify typing in pytest fixture (da13c45)
  • variant-study-service: correct the timeout parameter to use a default value (1e2e617)
  • improve log message readability by adding prominent emojis (eb87bb8)

Features

  • repository: add a method to update a task status to TIMEOUT in database (38addea)
  • variant-generation: improve error handling for timeout tasks (979ac6a)
  • tasks: add timeout parameter to control task completion wait time (0cac11c)
  • variant-study-repo: add the get_ancestor_or_self_ids to retrieve all ancestor IDs of a variant study (8262e14)
  • permission: add the assert_permission_on_studies to check user permission of several studies (ea69c38)
  • db: add methods to check the variant study snapshot status (e4f7756)
  • variant: add the SnapshotGenerator class (70595c9)
  • variant: use the SnapshotGenerator class in the VariantStudyService (be805dc)

Bug Fixes

  • task-job-service: update the task status to TIMEOUT if the processing is too long (ff357bc)

Code Refactoring

  • variant-study-service: improve implementation of safe generation (959b2c0)
  • variant-study-repo: optionally use a user-defined SqlAlchemy session instead of the global db.session and improve the documentation (cd15eec)

Tests

  • variant-generation: add a unit test to check that the variant generation is not blocking the main thread (0ba6320)
  • hydro: improves testing of hydraulic allocation variants (21823ba)
  • variant: correct the test_variant_model unit test to use fixtures (340881e)

Styles

  • db: add type hints in database model classes (4c9c081)
  • correct return type of the get task endpoint (7dff31a)
  • correct variable naming (8d42c1b)

Documentation

  • cache: add the documentation of cache constants (94d3cdb)

Performance Improvements

  • db: improved study query performance using owner and groups preloading (16cf54f)

Contributors

laurent-laporte-pro

Commit-Lint commands

You can trigger Commit-Lint actions by commenting on this PR:

  • @Commit-Lint merge patch will merge dependabot PR on "patch" versions (X.X.Y - Y change)
  • @Commit-Lint merge minor will merge dependabot PR on "minor" versions (X.Y.Y - Y change)
  • @Commit-Lint merge major will merge dependabot PR on "major" versions (Y.Y.Y - Y change)
  • @Commit-Lint merge disable will desactivate merge dependabot PR
  • @Commit-Lint review will approve dependabot PR
  • @Commit-Lint stop review will stop approve dependabot PR

hdinia
hdinia previously approved these changes Nov 14, 2023
antarest/study/repository.py Show resolved Hide resolved
antarest/core/tasks/repository.py Show resolved Hide resolved
antarest/core/tasks/web.py Outdated Show resolved Hide resolved
antarest/core/tasks/service.py Show resolved Hide resolved
antarest/core/tasks/service.py Show resolved Hide resolved
antarest/study/repository.py Outdated Show resolved Hide resolved
antarest/study/repository.py Show resolved Hide resolved
Added the 'timeout' parameter to the /v1/tasks/{task_id} endpoint to enable users to control the waiting time for task completion.
…y session instead of the global `db.session` and improve the documentation
helper class used to generate snapshots for variant studies.
@laurent-laporte-pro laurent-laporte-pro merged commit 1874410 into release/2.15.5 Nov 14, 2023
7 checks passed
@laurent-laporte-pro laurent-laporte-pro deleted the hotfix/1780-fix-timeout-issue branch November 14, 2023 16:33
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.

[ANT-871] Timeout error when updating variant properties or matrices with API
2 participants