Almost every entity in Pulp 3 has a unique name, except publications.
Even distributions, which really don’t need it since they already have a unique base_path that can absolutely function as a unique name as well.
One of the great advantages with pulp-cli is that I no longer need to parse any pulp_href from API answers, except that is, with respect to nameless distributions! See the following example of a complete sync workflow using pulp-deb-cli to illustrate the problem:
# Constants:
ENTITIES_NAME='test'
SIGNING_SERVICE_NAME='Pulp_QE'
# Test the API:
pulp status
# Create signing service:
curl -L https://github.com/pulp/pulp-fixtures/raw/master/common/GPG-PRIVATE-KEY-pulp-qe | gpg --import
echo "6EDF301256480B9B801EBA3D05A5E6DA269D9D98:6:" | gpg --import-ownertrust
pulpcore-manager add-signing-service --class 'deb:AptReleaseSigningService' "${SIGNING_SERVICE_NAME}" ~/devel/pulp_deb/pulp_deb/tests/functional/sign_deb_release.sh '6EDF301256480B9B801EBA3D05A5E6DA269D9D98'
# Some test case:
REMOTE_OPTIONS='--url=http://ftp.de.debian.org/debian/ --distribution=bullseye-backports --component=non-free --policy=on_demand'
# Sync workflow steps using CLI:
pulp deb remote create --name=${ENTITIES_NAME} ${REMOTE_OPTIONS}
pulp deb repository create --name=${ENTITIES_NAME} --remote=${ENTITIES_NAME}
pulp deb repository sync --name=${ENTITIES_NAME}
APT_PUBLICATION_HREF=$(pulp deb publication create --repository=${ENTITIES_NAME} --simple=True --structured=True --signing-service="${SIGNING_SERVICE_NAME}" | jq -r '.pulp_href')
VERBATIM_PUBLICATION_HREF=$(pulp deb publication --type=verbatim create --repository=${ENTITIES_NAME} | jq -r '.pulp_href')
pulp deb distribution create --name=${ENTITIES_NAME} --base-path=${ENTITIES_NAME} --publication=${APT_PUBLICATION_HREF}
pulp deb distribution create --name=${ENTITIES_NAME}_verbatim --base-path=${ENTITIES_NAME}_verbatim --publication=${VERBATIM_PUBLICATION_HREF}
This isn’t the only issue I have with how publications vs. distributions work in Pulp.
The reason there still isn’t any autodistribution feature for pulp_deb is because I can’t figure out how to handle empty distributions that don’t know what kind of publication they should use (why are empty distributions even a thing?).
Every other thing relating to publications and distributions feels awkward and upside down to me.
So I have a couple of questions:
- What is the design logic behind these two entities?
- Do others experience these design issues or is it just me? (The above pulp-cli-deb workflow definitely feels wrong to me).
- What if anything can/should be changed going forward?