Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Embedded Ansible Plays in the Job UI (v2/rebased with master) #19247

Merged

Commits on Sep 3, 2019

  1. [EmbeddedAnsible] Add AutomationManager::Job#update_plays

    Adds a method for collecting the plays for a given playbook run,
    itemizing them and determining the elapsed time for each.  Very similar
    to the code found in the `manageiq-providers-ansible_tower` code:
    
    https://github.com/ManageIQ/manageiq-providers-ansible_tower/blob/88aa135c/app/models/manageiq/providers/ansible_tower/shared/automation_manager/job.rb#L117-L144
    
    The difference here is that the code that fetches the play events is
    using an wrapper model class around the event data.  By contrast, the
    code here is working with raw hashes instead, though most of the keys
    do end up aligning with the method names from the tower code since the
    wrapper models are `HashModel` objects.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1741883
    NickLaMuro committed Sep 3, 2019
    Configuration menu
    Copy the full SHA
    7702e4e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e964923 View commit details
    Browse the repository at this point in the history
  3. Cleanup update_plays method

    - Minor refactor to make the finish_time setting a little clearer from a
      readbility perspective
    - Add a spec to demonstrate that non-play events are skipped
    - Modify the times in the spec to be much farther apart and use
      Timecop.freeze to avoid potential time-based sproadic test failures.
    - Some rubocops
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1741883
    Fryguy authored and NickLaMuro committed Sep 3, 2019
    Configuration menu
    Copy the full SHA
    3d6bcf8 View commit details
    Browse the repository at this point in the history