Project

Profile

Help

Issue #1847

last_unit_added is not added in mongo repo collection records

Added by ipanova@redhat.com over 4 years ago. Updated over 1 year ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
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 - DUPLICATE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 0a1c14ee View on GitHub
Added by bizhang almost 4 years ago

Update last_unit_added when unit is imported to repo.

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

Revision 0a1c14ee View on GitHub
Added by bizhang almost 4 years ago

Update last_unit_added when unit is imported to repo.

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

History

#1 Updated by ipanova@redhat.com over 4 years ago

  • Project changed from RPM Support to Pulp
  • Version set to 2.8.0

#2 Updated by ipanova@redhat.com over 4 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

#3 Updated by bmbouter over 4 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

#4 Updated by mhrivnak over 4 years ago

  • Triaged changed from No to Yes

#5 Updated by ipanova@redhat.com over 4 years ago

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

#6 Updated by ipanova@redhat.com over 4 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)

#7 Updated by ttereshc almost 4 years ago

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

#8 Updated by bizhang almost 4 years ago

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

#9 Updated by bizhang almost 4 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to bizhang

#10 Updated by bizhang almost 4 years ago

  • Status changed from ASSIGNED to POST

#12 Updated by bizhang almost 4 years ago

  • Status changed from POST to MODIFIED

#13 Updated by semyers almost 4 years ago

  • Platform Release set to 2.11.2

#14 Updated by semyers over 3 years ago

  • Status changed from MODIFIED to 5

#15 Updated by semyers over 3 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE

#16 Updated by bmbouter over 2 years ago

  • Sprint set to Sprint 13

#17 Updated by bmbouter over 2 years ago

  • Sprint/Milestone deleted (31)

#18 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF