Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1131954

Summary: Behavior around 'updated_at' changed for :repositories :show
Product: Red Hat Satellite Reporter: Matej Kollar <mkollar>
Component: APIAssignee: Bryan Kearney <bkearney>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: UnspecifiedCC: akarsale, bbuckingham, ggainey
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-13 19:55:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
reproducer none

Description Matej Kollar 2014-08-20 11:41:41 UTC
Created attachment 928769 [details]
reproducer

Description of problem:
When I run sync for the newly created repository, after sync is finished, I expect

    res = api_call(:repositories, :show, {'id' => repo['id']})
    Time.parse(res['last_sync']) >= Time.parse(res['updated_at'])

to be true, that means time of last sync to be after last modification.

How reproducible: always/deterministic


Steps to Reproduce:
  1. run attached reproducer

Actual results: result is false

Expected results: result is true

Additional info:
This is regression. Described behaviour was first observed/noticed with compose Satellite-6.0.4-RHEL-6-20140813.2-Satellite-x86_64.


Also, when I start sync, wait for it to finish, start sync again and again wait for it to finish, (it is commented out in reproducer after first sync), then it returns (as I would expect) true.

Comment 4 Bryan Kearney 2016-07-08 20:27:17 UTC
Per 6.3 planning, moving out non acked bugs to the backlog

Comment 6 Amit Karsale 2016-07-29 06:39:50 UTC
the response structure for individual repository API(katello/api/repositories/:id) has been changed now in satellite 6.1+ as compared to previous response(when the BZ was created). Currently the `last_sync` attribute is a hash object with inner attributes as follows:

"last_sync": {
  		"id": "3181854a-a97b-43dc-aa0b-461d50fe0da5",
  		"username": "admin",
  		"started_at": "2016-04-20 13:05:43 +0530",
  		"ended_at": "2016-04-20 13:47:31 +0530",
  		"state": "stopped",
  		"result": "success",
  		"progress": 1.0
  	}

Also the `started_at` and `ended_at` timestamp is greater than `updated_at` attribute. I guess there is nothing to do on this BZ now.
This bugzilla can be closed.