Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switches FileDistribution use Distribution #484

Conversation

bmbouter
Copy link
Member

pulpcore==3.12 introduces a new MasterModel named Distribution
designed to replace the BaseDistribution MasterModel. This PR switches
the FileDistribution to use Distribution. It also ships a migration
which moves the data from the BaseDistribution table to the
Distribution field.

Required PR: pulp/pulpcore#1198

closes #8387

@pulpbot
Copy link
Member

pulpbot commented Mar 26, 2021

Attached issue: https://pulp.plan.io/issues/8387

@bmbouter bmbouter force-pushed the switch-pulp-file-distribution-to-use-new-mastermodel branch 4 times, most recently from 11fc36f to 6c18c6c Compare March 29, 2021 20:36
to='core.Distribution'),
preserve_default=False,
),
migrations.RunPython(migrate_data_from_old_master_model_to_new_master_model),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should really have the reverse_code here. I can do that in a follow up pr if you prefer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mdellweg I'm not able to put it together due to time constraints, but I think it would be great if you'd be willing to post-merge. Like we talked about at the pulpcore meeting, doing it prior to the 3.12 release would be ideal because this migration is about to get replicated across almost all plugins very soon.

@bmbouter
Copy link
Member Author

FYI much of the substantive discussion happened on this other PR, but there were issues with github "locking" my previous branch strangely so now we're using this PR.

@bmbouter bmbouter force-pushed the switch-pulp-file-distribution-to-use-new-mastermodel branch 2 times, most recently from fa04dd3 to 5836a56 Compare March 30, 2021 19:50
@mdellweg
Copy link
Member

The tests are failing due to a mismatch of the pulp_file FilesystemExporter and the tests for it that live here.
A rebase should resolve this.

pulpcore==3.12 introduces a new MasterModel named `Distribution`
designed to replace the `BaseDistribution` MasterModel. This PR switches
the `FileDistribution` to use `Distribution`. It also ships a migration
which moves the data from the `BaseDistribution` table to the
`Distribution` field.

Required PR: pulp/pulpcore#1198

closes #8387
@bmbouter bmbouter force-pushed the switch-pulp-file-distribution-to-use-new-mastermodel branch from 5836a56 to 0173a20 Compare March 31, 2021 12:57
@bmbouter bmbouter merged commit be1c401 into pulp:master Apr 1, 2021
@bmbouter bmbouter deleted the switch-pulp-file-distribution-to-use-new-mastermodel branch April 1, 2021 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants