Bug 1353730 - Truncate miq_request user_message length.
Summary: Truncate miq_request user_message length.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: GA
: 5.7.0
Assignee: Tina Fitzgerald
QA Contact: Milan Falešník
URL:
Whiteboard:
Depends On:
Blocks: 1353974
TreeView+ depends on / blocked
 
Reported: 2016-07-07 20:27 UTC by Tina Fitzgerald
Modified: 2017-03-16 10:35 UTC (History)
7 users (show)

Fixed In Version: 5.7.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1353974 (view as bug list)
Environment:
Last Closed: 2017-01-11 19:49:53 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Automate Simulate options (49.61 KB, image/png)
2016-07-07 20:27 UTC, Tina Fitzgerald
no flags Details
test automate method (21.59 KB, image/png)
2016-07-07 20:28 UTC, Tina Fitzgerald
no flags Details
new_instance_shown_in_nav_bar (15.12 KB, image/png)
2016-07-07 20:31 UTC, Tina Fitzgerald
no flags Details
new_instance_showing_method_call (44.09 KB, image/png)
2016-07-07 20:31 UTC, Tina Fitzgerald
no flags Details

Description Tina Fitzgerald 2016-07-07 20:27:24 UTC
Created attachment 1177444 [details]
Automate Simulate options

Description of problem:

Each automate method that sets the user_message has to truncate the message length to 255. Fixing it in the mixin makes more sense.


Steps to Reproduce:
1. Create small automate method in writable domain to test user message length(see attachment)
2. Create an instance in the same class as the newly created method and set the method name in method slot.(see attachment)
3. Run Simulate to call method created in step 1.(see attachment)
4. Check automation.log for message:
example message:
[----] I, [2016-07-07T16:10:50.805849 #17716:3fe445430b0c]  INFO -- : <AEMethod test_user_message> request user message length 320 user_message: ReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongString

Actual results: 
message length exceeds 255

Expected results:
message length does not exceed 255

Comment 2 Tina Fitzgerald 2016-07-07 20:28:34 UTC
Created attachment 1177445 [details]
test automate method

Comment 3 Tina Fitzgerald 2016-07-07 20:31:08 UTC
Created attachment 1177446 [details]
new_instance_shown_in_nav_bar

Comment 4 Tina Fitzgerald 2016-07-07 20:31:56 UTC
Created attachment 1177447 [details]
new_instance_showing_method_call

Comment 6 CFME Bot 2016-07-08 16:51:24 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/aec4220437be54727fae8e53f868f39b99ca916b

commit aec4220437be54727fae8e53f868f39b99ca916b
Author:     Tina Fitzgerald <tfitzger>
AuthorDate: Thu Jun 30 10:57:32 2016 -0400
Commit:     Tina Fitzgerald <tfitzger>
CommitDate: Thu Jul 7 16:36:25 2016 -0400

    Truncate request user_message and add test.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1353730

 app/models/mixins/miq_request_mixin.rb                             | 1 +
 .../miq_ae_service_service_template_provision_request_spec.rb      | 7 +++++++
 2 files changed, 8 insertions(+)

Comment 7 Milan Falešník 2016-10-03 11:59:42 UTC
Verified in 5.7.0.3

[----] I, [2016-10-03T08:01:17.541748 #11860:de5710]  INFO -- : <AEMethod testmeth> request user message length 255 user_message: ReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongStringReallyLongSt...


Note You need to log in before you can comment on or make changes to this bug.