Project

General

Profile

Bug #28777

Products-API has no result for sync_summary

Added by Markus Bucher 2 months ago. Updated 29 days ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
Repositories
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

For some reason calling sync_summary on a product gives a result (when using rails-console) but is always empty when called by the API-controller.
The reason is in last_repo_sync_task_group, where the Time format used to find the Tasks differs between rails-console and rails-controller:

OK (rails-console):

Katello::Product.find(1).sync_summary
# => { 'warning' => 2, 'success' => 1 }
Katello::Product.find(1).last_repo_sync_task.started_at
# => 2020-01-15 09:49:44 UTC

NOK (added log in Prodcts API-Controller):

@product.sync_summary
# => {}
@product.last_repo_sync_task.started_at
# => 2020-01-15 10:49:44 +0100

The where-statement that is actually used to get the tasks does not return anything in the latter case.

Associated revisions

Revision ba65d4c1 (diff)
Added by Markus Bucher 2 months ago

Fixes #28777 - sync_summary no result in API

History

#1 Updated by The Foreman Bot 2 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/8522 added

#2 Updated by The Foreman Bot 2 months ago

  • Fixed in Releases Katello 3.16.0 added

#3 Updated by Markus Bucher 2 months ago

  • Status changed from Ready For Testing to Closed

#4 Updated by Samir Jha 2 months ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.15.0
  • Fixed in Releases Katello 3.15.0 added
  • Fixed in Releases deleted (Katello 3.16.0)

#5 Updated by Jonathon Turel 29 days ago

  • Category set to Repositories

Also available in: Atom PDF