Skip to content

Conversation

@gerrod3
Copy link
Contributor

@gerrod3 gerrod3 commented Sep 10, 2025

Need to figure out how to handle tests that call orphan cleanup and make sure they run last and in serial. Most of this is ensuring each test uses unique names to prevent collisions.

@gerrod3 gerrod3 force-pushed the parallel-test branch 10 times, most recently from 5447ea9 to bd148c5 Compare September 12, 2025 07:36
Comment on lines +156 to +159
if pulp_ctx.api._dry_run:
raise click.ClickException(
_("Trying to cancel {} tasks in safe-mode, aborting").format(len(tasks))
)
Copy link
Member

Choose a reason for hiding this comment

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

🤔 Is this changing the behaviour or just preventing an Exception further down in the stack to trigger?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's changing the behavior to be more consistent. Before if you ran this command in dry mode it would only give the abort message upon the first task cancellation, meaning it would only error if there was running/waiting tasks. Now it will always give an error (with the amount of available tasks to cancel) when ran in dry mode. Basically the test_tasks check of this command was really inconsistent when running in parallel.

@gerrod3
Copy link
Contributor Author

gerrod3 commented Sep 12, 2025

I can't figure out why the query_params test is failing. The output looks sorted. I test with the same names and I get no error, albeit I'm not running other tests in the background at the same time. But even with parallel tests I can't see how another test is affecting this one. I look at the error message in the $OUTPUT list and the list is sorted. This failure doesn't happen often, but I seen it on both the reverse and normal alphabetical list. Is it somehow possible we have a bug in pulpcore, a race condition that breaks the ordering maybe having to do with paginating the query?

@mdellweg
Copy link
Member

I can't figure out why the query_params test is failing. The output looks sorted. I test with the same names and I get no error, albeit I'm not running other tests in the background at the same time. But even with parallel tests I can't see how another test is affecting this one. I look at the error message in the $OUTPUT list and the list is sorted. This failure doesn't happen often, but I seen it on both the reverse and normal alphabetical list. Is it somehow possible we have a bug in pulpcore, a race condition that breaks the ordering maybe having to do with paginating the query?

Is it a good idea to test whether pulpcore sorts properly in the first place?
But to get out of trouble here, we should filter the repositories to list sorted by a common criterium that is unique to this test. A prefix in the name, or something in the description would work. Or we can scope the whole test to a trowaway domain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants