Skip to content

Conversation

@honnix
Copy link
Member

@honnix honnix commented Sep 29, 2023

TL;DR

Fetch task template when encountering remote task in dynamic workflow.

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

#248 is not sufficient because in order to build dynamic job, we need task template, so in this PR we fetch task template for remote workflow.

Tracking Issue

NA

Follow-up issue

NA

Signed-off-by: Hongxin Liang <honnix@users.noreply.github.com>
return fetchLatestResource(
taskId,
request -> stub.listTasks(request).getTasksList(),
TaskOuterClass.Task::getId,
Copy link
Member Author

Choose a reason for hiding this comment

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

This double-function doesn't seem to be necessary.


public static Map<TaskIdentifier, TaskTemplate> collectTasks(
List<Node> rewrittenNodes, Map<TaskIdentifier, TaskTemplate> allTasks) {
public static Map<TaskIdentifier, TaskTemplate> collectDynamicWorkflowTasks(
Copy link
Member Author

Choose a reason for hiding this comment

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

Rename it to be more specific. This is not used by anything else.

.version(TASK_VERSION)
.build();

TypedInterface interface_ =
Copy link
Member Author

Choose a reason for hiding this comment

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

Extracted to Fixtures.

Signed-off-by: Hongxin Liang <honnix@users.noreply.github.com>
Signed-off-by: Hongxin Liang <honnix@users.noreply.github.com>
Signed-off-by: Hongxin Liang <honnix@users.noreply.github.com>
@honnix honnix marked this pull request as ready for review September 29, 2023 18:42
@honnix honnix changed the title Fetch task template Fetch task template in dynamic workflow task Oct 2, 2023
@honnix honnix requested a review from andresgomezfrr October 2, 2023 07:07
@andresgomezfrr andresgomezfrr merged commit 66efab8 into master Oct 2, 2023
@andresgomezfrr andresgomezfrr deleted the more-remoter branch October 2, 2023 08:35
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