Bug 1698184
| Summary: | Null Coalescing fields don't work as input Parameters | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | William Fitzgerald <wfitzger> | ||||||
| Component: | Automate | Assignee: | Lucy Fu <lufu> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Ganesh Hubale <ghubale> | ||||||
| Severity: | medium | Docs Contact: | Red Hat CloudForms Documentation <cloudforms-docs> | ||||||
| Priority: | medium | ||||||||
| Version: | 5.10.3 | CC: | cruffalo, dmetzger, ghubale, gmccullo, lufu, mkanoor, mshriver, obarenbo, simaishi, tfitzger | ||||||
| Target Milestone: | GA | ||||||||
| Target Release: | 5.11.0 | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | 5.11.0.21 | Doc Type: | If docs needed, set a value | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2019-12-12 13:36:21 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | Bug | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | CFME Core | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
Created attachment 1554338 [details]
export of domain for testing null coalescing problem
Import, Enable domain and run simulation for the 2 instances. If you tail/view the automation log you should see Fred and Barney as the correct values.
Created attachment 1554340 [details]
null coalescing schema setup
Ganesh,
I included a domain and instructions for your testing.
Bad : Invoking [inline] method [/null_coalescing/System/Request/null_col_fails] with inputs [{"arg1"=>"fred ||barney ||"}]
Good : Invoking [inline] method [/null_coalescing/System/Request/null_col_workaround] with inputs [{"arg1"=>"fred", "arg2"=>"barney"}]
Let me know if you need anything else
THanks
Billy
Hi Lucy, Please discuss with Madhu. Thanks, Tina *** Bug 1696220 has been marked as a duplicate of this bug. *** New commit detected on ManageIQ/manageiq-automation_engine/master: https://github.com/ManageIQ/manageiq-automation_engine/commit/d3c2f6dd60238ec1d917a7bd56dc399f0db695be commit d3c2f6dd60238ec1d917a7bd56dc399f0db695be Author: Lucy Fu <lufu> AuthorDate: Mon Jul 1 10:15:05 2019 -0400 Commit: Lucy Fu <lufu> CommitDate: Mon Jul 1 10:15:05 2019 -0400 Fix the issue with null coalescing fields as input parameters. https://bugzilla.redhat.com/show_bug.cgi?id=1698184 lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_method.rb | 2 +- lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_object.rb | 16 +- spec/miq_ae_method_spec.rb | 24 + 3 files changed, 32 insertions(+), 10 deletions(-) New commit detected on ManageIQ/manageiq-automation_engine/ivanchuk: https://github.com/ManageIQ/manageiq-automation_engine/commit/abc51bc36a668bd672eb061033b84d070011d122 commit abc51bc36a668bd672eb061033b84d070011d122 Author: Greg McCullough <gmccullo> AuthorDate: Wed Aug 21 12:01:25 2019 -0400 Commit: Greg McCullough <gmccullo> CommitDate: Wed Aug 21 12:01:25 2019 -0400 Merge pull request #334 from lfu/null_coalescing_1698184 Fix the issue with null coalescing fields as input parameters. (cherry picked from commit 69b58ee4ce23eef1591a90c145e8b225821a80b9) https://bugzilla.redhat.com/show_bug.cgi?id=1698184 lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_method.rb | 2 +- lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_object.rb | 16 +- spec/miq_ae_method_spec.rb | 24 + 3 files changed, 32 insertions(+), 10 deletions(-) Fixed!
Verified on version: 5.11.0.21.20190821214526_b0060d0
Automation Logs:
================
[----] I, [2019-08-27T09:50:50.848562 #7952:2b117853f778] INFO -- : Updated namespace [JDLhjVMjbX/VFbOtbkLZw/fihmsuvlzb jQWuYXXAtY/JDLhjVMjbX]
[----] I, [2019-08-27T09:50:50.854358 #7952:2b117853f778] INFO -- : Invoking [inline] method [/jQWuYXXAtY/JDLhjVMjbX/VFbOtbkLZw/fIHmsuVlZB] with inputs [{"arg1"=>"fred", "arg2"=>"george"}]
[----] I, [2019-08-27T09:50:50.862274 #7952:2b117853f778] INFO -- : <AEMethod [/jQWuYXXAtY/JDLhjVMjbX/VFbOtbkLZw/fIHmsuVlZB]> Starting
[----] I, [2019-08-27T09:50:51.319402 #7952:2b117af4011c] INFO -- : <AEMethod fihmsuvlzb> Hello world
[----] I, [2019-08-27T09:50:51.338308 #7952:2b117853f778] INFO -- : <AEMethod [/jQWuYXXAtY/JDLhjVMjbX/VFbOtbkLZw/fIHmsuVlZB]> Ending
[----] I, [2019-08-27T09:50:51.338472 #7952:2b117853f778] INFO -- : Method exited with rc=MIQ_OK
[
Ganesh, Could you help test the issue reported by http://talk.manageiq.org/t/automate-expression-methods/3071/8? Thanks. Hi Lucy, I can see that you and @mkanoor has already replied to that issue. Hence clearing need info. Thanks, Ganesh Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:4199 |
Description of problem: Null Coalescing fields don't work as input Parameters to Ruby methods or Ansible playbooks Version-Release number of selected component (if applicable): 5.10.3 How reproducible: 100% Steps to Reproduce: 1. Create a Ruby method or Ansible playbook method with Input Parameters. 2. Use Data Type null coalescing 3. Make the default value something like this : ${#var3} || ${#var2} || ${#var1} Actual results: Invoking [inline] method [/billy/System/Request2/null_col_test_ruby_method] with inputs [{"dialog_var1"=>" || var2_value || var1_value", "dialog_var2"=>"var1_value || var2_value || "}] Expected results: normal null coalescing behavior Additional info: Reproducer: 10.8.198.63 Run null_col_test_ruby_method from Automate/Simulation