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

1012572: Check the upload type against the repo's content type #95

Merged
merged 1 commit into from Sep 30, 2013

Conversation

daviddavis
Copy link

Why are we checking the content type in the CLI and not the API?

  1. The content type is not being passed to the API. The content type is used to parse the upload's metadata which happens in the CLI and not API (we copied pulp's python code over to do the metadata parsing).
  2. It's better to do it before we upload the package than at the very end. If we were to pass the content type to the API, we probably wouldn't do it until import_into_repo which is the last call (after the package or module gets uploaded). This would mean the user would have to sit through actually uploading the package before knowing it wasn't valid.

Why are we checking the content type in the CLI and not the API?

1. The content type is not being passed to the API. The content type is used to
parse the upload's metadata which happens in the CLI and not API (we copied
pulp's python code over to do the metadata parsing).
2. It's better to do it before we upload the package than at the very end. If
we were to pass the content type to the API, we probably wouldn't do it until
import_into_repo which is the last call (after the package or module gets
uploaded). This would mean the user would have to sit through actually
uploading the package before knowing it wasn't valid.
@bbuckingham
Copy link
Member

ACK

daviddavis pushed a commit that referenced this pull request Sep 30, 2013
1012572: Check the upload type against the repo's content type
@daviddavis daviddavis merged commit 0748b31 into Katello:master Sep 30, 2013
@daviddavis daviddavis deleted the temp/20130928134825 branch September 30, 2013 19:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants