This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code changes for pulpcore-3.13 compatibility.
enqueue_with_reservation() -> dispatch() BaseDistribution -> Distribution closes #8522 [nocoverage]
- Loading branch information
Showing
7 changed files
with
46 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Taught 2to3 migration about changes in task-dispatching and Distributions. | ||
|
||
**NOTE**: To minimize any potential impact from this change, please make sure | ||
you've done a 2to3 migration after any Pulp2 changes to distributors **before** | ||
upgrading to this release. |
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
29 changes: 29 additions & 0 deletions
29
pulp_2to3_migration/app/migrations/0029_distribution_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,29 @@ | ||
# Generated by Django 2.2.24 on 2021-06-07 15:14 | ||
|
||
import logging | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
_logger = logging.getLogger(__name__) | ||
|
||
def unset_distribution_field(apps, schema_editor): | ||
Pulp2Distributor = apps.get_model('pulp_2to3_migration', 'pulp2distributor') | ||
nrows = Pulp2Distributor.objects.update(pulp3_distribution=None, is_migrated=False) | ||
_logger.debug("Updated {} Pulp2Distributor rows.".format(nrows)) | ||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('pulp_2to3_migration', '0028_create_missing_indices'), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython( | ||
code=unset_distribution_field, | ||
), | ||
migrations.AlterField( | ||
model_name='pulp2distributor', | ||
name='pulp3_distribution', | ||
field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, to='core.Distribution'), | ||
), | ||
] |
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
pulpcore>=3.6 | ||
pulpcore>=3.12 | ||
mongoengine | ||
semantic_version | ||
jsonschema>=3.0 |