Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add generic checks for whether a full sync
should be forced to the repo controller. closes #1983
- Loading branch information
Showing
9 changed files
with
397 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
======================= | ||
Pulp 2.11 Release Notes | ||
======================= | ||
|
||
Pulp 2.11.0 | ||
=========== | ||
|
||
New Features | ||
------------ | ||
|
||
* For RPM content, a full sync will be forced if the sync configuration has been changed or content | ||
has been removed since the last sync. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
server/pulp/server/db/migrations/0025_importer_schema_change.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from pulp.common import dateutils | ||
from pulp.server.db.connection import get_collection | ||
|
||
|
||
def migrate(*args, **kwargs): | ||
""" | ||
Add last_updated and last_override_config to the importer collection. | ||
""" | ||
updated_key = 'last_updated' | ||
config_key = 'last_override_config' | ||
collection = get_collection('repo_importers') | ||
for importer in collection.find(): | ||
if config_key not in importer.keys(): | ||
importer[config_key] = {} | ||
|
||
if updated_key in importer.keys(): | ||
continue | ||
elif 'last_sync' in importer.keys(): | ||
importer[updated_key] = dateutils.parse_iso8601_datetime(importer['last_sync']) | ||
else: | ||
importer[updated_key] = dateutils.now_utc_datetime_with_tzinfo() | ||
|
||
collection.save(importer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.