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
Adjust dispatch calls to core>=3.15 interface #659
Conversation
fixes #9483
2a55279
to
584a411
Compare
Attached issue: https://pulp.plan.io/issues/9483 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -267,7 +267,7 @@ def sync(self, request, pk): | |||
|
|||
result = dispatch( | |||
sync_func, | |||
[repository, remote], | |||
exclusive_resources=[repository, remote], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remote can be among shared_resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I drafted this to be the minimal change to unbreak master, but i can add shared_resources if desired. Not sure if it were a feature though.
@@ -401,7 +401,7 @@ def create(self, request): | |||
|
|||
config, repos = self._process_config(config) | |||
|
|||
async_result = dispatch(copy_content, repos, args=[config], kwargs={}) | |||
async_result = dispatch(copy_content, exclusive_resources=repos, args=[config], kwargs={}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this is a content copy operation, the source repo can be among shared_resources, _process_config
should be updated so it returns 2 lists of repos.
fixes # 9483
Maybe we can declare some of the resources shared. LMK if you want to see it in this PR.