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

I as a Zeebe test creator cannot test the ActivateJobs RPC with the fetchVariable parameter #675

Closed
aivinog1 opened this issue Feb 27, 2023 · 1 comment · Fixed by #1058
Assignees
Labels
good first issue Good for newcomers kind/bug Categorizes issue or PR as related to a bug. onboarding

Comments

@aivinog1
Copy link
Contributor

aivinog1 commented Feb 27, 2023

Description

It seems that this parameter isn't supported in the gateway service (we are looking for request.getFetchVariableList()):

public void activateJobs(
final ActivateJobsRequest request,
final StreamObserver<ActivateJobsResponse> responseObserver) {
final Long requestId =
gatewayRequestStore.registerNewRequest(request.getClass(), responseObserver);
final RecordMetadata recordMetadata =
prepareRecordMetadata()
.requestId(requestId)
.valueType(ValueType.JOB_BATCH)
.intent(JobBatchIntent.ACTIVATE);
final JobBatchRecord jobBatchRecord = new JobBatchRecord();
jobBatchRecord.setType(request.getType());
jobBatchRecord.setWorker(request.getWorker());
jobBatchRecord.setTimeout(request.getTimeout());
jobBatchRecord.setMaxJobsToActivate(request.getMaxJobsToActivate());
writer.writeCommandWithoutKey(jobBatchRecord, recordMetadata);
}
.

So, when I call this method all variables are fetched back.

Expected behaviour

When I call the the ActivateJobs RPC with the fetchVariable parameter, jobs that return contain only specified variables.

Reproduction steps

Test code
        zeebeClient
            .newActivateJobsCommand()
            .jobType("some-type")
            .maxJobsToActivate(3)
            .fetchVariables(listOf("one", "two"))
            .send()
            .join()
Process

Environment

  • OS: MacOS 12.6.3
  • Version: 8.1.8 in Docker.
@korthout
Copy link
Member

korthout commented Mar 1, 2023

@aivinog1 Thank you for reporting this. This seems like something that should be fixed. We're marking it as later priority, as we will be focusing on other topics at the moment.

@ghost ghost closed this as completed in 13d2502 Jan 31, 2024
ghost pushed a commit that referenced this issue Jan 31, 2024
1059: [Backport stable/8.4] fix: Add `fetchVariable` parameter support in ActivateJobs RPC r=github-actions[bot] a=backport-action

# Description
Backport of #1058 to `stable/8.4`.

relates to #675

Co-authored-by: Dmitriy Melnychuk <dmitriy.melnychuk@capgemini.com>
ghost pushed a commit that referenced this issue Jan 31, 2024
1062: [Backport stable/8.1] fix: Add fetchVariable parameter support in ActivateJobs RPC r=korthout a=ce-dmelnych

# Description
Backport of #1058 to `stable/8.1`.

relates to #675

Co-authored-by: Dmitriy Melnychuk <dmitriy.melnychuk@capgemini.com>
ghost pushed a commit that referenced this issue Jan 31, 2024
1061: [Backport stable/8.2] fix: Add fetchVariable parameter support in ActivateJobs RPC r=korthout a=ce-dmelnych

# Description
Backport of #1058 to `stable/8.2`.

relates to #675

Co-authored-by: Dmitriy Melnychuk <dmitriy.melnychuk@capgemini.com>
ghost pushed a commit that referenced this issue Jan 31, 2024
1060: [Backport stable/8.3] fix: Add fetchVariable parameter support in ActivateJobs RPC r=korthout a=ce-dmelnych

# Description
Backport of #1058 to `stable/8.3`.

relates to #675

Co-authored-by: Dmitriy Melnychuk <dmitriy.melnychuk@capgemini.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers kind/bug Categorizes issue or PR as related to a bug. onboarding
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants