Skip to content
This repository has been archived by the owner on Oct 28, 2019. It is now read-only.

Replace Distribution with other objects #97

Merged
merged 1 commit into from
May 10, 2019

Conversation

bmbouter
Copy link
Member

@bmbouter bmbouter commented May 9, 2019

Model Changes

The Distribution model was replaced with the
RepositoryVersionDistribution and PublicationDistribution models. These
are both abstract models and are meant to be subclassed further.

Serializer Changes

The DistributionSerializer is removed and now
BaseDistributionSerializer, PublicationDistributionSerializer, and
RepositoryVersionDistributionSerializer are here. These can also be
further subclassed by plugin writers.

ViewSet Changes

DistributionViewset is now called BaseDistributionViewSet. No other
viewsets are provided.

Docs Changes

The release notes are updated to indicate the breaking changes.

Required PR: pulp/pulpcore#124
Required PR: pulp/pulp_file#219

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

bmbouter pushed a commit to bmbouter/pulpcore that referenced this pull request May 9, 2019
The Distribution contained options which should not be mixed.
Specifically the repository and repository_version options go together
and the publication goes by itself.

This PR splits that object into two new objects
RepositoryVersionDistribution and PublicationDistribution. Each receives
a viewset, serializer, and filterset to match. Each also is a full
Detail model and can be used by plugins without additional code from
them.

Required PR: pulp/pulpcore-plugin#97
Required PR: pulp/pulp_file#219

https://pulp.plan.io/issues/4785
closes pulp#4785
bmbouter pushed a commit to bmbouter/pulpcore that referenced this pull request May 9, 2019
The Distribution contained options which should not be mixed.
Specifically the repository and repository_version options go together
and the publication goes by itself.

This PR splits that object into two new objects
RepositoryVersionDistribution and PublicationDistribution.

Required PR: pulp/pulpcore-plugin#97
Required PR: pulp/pulp_file#219

https://pulp.plan.io/issues/4785
closes pulp#4785
@bmbouter bmbouter changed the title Remove Distribution from plugin API Replace Distribution with other objects May 9, 2019
bmbouter pushed a commit to bmbouter/pulpcore that referenced this pull request May 9, 2019
The Distribution contained options which should not be mixed.
Specifically the repository and repository_version options go together
and the publication goes by itself.

This PR splits that object into two new objects
RepositoryVersionDistribution and PublicationDistribution. The two
models are not detail objects, and require the plugin writer to declare
a Distribution detail object. It was already this way before this PR.

Required PR: pulp/pulpcore-plugin#97
Required PR: pulp/pulp_file#219

https://pulp.plan.io/issues/4785
closes pulp#4785
@bmbouter bmbouter force-pushed the split-distribution branch 2 times, most recently from c7acccd to 1ffed2c Compare May 9, 2019 20:08
bmbouter pushed a commit to bmbouter/pulpcore that referenced this pull request May 9, 2019
The Distribution contained options which should not be mixed.
Specifically the repository and repository_version options go together
and the publication goes by itself.

This PR splits that object into two new objects
RepositoryVersionDistribution and PublicationDistribution. The two
models are not detail objects, and require the plugin writer to declare
a Distribution detail object. It was already this way before this PR.

This also adds a release note about the breaking changes that come with
the switch to Master/Detail.

Required PR: pulp/pulpcore-plugin#97
Required PR: pulp/pulp_file#219

https://pulp.plan.io/issues/4785
closes pulp#4785
bmbouter pushed a commit to bmbouter/pulpcore that referenced this pull request May 9, 2019
The Distribution contained options which should not be mixed.
Specifically the repository and repository_version options go together
and the publication goes by itself.

This PR splits that object into two new objects
RepositoryVersionDistribution and PublicationDistribution. The two
models are not detail objects, and require the plugin writer to declare
a Distribution detail object. It was already this way before this PR.

This also adds a release note about the breaking changes that come with
the switch to Master/Detail.

Required PR: pulp/pulpcore-plugin#97
Required PR: pulp/pulp_file#219

https://pulp.plan.io/issues/4785
closes pulp#4785
bmbouter pushed a commit to bmbouter/pulpcore that referenced this pull request May 9, 2019
The Distribution contained options which should not be mixed.
Specifically the repository and repository_version options go together
and the publication goes by itself.

This PR splits that object into two new objects
RepositoryVersionDistribution and PublicationDistribution. The two
models are not detail objects, and require the plugin writer to declare
a Distribution detail object. It was already this way before this PR.

This also adds a release note about the breaking changes that come with
the switch to Master/Detail.

Required PR: pulp/pulpcore-plugin#97
Required PR: pulp/pulp_file#219

https://pulp.plan.io/issues/4785
closes pulp#4785
@codecov-io
Copy link

codecov-io commented May 9, 2019

Codecov Report

Merging #97 into master will decrease coverage by 0.59%.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #97     +/-   ##
======================================
- Coverage    42.6%   42%   -0.6%     
======================================
  Files          22    21      -1     
  Lines         730   719     -11     
======================================
- Hits          311   302      -9     
+ Misses        419   417      -2
Impacted Files Coverage Δ
pulpcore/plugin/models/__init__.py 100% <ø> (ø) ⬆️
pulpcore/plugin/viewsets.py 100% <ø> (ø) ⬆️
pulpcore/plugin/serializers.py 100% <ø> (ø) ⬆️
pulpcore/plugin/models/content.py

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0e41c9f...89d82e9. Read the comment docs.

bmbouter pushed a commit to bmbouter/pulpcore that referenced this pull request May 9, 2019
The Distribution contained options which should not be mixed.
Specifically the repository and repository_version options go together
and the publication goes by itself.

This PR splits that object into two new objects
RepositoryVersionDistribution and PublicationDistribution. The two
models are not detail objects, and require the plugin writer to declare
a Distribution detail object. It was already this way before this PR.

This also adds a release note about the breaking changes that come with
the switch to Master/Detail.

Required PR: pulp/pulpcore-plugin#97
Required PR: pulp/pulp_file#219

https://pulp.plan.io/issues/4785
closes pulp#4785
bmbouter pushed a commit to bmbouter/pulpcore that referenced this pull request May 9, 2019
The Distribution contained options which should not be mixed.
Specifically the repository and repository_version options go together
and the publication goes by itself.

This PR splits that object into two new objects
RepositoryVersionDistribution and PublicationDistribution. The two
models are not detail objects, and require the plugin writer to declare
a Distribution detail object. It was already this way before this PR.

This also adds a release note about the breaking changes that come with
the switch to Master/Detail.

Required PR: pulp/pulpcore-plugin#97
Required PR: pulp/pulp_file#219

https://pulp.plan.io/issues/4785
closes pulp#4785
Model Changes

The Distribution model was replaced with the
RepositoryVersionDistribution and PublicationDistribution models. These
are both abstract models and are meant to be subclassed further.

Serializer Changes

The DistributionSerializer is removed and now
BaseDistributionSerializer, PublicationDistributionSerializer, and
RepositoryVersionDistributionSerializer are here. These can also be
further subclassed by plugin writers.

ViewSet Changes

DistributionViewset is now called BaseDistributionViewSet. No other
viewsets are provided.

Docs Changes

The release notes are updated to indicate the breaking changes.

Required PR: pulp/pulpcore#124
Required PR: pulp/pulp_file#219

https://pulp.plan.io/issues/4785
closes #4785
@bmbouter bmbouter force-pushed the split-distribution branch from 1ffed2c to 89d82e9 Compare May 9, 2019 22:41
bmbouter pushed a commit to bmbouter/pulpcore that referenced this pull request May 10, 2019
The Distribution contained options which should not be mixed.
Specifically the repository and repository_version options go together
and the publication goes by itself.

This PR splits that object into two new objects
RepositoryVersionDistribution and PublicationDistribution. The two
models are not detail objects, and require the plugin writer to declare
a Distribution detail object. It was already this way before this PR.

This also adds a release note about the breaking changes that come with
the switch to Master/Detail.

Required PR: pulp/pulpcore-plugin#97
Required PR: pulp/pulp_file#219

https://pulp.plan.io/issues/4785
closes pulp#4785
@bmbouter bmbouter merged commit 87e9095 into pulp:master May 10, 2019
@bmbouter bmbouter deleted the split-distribution branch May 10, 2019 16:50
daviddavis pushed a commit to daviddavis/pulp_file that referenced this pull request May 14, 2019
The plugin API now uses PublicationDistribution which causes pulp_file
users to only receive the fields they can actually use.

Required PR: pulp/pulpcore#124
Required PR: pulp/pulpcore-plugin#97

https://pulp.plan.io/issues/4785
closes #4785
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants