Hide Forgot
Description of problem: Version-Release number of selected component (if applicable): katello-0.1.125-1.git.3.cee0c63.el6.x86_64 How reproducible: Steps to Reproduce: 1. Create a custom provider and product using API or CLI 2. Promote the empty product with API or CLI 3. Actual results: In the UI, the product does not allow adding more repos (expanding the product does nothing, no "Add Repository" button). The product does not show up in the next environment on the Promotions page, but on the Templates page, you can still add the product (as if it's been promoted) Expected results: The API should throw an error that products with no repos cannot be promoted. Additional info:
Right now it promotes. kk changeset promote --name empty --environment testing Changeset [ empty ] promoted Taking.
765888 - Error during promotion
I verified this on latest katello build: katello-glue-pulp-0.1.155-1.el6.noarch katello-configure-0.1.48-1.el6.noarch katello-trusted-ssl-cert-1.0-1.noarch katello-cli-common-0.1.31-1.el6.noarch katello-glue-foreman-0.1.155-1.el6.noarch katello-common-0.1.155-1.el6.noarch katello-httpd-ssl-key-pair-1.0-1.noarch katello-0.1.155-1.el6.noarch katello-qpid-broker-key-pair-1.0-1.noarch katello-repos-0.1.4-1.el6.noarch katello-cli-0.1.31-1.el6.noarch katello-glue-candlepin-0.1.155-1.el6.noarch katello-all-0.1.155-1.el6.noarch katello-certs-tools-1.0.1-1.el6.noarch I can still promote a empty product ( product with no repos ) I created a provider 'rhel' and created a product 'myproduct' and promoted it to 'test' env and it was promoted successfully. However a proper error should be raised "Product with no repo can not be promoted" ---- katello> product create --name myproduct --org ACME_Corporation --provider rhel Successfully created product [ myproduct ] katello> changeset create --org ACME_Corporation --environment test --name empty Successfully created changeset [ empty ] for environment [ test ] katello> changeset update --org ACME_Corporation --environment test --name empty --add_product myproduct Successfully updated changeset [ empty ] katello> changeset promote --name empty --environment test --org ACME_Corporation Changeset [ empty ] promoted ---
How about: [lzap@lzapx src]$ kk changeset update --name empty --environment env --add_product empty_product Product 'empty_product' hasn't any repositories It is not possible to add empty product now. 4a7649b 760703 - promotion of empty products now not possible
Verified with following katello build: katello-0.1.192-1.el6.noarch Now while updating a changeset with empty product will raise a message as below: Product 'myproduct' hasn't any repositories ----- katello> provider create --name rhel --org ACME_Corporation Successfully created provider [ rhel ] katello> product create --name myproduct --org ACME_Corporation --provider rhel Successfully created product [ myproduct ] katello> changeset create --org ACME_Corporation --environment test --name empty Successfully created changeset [ empty ] for environment [ test ] katello> changeset update --org ACME_Corporation --environment test --name empty --add_product myproduct Product 'myproduct' hasn't any repositories ----