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

feat: added option for releaseInactive to not raise task attempts (MAPCO-5466) #46

Merged
merged 4 commits into from
Nov 24, 2024

Conversation

nitzanmorr
Copy link
Contributor

@nitzanmorr nitzanmorr commented Nov 24, 2024

Added this feature to handle task liberator's updateTime release better. Task liberator releases "lost" tasks that were pulled but never had a heartbeat. In the current version, Job manager would release the task and raise the task's attempts by one. This way, attempts are raised without a worker working on the task, and by the time a worker actually works on that task, the attempts reach its limits. This PR adds an option through an optional query param to release the task without raising the number of attempts. If the "shouldRaiseAttempts" param is not provided, the default behavior will increase the attempts. This way it doesn't break anything and past requests should still work. A following task liberator PR will come.

Question Answer
Bug fix
New feature
Breaking change
Deprecations
Documentation
Tests added
Chore

A video of a local test of the expected behaviour:
job-manager.webm

@nitzanmorr nitzanmorr self-assigned this Nov 24, 2024
src/common/dataModels/tasks.ts Outdated Show resolved Hide resolved
@nitzanmorr nitzanmorr merged commit 660f0db into master Nov 24, 2024
9 checks passed
@nitzanmorr nitzanmorr deleted the release-inactive-without-raising-attempts branch November 24, 2024 14:12
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.

3 participants