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

Job activation resolves before all jobs are retrieved #214

Closed
huygur opened this issue Jul 23, 2024 · 2 comments
Closed

Job activation resolves before all jobs are retrieved #214

huygur opened this issue Jul 23, 2024 · 2 comments
Labels
bug Something isn't working as intended

Comments

@huygur
Copy link
Contributor

huygur commented Jul 23, 2024

SDK Component

activateJobs() method is not working as expected (as it is documented in the original Zeebe API).

Expected Behavior / Current Behavior

If Zeebe activates 20 jobs, I would like to access all 20 jobs.

  • When I try to activate a job that doesn't exist (ex: invalid type)
    • Expected behavior: If I pass 5000 to requestTimeout, method should respond with 0 jobs after 5 seconds
      Current behavior: If I pass 5000 to requestTimeout, method does not respond / is stuck
    • Expected behavior: If I pass -1 to requestTimeout, method should respond with 0 jobs immediately
      Current behavior: If I pass -1 to requestTimeout, method does not respond / is stuck
  • If I have 20 process instances running on the same process, on the same flow node (a service task), and I try to activate jobs with the following parameters:
{
    "maxJobsToActivate": 20,
    "requestTimeout": 5000,
    "timeout": 1000,
    "type": "some-type",
    "worker": "some-worker"
}

Expected behavior: Zeebe activates 20 jobs, I get 20 jobs
Current behavior: Zeebe activates 20 jobs, I get 6 jobs

Possible Solution

Currently stream is waiting for the data and resolves immediately once some data is available:

Also, there is no stream.end function which makes the method stuck until there is some data.

Here is a PR: #213

Steps to Reproduce

Context (Environment)

@huygur huygur added the bug Something isn't working as intended label Jul 23, 2024
@jwulf
Copy link
Member

jwulf commented Jul 29, 2024

Thank you for identifying this, and for the PR to fix it!

@jwulf
Copy link
Member

jwulf commented Jul 29, 2024

Release 8.6.9 contains this fix.

@jwulf jwulf closed this as completed Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants