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

Fixes #13566 - Added TaskGroup support for errata regeneration #5729

Merged
merged 1 commit into from
May 25, 2016

Conversation

parthaa
Copy link
Contributor

@parthaa parthaa commented Jan 26, 2016

No description provided.

@parthaa
Copy link
Contributor Author

parthaa commented Jan 26, 2016

Needed for pulp 2.8

# }
#
#

Copy link
Member

Choose a reason for hiding this comment

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

Could probably drop this blank line and the one # line above it to combine the two.

@ehelms
Copy link
Member

ehelms commented Jan 26, 2016

Missing tests

@parthaa
Copy link
Contributor Author

parthaa commented Jan 26, 2016

Missing tests
@ehelms Will add that, but I actually had design questions on this. So @jlsherrill suggested combining logic in AbstractAsyncTaskGroup and AbstractAsyncTask . And add code that says "if group_id was specified do Task Group else if task id shows up do Task, else if pulp_task show so pulp_taskstuff else of pulp_taskgroup shows up do TaskGroup stuff". This will mean actions who extend AbstractAsyncTask dont have to be changed to AbstractAsyncTaskGroup (when pulp moves more tasks in that direction). What do you think .

@jlsherrill
Copy link
Member

yeah my goal was that a developer doesn't need to know which 'type' of async return output for a given call is made, abstract_async_task will just handle it.

@parthaa
Copy link
Contributor Author

parthaa commented Feb 2, 2016

needs -> Katello/runcible#167

@parthaa parthaa changed the title Fixes #13284 - Added TaskGroup support for errata regeneration Fixes #13566 - Added TaskGroup support for errata regeneration Feb 4, 2016
@ehelms
Copy link
Member

ehelms commented Mar 28, 2016

@parthaa should this go into 3.0?

@jlsherrill
Copy link
Member

@parthaa ????

@parthaa
Copy link
Contributor Author

parthaa commented May 3, 2016

yeah my goal was that a developer doesn't need to know which 'type' of async return output for a given call is made, abstract_async_task will just handle it.

@jlsherrill @ehelms I am not sure I like the idea of complicating the AbstractSyncTask. I find my changes easy enough to make if in the future pulp adds task groups support ..

@jlsherrill
Copy link
Member

seeing an error when syncing a repo:

undefined method `+' for {"group_id"=>"74dca57f-9d6a-4afa-985c-0f2e0796919d"}:Hash

---
- "/home/vagrant/git/katello/app/lib/actions/pulp/abstract_async_task_group.rb:63:in
  `external_task='"
- "/home/vagrant/.rvm/gems/ruby-2.2.4/gems/dynflow-0.8.10/lib/dynflow/action/polling.rb:98:in
  `poll_external_task_with_rescue'"
- "/home/vagrant/.rvm/gems/ruby-2.2.4/gems/dynflow-0.8.10/lib/dynflow/action/polling.rb:21:in
  `run'"
- "/home/vagrant/git/katello/app/lib/actions/pulp/abstract_async_task_group.rb:30:in
  `run'"
- "/home/vagrant/.rvm/gems/ruby-2.2.4/gems/dynflow-0.8.10/lib/dynflow/action.rb:506:in
  `block (3 levels) in execute_run'"
- "/home/vagrant/.rvm/gems/ruby-2.2.4/gems/dynflow-0.8.10/lib/dynflow/middleware/stack.rb:26:in
  `call'"
- "/home/vagrant/.rvm/gems/ruby-2.2.4/gems/dynflow-0.8.10/lib/dynflow/middleware/stack.rb:26:in
  `pass'"
- "/home/vagrant/.rvm/gems/ruby-2.2.4/gems/dynflow-0.8.10/lib/dynflow/middleware.rb:17:in
  `pass'"

@parthaa
Copy link
Contributor Author

parthaa commented May 25, 2016

seeing an error when syncing a repo:

@jlsherrill Fixed

@jlsherrill
Copy link
Member

jlsherrill commented May 25, 2016

Testing this, i can't seem to get errata applicability to work properly:

  1. Create a product 'zoo'
  2. Create a repo under the zoo product named 'zoo', pointed to https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/
  3. Install walrus-0.71-1.noarch from the above repo on a host
  4. Register a host and assign it to the zoo product
  5. Run 'subscription-manager refresh && yum repolist' on the client
  6. Sync the zoo repo

Results: No errata show up as applicable and the raw status looks like:

pulp_task_group:
  group_id: c626742e-f170-4f68-b685-4ce7c350fb8e
  accepted: 0
  finished: 0
  running: 0
  canceled: 0
  waiting: 0
  skipped: 0
  suspended: 0
  error: 0
  total: 0
poll_attempts:
  total: 1
  failed: 0

I confirmed the repo is 'bound' properly to the host.

@jlsherrill
Copy link
Member

Nevermind that issue is: https://pulp.plan.io/issues/1785

@jlsherrill
Copy link
Member

[test]

1 similar comment
@parthaa
Copy link
Contributor Author

parthaa commented May 25, 2016

[test]

@jlsherrill
Copy link
Member

ACK

@parthaa parthaa merged commit 17a5841 into Katello:master May 25, 2016
@parthaa parthaa deleted the taskgroup-changes branch May 25, 2016 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants