Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-3709

Return the proper exit code for the manual rake tasks to upgrade from 2.6 to 2.7

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • None
    • System
    • None
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started

      msorianod wants to run the following command in bash to be able to upgrade from 2.6 to 2.7

      bundle exec rake boot openshift:deploy MASTER_ACCESS_TOKEN="${MASTER_ACCESS_TOKEN}"
      && bundle exec rake services:create_backend_apis services:update_metric_owners
      proxy:update_proxy_rule_owners
      

      But he needs each one of those tasks to return the proper exit status code.
      When it works, The previous code as a whole it is expected to return a bash exit code of 0. And we need to be careful because for services:create_backend_apis we are allowing it to fail silently (using create instead of create!) and even if we used a bang method, the raise does not return the expected status code. Apisonator solved this problem by this way.

      How the status codes for bash and tasks work is not entirely intuitive and I've been told that hramihaj has had problems in the past with this so maybe he knows better than most of us.

              Unassigned Unassigned
              mnoyabon Marta Noya (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: