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

Add the --wait option to the task-group show command #565

Merged
merged 1 commit into from
Oct 12, 2022

Conversation

lubosmj
Copy link
Member

@lubosmj lubosmj commented Oct 11, 2022

closes #459

@lubosmj lubosmj marked this pull request as draft October 11, 2022 16:27
@lubosmj lubosmj force-pushed the add-wait-to-group-tasks-459 branch 6 times, most recently from 11842ea to 6049764 Compare October 11, 2022 16:55
@lubosmj lubosmj marked this pull request as ready for review October 11, 2022 16:57
Copy link
Member

@mdellweg mdellweg left a comment

Choose a reason for hiding this comment

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

Very nice. Just a few cosmetic changes.

"task_group_read", parameters={"task_group_href": task_group["pulp_href"]}
"task_groups_read", parameters={"task_group_href": task_group["pulp_href"]}
Copy link
Member

Choose a reason for hiding this comment

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

This looks like a bugfix. Didn't we have tests for it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it is a bug fix. I think we do not have any tests for it. The method wait_for_task_group was not invoked anywhere.

Copy link
Member

Choose a reason for hiding this comment

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

Good catch!

@@ -0,0 +1,2 @@
Introduced the option ``--wait`` for the task-group show command. By using this option, details
of a specific task-group will be shown only in case all related tasks will be finished.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
of a specific task-group will be shown only in case all related tasks will be finished.
of the task-group will be shown only after waiting for all related tasks to finish.

Please don't do the crazy wrapping here. Wrap whole sentences instead.

@@ -37,7 +37,12 @@ test "$(echo "$OUTPUT" | jq ".paths | length")" -eq 2
# test refresh
expect_succ pulp file acs refresh --name $acs
Copy link
Member

Choose a reason for hiding this comment

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

maybe add --background here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will "ERROUTPUT" be still accessible on the next line?

Copy link
Member

Choose a reason for hiding this comment

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

It will only be overwritten on the next "expect_*"

Copy link
Member

Choose a reason for hiding this comment

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

Or you mean that "--background" still tells you about the triggered taskgroup? I hope so.

@@ -18,3 +28,49 @@ def task_group(ctx: click.Context, pulp_ctx: PulpContext) -> None:

task_group.add_command(list_command())
task_group.add_command(show_command(decorators=[href_option]))
Copy link
Member

Choose a reason for hiding this comment

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

This ought to go now.

@lubosmj lubosmj marked this pull request as draft October 12, 2022 09:22
@lubosmj lubosmj force-pushed the add-wait-to-group-tasks-459 branch from 6049764 to c3d81fb Compare October 12, 2022 11:45
@lubosmj lubosmj force-pushed the add-wait-to-group-tasks-459 branch from c3d81fb to 6070b47 Compare October 12, 2022 11:45
@lubosmj lubosmj requested a review from mdellweg October 12, 2022 12:07
@lubosmj lubosmj marked this pull request as ready for review October 12, 2022 12:07
@mdellweg mdellweg merged commit ab4fa6a into pulp:main Oct 12, 2022
@mdellweg mdellweg added this to the 0.16.0 milestone Oct 17, 2022
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.

Add --wait option to "pulp task-group show"
2 participants