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

[EmbeddedAnsible] Fix job_plays for API #19320

Conversation

NickLaMuro
Copy link
Member

@NickLaMuro NickLaMuro commented Sep 20, 2019

The Service UI makes use of the API to fetch both .stdout and .job_plays together in a single call. Without this definition, .job_plays is not recognized as a valid attribute to fetch, and the following error is returned from the API call by the ServiceUI:

{
  "error": {
    "kind":"bad_request",
    "message":"Invalid attributes specified: job_plays",
    "klass":"Api::BadRequestError"
  }
}

This fixes that error, though a follow up is most likely going to be necessary in manageiq-ui-service since it seems like they are striping out the html data we are sending them, so the formatting looks like garbage...

Screen Shot 2019-09-20 at 2 51 17 PM

(Note: In the above screenshot, the "Plays" is zero, but that is because I am using an older version of the appliance where the job_plays attribute wasn't implemented. That should be fixed in the latest release.)

Links

The Service UI makes use of the API to fetch both `.stdout` and
`.job_plays` together in a single call.  Without this definition,
`.job_plays` is not recognized as a valid attribute to fetch, and the
following error is returned from the API call by the ServiceUI:

    {
      "error": {
        "kind":"bad_request",
        "message":"Invalid attributes specified: job_plays",
        "klass":"Api::BadRequestError"
      }
    }

This fixes that error.

Partially fixes https://bugzilla.redhat.com/show_bug.cgi?id=1753721
@NickLaMuro
Copy link
Member Author

@miq-bot add_label ivanchuk/yes, bug

@NickLaMuro
Copy link
Member Author

@miq-bot add_label embedded ansible

@miq-bot
Copy link
Member

miq-bot commented Sep 20, 2019

Checked commit NickLaMuro@c299766 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 🍰

@Fryguy Fryguy merged commit 06e9223 into ManageIQ:master Sep 20, 2019
@Fryguy Fryguy added this to the Sprint 121 Ending Sep 30, 2019 milestone Sep 20, 2019
@Fryguy Fryguy self-assigned this Sep 20, 2019
simaishi pushed a commit that referenced this pull request Sep 23, 2019
…rtual_has_many_job_plays

[EmbeddedAnsible] Fix job_plays for API

(cherry picked from commit 06e9223)

https://bugzilla.redhat.com/show_bug.cgi?id=1753721
@simaishi
Copy link
Contributor

Ivanchuk backport details:

$ git log -1
commit b75d64dfeacb06c86caa313adfa3dc78bfcec8b3
Author: Jason Frey <[email protected]>
Date:   Fri Sep 20 17:23:54 2019 -0400

    Merge pull request #19320 from NickLaMuro/embedded_ansible_job_fix_virtual_has_many_job_plays
    
    [EmbeddedAnsible] Fix job_plays for API
    
    (cherry picked from commit 06e92231e874c772c8dabe786eeeb387e2c744c5)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1753721

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants