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 parallel completed-by task identification #1071

Merged
merged 3 commits into from
Oct 12, 2020
Merged

Conversation

hub-cap
Copy link
Contributor

@hub-cap hub-cap commented Oct 5, 2020

The code that parses the track previously used the operation name to
identify which task completes a parallel loop. This was fine if tasks
were not explicitly because the task name defaults to the operation
name. If a user explicitly creates a task name, this would fail. The fix
is to use the task name instead, which still defaults to the operation
name if not provided, which preserves compatibility.

Closes #1068

The code that parses the track previously used the operation name to
identify which task completes a parallel loop. This was fine if tasks
were not explicitly because the task name defaults to the operation
name. If a user explicitly creates a task name, this would fail. The fix
is to use the task name instead, which still defaults to the operation
name if not provided, which preserves compatibility.

Closes elastic#1068
@hub-cap hub-cap added the bug Something's wrong label Oct 5, 2020
@hub-cap hub-cap added this to the 2.0.2 milestone Oct 5, 2020
@hub-cap hub-cap self-assigned this Oct 5, 2020
@danielmitterdorfer danielmitterdorfer added the :Track Management New operations, changes in the track format, track download changes and the like label Oct 6, 2020
@danielmitterdorfer
Copy link
Member

@elasticmachine test this please

Copy link
Member

@danielmitterdorfer danielmitterdorfer left a comment

Choose a reason for hiding this comment

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

Thanks for the fix. I left one nit but apart from that LGTM.

@@ -1263,7 +1264,7 @@ def parse_task(self, task_spec, ops, challenge_name, default_warmup_iterations=N
default_value=default_time_period),
clients=self._r(task_spec, "clients", error_ctx=op.name, mandatory=False, default_value=1),
# this will work because op_name must always be set, i.e. it is never `None`.
completes_parent=(op.name == completed_by_name),
Copy link
Member

Choose a reason for hiding this comment

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

Nit: I think we can get rid of the comment in the line above as well as it is not applicable anymore IMHO.

@hub-cap hub-cap merged commit 37c7494 into elastic:master Oct 12, 2020
@hub-cap hub-cap deleted the fix_1068 branch October 12, 2020 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something's wrong :Track Management New operations, changes in the track format, track download changes and the like
Projects
None yet
Development

Successfully merging this pull request may close these issues.

completed-by property in parallel element wrongly expects operation-type and not task name
2 participants