Project

Profile

Help

Issue #1847

closed

last_unit_added is not added in mongo repo collection records

Added by ipanova@redhat.com over 8 years ago. Updated over 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
2.8.0
Platform Release:
2.11.2
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 13
Quarter:

Description

If some units got removed from the repo, the last_unit_removed will be updated in the mongo data, but if a unit was added 'last_unit_added' will be still missing

> db.repos.find()
{ "_id" : ObjectId("5710f3da45ef48069a4dd985"), "_ns" : "repos", "content_unit_counts" : { "rpm" : 2 }, "last_unit_removed" : ISODate("2016-04-15T14:09:12.992Z"), "notes" : { "_repo-type" : "rpm-repo" }, "repo_id" : "repo", "scratchpad" : {  } }

Related issues

Has duplicate Pulp - Issue #2499: 'Last Unit Added' attribute not updatedCLOSED - DUPLICATEActions
Actions #1

Updated by ipanova@redhat.com over 8 years ago

  • Project changed from RPM Support to Pulp
  • Version set to 2.8.0
Actions #2

Updated by ipanova@redhat.com over 8 years ago

  • Blocks Story #1724: Publish should be a no-op if no units and no settings have changed since the last successful publish added
Actions #3

Updated by bmbouter over 8 years ago

Did last_unit_added exist before?

If you have a datetime and want to find if a unit was created or updated since then you could query on the RepositoryContentUnit model updated field[0]:

RepositoryContentUnit.objects.filter(repo_id=repo_id, updated_gt=the_timestamp)

You could use count() to determine how many there were without actually pulling the documents into memory.

[0]: https://github.com/pulp/pulp/blob/1503f2772aee59d30621b58582ea997feb28fb41/server/pulp/server/db/model/__init__.py#L199-L208

Actions #4

Updated by mhrivnak over 8 years ago

  • Triaged changed from No to Yes
Actions #5

Updated by ipanova@redhat.com over 8 years ago

With bmbouter suggestion i managed to find the other way of implementation, so this issue is not a blocker for #1724 anymore

Actions #6

Updated by ipanova@redhat.com over 8 years ago

  • Blocks deleted (Story #1724: Publish should be a no-op if no units and no settings have changed since the last successful publish)
Actions #7

Updated by ttereshc almost 8 years ago

  • Has duplicate Issue #2499: 'Last Unit Added' attribute not updated added
Actions #8

Updated by bizhang almost 8 years ago

  • Sprint/Milestone set to 31
  • Severity changed from 2. Medium to 3. High
Actions #9

Updated by bizhang almost 8 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to bizhang
Actions #10

Updated by bizhang almost 8 years ago

  • Status changed from ASSIGNED to POST

Added by bizhang almost 8 years ago

Revision 0a1c14ee | View on GitHub

Update last_unit_added when unit is imported to repo.

closes #1847 https://pulp.plan.io/issues/1847

Added by bizhang almost 8 years ago

Revision 0a1c14ee | View on GitHub

Update last_unit_added when unit is imported to repo.

closes #1847 https://pulp.plan.io/issues/1847

Actions #12

Updated by bizhang almost 8 years ago

  • Status changed from POST to MODIFIED
Actions #13

Updated by semyers almost 8 years ago

  • Platform Release set to 2.11.2
Actions #14

Updated by semyers almost 8 years ago

  • Status changed from MODIFIED to 5
Actions #15

Updated by semyers almost 8 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #16

Updated by bmbouter over 6 years ago

  • Sprint set to Sprint 13
Actions #17

Updated by bmbouter over 6 years ago

  • Sprint/Milestone deleted (31)
Actions #18

Updated by bmbouter over 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF