Hide Forgot
Description of problem: If the user creates a system template containing a few packages and then attempts to promote that template to the next environment, the promotion fails without error to the user. Note: in the scenario, nothing has been promoted to the next env prior to attempting to promote the template. Version-Release number of selected component (if applicable): git master How reproducible: always Steps to Reproduce: 1. Create a Provider/Product/Repo 2. Sync a Repo 3. Create a System Template containing a couple of packages (e.g. xterm, zip) 4. Create a Changeset and add the System Template to it 5. Attempt to promote the Changeset to the next environment (Note: in the above, nothing has been promoted to the next env, yet). Actual results: katello jobs shows the error below; however, the UI continues to indicate "Promoting...". [Worker(host:dhcp231-222.rdu.redhat.com pid:11191)] Starting job worker [Worker(host:dhcp231-222.rdu.redhat.com pid:11191)] Changeset#promote_content failed with ActiveRecord::StatementInvalid: PGError: ERROR: operator does not exist: character varying = integer LINE 1: ...ROM "repositories" WHERE "repositories"."pulp_id" = 1 LIMIT ... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. : SELECT "repositories".* FROM "repositories" WHERE "repositories"."pulp_id" = 1 LIMIT 1 - 0 failed attempts [Worker(host:dhcp231-222.rdu.redhat.com pid:11191)] PERMANENTLY removing Changeset#promote_content because of 1 consecutive failures. [Worker(host:dhcp231-222.rdu.redhat.com pid:11191)] 1 jobs processed at 0.4514 j/s, 1 failed ... Expected results: Should the promotion succeed in the above case? e.g. Promoting package, repo and product? Or should it fail and give the user a meaningful error? Additional info:
We most likely forgot to change this part of code after Repo AR was introduced. AR repo id was used there to search by pulp's repo id. Products the packages belong to are promoted automatically in situations such as described in comment 1. This is how promotion of packages in templates differs from promotion of packages stored directly in a changeset.
QA Verified, was able to promote a system template containing only packages.