Issue #1847
closedlast_unit_added is not added in mongo repo collection records
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
Updated by ipanova@redhat.com over 8 years ago
- Project changed from RPM Support to Pulp
- Version set to 2.8.0
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
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.
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
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)
Updated by ttereshc almost 8 years ago
- Has duplicate Issue #2499: 'Last Unit Added' attribute not updated added
Updated by bizhang almost 8 years ago
- Sprint/Milestone set to 31
- Severity changed from 2. Medium to 3. High
Updated by bizhang almost 8 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to bizhang
Updated by bizhang almost 8 years ago
- Status changed from ASSIGNED to POST
Updated by pthomas@redhat.com almost 8 years ago
pulp smash issue
https://github.com/PulpQE/pulp-smash/issues/461
Added by bizhang almost 8 years ago
Added by bizhang almost 8 years ago
Revision 0a1c14ee | View on GitHub
Update last_unit_added when unit is imported to repo.
Updated by bizhang almost 8 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulp|0a1c14ee89ea2418fe59246c5c9ad91e0808df52.
Updated by semyers almost 8 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
Update last_unit_added when unit is imported to repo.
closes #1847 https://pulp.plan.io/issues/1847