@jsherril, I'm not able to reproduce it.
I think you are missing a step of creating a repo version, without it publish fails.
If you create an empty repo version and then publish it, empty PULP_MANIFEST is available.
See my steps below.
# create a repo
http POST http://localhost:8000/pulp/api/v3/repositories/ name=foo
export REPO_HREF=$(http :8000/pulp/api/v3/repositories/ | jq -r '.results[] | select(.name == "foo") | ._href')
# create a publisher
http POST http://localhost:8000/pulp/api/v3/publishers/file/file/ name=bar
export PUBLISHER_HREF=$(http :8000/pulp/api/v3/publishers/file/file/ | jq -r '.results[] | select(.name == "bar") | ._href')
# attempt to publish with no repo version
http POST ':8000'$PUBLISHER_HREF'publish/' repository=$REPO_HREF
HTTP/1.1 400 Bad Request
Allow: POST, OPTIONS
Content-Length: 71
Content-Type: application/json
Date: Wed, 27 Feb 2019 11:59:47 GMT
Server: WSGIServer/0.2 CPython/3.6.8
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN
{
"non_field_errors": [
"Repository has no version available to publish"
]
}
# create an empty repo version
http POST ':8000'$REPO_HREF'versions/'
# try to publish again
http POST ':8000'$PUBLISHER_HREF'publish/' repository=$REPO_HREF
export PUBLICATION_HREF=$(http :8000/pulp/api/v3/publications/ | jq -r --arg PUBLISHER_HREF "$PUBLISHER_HREF" '.results[] | select(.publisher==$PUBLISHER_HREF) | ._href')
# create a distribution
http POST http://localhost:8000/pulp/api/v3/distributions/ name='baz' base_path='foo' publication=$PUBLICATION_HREF
# PULP_MANIFEST is available and empty
http GET http://localhost:8080/pulp/content/foo/PULP_MANIFEST
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 0
Content-Type: application/octet-stream
Date: Wed, 27 Feb 2019 12:01:52 GMT
Last-Modified: Wed, 27 Feb 2019 12:00:45 GMT
Server: Python/3.6 aiohttp/3.5.4
I don't recall any recent changes in that area but, FWIW, I'm at the latest commit of the master branch of pulp, pulpcore-plugin and pulp_file:
- pulp 45f5ee314a2eb0aea22f9e5f1c2968512ef52dfe
- pulpcore-plugin ea03cd9b0977fafbe94b370e50e6ea22a8d9e9c0
- pulp_file b710a18c885f4e209a3a993ba10f168027bd3337