-
Notifications
You must be signed in to change notification settings - Fork 124
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
Replace enqueue_with_reservation with dispatch for pulpcore 3.14.0 compat #821
Conversation
a4586b3
to
2cbc382
Compare
@alikins you need to tell the CI to use the proper versions of pulpcore https://github.com/ansible/galaxy_ng/blob/master/.travis/before_install.sh#L73 and https://github.com/ansible/galaxy_ng/blob/master/.travis/before_install.sh#L103 |
2cbc382
to
351af65
Compare
pulpcore 3.14 replaces the 'rq' based tasking system with 'pulpcore-worker' So no longer need a service for 'resource-manager' on the docker-compose dev env tooling. Removed it from Makefile, the docker-compose.yml for each profile, and the 'start-resource-manager' invoked by the 'resource-manager' docker container. Required PR: ansible#821 No-Issue
See https://github.com/pulp/pulpcore/blob/master/docs/components.rst#distributed-tasking-system-tech-preview Remove use if pulpcore 'resource-manager' for pulp 3.14 pulpcore 3.14 replaces the 'rq' based tasking system with 'pulpcore-worker' So no longer need a service for 'resource-manager' on the docker-compose dev env tooling. Removed it from Makefile, the docker-compose.yml for each profile, and the 'start-resource-manager' invoked by the 'resource-manager' docker container. Required PR: ansible#821 No-Issue
Required PR: ansible#821 No-Issue
351af65
to
7c5626b
Compare
See https://github.com/pulp/pulpcore/blob/master/docs/components.rst#distributed-tasking-system-tech-preview Remove use if pulpcore 'resource-manager' for pulp 3.14 pulpcore 3.14 replaces the 'rq' based tasking system with 'pulpcore-worker' So no longer need a service for 'resource-manager' on the docker-compose dev env tooling. Removed it from Makefile, the docker-compose.yml for each profile, and the 'start-resource-manager' invoked by the 'resource-manager' docker container. Required PR: ansible#821 No-Issue
Required PR: ansible#821 Required PR: ansible#824 Issue: AAH-708
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.
The upgrade of dependencies made migration to break
File "/usr/local/lib/python3.6/site-packages/galaxy_ng/app/migrations/0017_populate_repos_and_remotes.py", line 104, in populate_initial_repos
"pulp_type": "ansible.ansible"
we need a fix for that migration as part of this PR to make the CI to pass.
__fake__.DoesNotExist: AnsibleDistribution matching query does not exist.
hmm, interesting. Did not expect that. AnsibleDistribution no longer exists? |
@alikins the entity exists, but the SQL query made on the migration is failing for some reason. Did we changed something on |
See https://github.com/pulp/pulpcore/blob/master/docs/components.rst#distributed-tasking-system-tech-preview Remove use if pulpcore 'resource-manager' for pulp 3.14 pulpcore 3.14 replaces the 'rq' based tasking system with 'pulpcore-worker' So no longer need a service for 'resource-manager' on the docker-compose dev env tooling. Removed it from Makefile, the docker-compose.yml for each profile, and the 'start-resource-manager' invoked by the 'resource-manager' docker container. Required PR: ansible#821 No-Issue
Primary difference is that enqueue_with_reservation() returns an 'rq' job, and 'rq' support is being removed in pulpcore. The new 'dispatch()' returns a pulpcore.plugin.models.Task object. dispatch() also no longer supports the 'options' arg. pulpcore 3.13 removes 'enqueue_with_reservation' https://docs.pulpproject.org/pulpcore/changes.html#id96 pulpcore 3.12.0 deprecated 'enqueue_with_reservation' https://docs.pulpproject.org/pulpcore/changes.html#id152 See https://docs.pulpproject.org/pulpcore/plugins/api-reference/tasking.html#pulpcore.plugin.tasking.dispatch for docs on dispatch(). More explaination of the diff between enqueue_with_reservation() and dispatch() can be seen at: pulp/pulpcore@753e4dd and https://pulp.plan.io/issues/8496 Issue: AAH-706
See https://github.com/pulp/pulpcore/blob/master/docs/components.rst#distributed-tasking-system-tech-preview Remove use if pulpcore 'resource-manager' for pulp 3.14 pulpcore 3.14 replaces the 'rq' based tasking system with 'pulpcore-worker' So no longer need a service for 'resource-manager' on the docker-compose dev env tooling. Removed it from Makefile, the docker-compose.yml for each profile, and the 'start-resource-manager' invoked by the 'resource-manager' docker container. Required PR: ansible#821 No-Issue
Not sure why, but replacing the Models.objects with one using the 'db_alias', AnsibleDistribution.objects.get() and get_or_create() fail with invalid query which raises a DoesNotExist from a get_or_create() Then it seems like something in the error handling is walking over the models and triggering some recursion storm that seems to get stuck in django lifecycle land. For more detail, see: https://issues.redhat.com/browse/AAH-706?focusedCommentId=16423461&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16423461 Issue: AAH-706
Issue: AAH-706
1b3898a
to
aaf642d
Compare
Issue: AAH-706
Issue: AAH-706
'enqueue_with_reservation' has been replaced with 'dispatch' in pulpcore 3.14. So stop mocking it. Issue: AAH-706
Based on pulp/pulp_ansible@946c356 some of the generated API names have changed. Update to use the (correct?) new name. Issues: AAH-706
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
Waiting to hear from @cutwater related to the appSRE failure.
See https://github.com/pulp/pulpcore/blob/master/docs/components.rst#distributed-tasking-system-tech-preview Remove use if pulpcore 'resource-manager' for pulp 3.14 pulpcore 3.14 replaces the 'rq' based tasking system with 'pulpcore-worker' So no longer need a service for 'resource-manager' on the docker-compose dev env tooling. Removed it from Makefile, the docker-compose.yml for each profile, and the 'start-resource-manager' invoked by the 'resource-manager' docker container. Required PR: #821 No-Issue
Required PR: ansible#821 No-Issue
Required PR: #821 No-Issue
….14.0 compat (ansible#821)" This reverts commit c491613.
….14.0 compat (ansible#821)" This reverts commit c491613.
Replace enqueue_with_reservation() with dispatch()
Primary difference is that enqueue_with_reservation()
returns an 'rq' job, and 'rq' support is being removed
in pulpcore.
The new 'dispatch()' returns a pulpcore.plugin.models.Task
object. dispatch() also no longer supports the 'options' arg.
pulpcore 3.13 removes 'enqueue_with_reservation'
https://docs.pulpproject.org/pulpcore/changes.html#id96
pulpcore 3.12.0 deprecated 'enqueue_with_reservation'
https://docs.pulpproject.org/pulpcore/changes.html#id152
See https://docs.pulpproject.org/pulpcore/plugins/api-reference/tasking.html#pulpcore.plugin.tasking.dispatch
for docs on dispatch().
More explanation of the diff between enqueue_with_reservation()
and dispatch() can be seen at:
pulp/pulpcore@753e4dd
and https://pulp.plan.io/issues/8496
Issue: AAH-706