Bug 1541393 - Improve help and error messages when adding CVs to a CCV
Summary: Improve help and error messages when adding CVs to a CCV
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Views
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: Released
Assignee: Michael Johnson
QA Contact: Lai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-02 13:24 UTC by Andrew Kofink
Modified: 2019-10-07 17:19 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 12:36:57 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github Katello katello pull 7610 None None None 2018-08-08 16:07:21 UTC
Foreman Issue Tracker 22498 None None None 2018-02-02 13:24:32 UTC
Red Hat Product Errata RHSA-2019:1222 None None None 2019-05-14 12:37:04 UTC

Description Andrew Kofink 2018-02-02 13:24:30 UTC
This came from discussion in https://bugzilla.redhat.com/show_bug.cgi?id=1309944

trying to add a different version of a CV that is already in the CCV, fails, which is I suppose correct but the message could be more informative:

~]# hammer content-view add-version --id 3 --content-view test2 --content-view-version-id 7
Could not add version:
  Validation failed: Content view components is invalid, Content view components is invalid

Also the help descriptions could indicate which options relate to ccv and which to cv being added, currently we have:

~]# hammer content-view add-version -h
Usage:
    hammer content-view add-version [OPTIONS]

Options:
 --content-view CONTENT_VIEW_NAME                    Content view name to search by
 --content-view-id CONTENT_VIEW_ID                   content view numeric identifier
 --content-view-version CONTENT_VIEW_VERSION_VERSION Content view version number
 --content-view-version-id CONTENT_VIEW_VERSION_ID   Content view version identifier
 --id ID                                             content view numeric identifier
 --name NAME                                         Content view name to search by

Comment 1 Andrew Kofink 2018-02-02 13:24:34 UTC
Created from redmine issue http://projects.theforeman.org/issues/22498

Comment 2 Andrew Kofink 2018-02-02 13:24:37 UTC
Upstream bug assigned to None

Comment 4 Michael Johnson 2018-08-08 16:40:13 UTC
@Andrew, I spoke with Jonathon and he feels that the fix to the help descriptions is out of scope for this fix. Could you open another redmine issue for that since you made the initial request?

Thanks!

Comment 5 pm-sat@redhat.com 2018-09-16 15:20:15 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/22498 has been resolved.

Comment 7 Lai 2018-11-29 16:51:08 UTC
Set up a ccv and a cv.

  # hammer content-view add-version --id 12 --content-view-version-id 2
    The component version has been added.

Published the a new version of cv and reran the command

  # hammer content-view add-version --id 12 --content-view-version-id 13
    Could not add version:
      Validation failed: Base Another component already includes content view with ID 2

@Michael - Why is the word "Base" included in the error message?

Failed.

Version Tested:
Satellite-6.5 Snap 5.0

Comment 8 Andrew Kofink 2018-11-29 23:41:14 UTC
Michael,

Here's the redmine issue for the help descriptions https://projects.theforeman.org/issues/25588. Sorry I didn't see this earlier!

Comment 9 Michael Johnson 2019-01-15 17:01:12 UTC
@Lai

Rails is returning that by default. The previous change to the code overrode some of the default actions and now we are faced with this.

I found a fix to the code, but it would require changing all of the error messages coming out of the content view components model, and I think that is going to cause more change/problems than it's worth. It will require changing the structure of the error messages and completely rewriting them.

I would suggest leaving as-is because I believe 99% of people are going to read over the "Base" in that sentence. And I believe 100% of them will understand exactly what the sentence means. Updating the code on the other hand will increase the risk of more problems.

Comment 10 Lai 2019-02-06 17:04:57 UTC
@Michael @Andrew

Since there's no changes to this issue and we're leaving it as-is, is this going to move back to ON_QA or is there more discussion happening around this?

Comment 11 Andrew Kofink 2019-02-07 19:36:30 UTC
Removing the help text upstream issue so this can go back ON_QA

Comment 12 Lai 2019-02-08 15:35:00 UTC
Steps to test:
Set up a ccv and a cv.

  # hammer content-view add-version --id 2 --content-view-version-id 2
    The component version has been added.

Published the a new version of cv and reran the command

  # hammer content-view add-version --id 2 --content-view-version-id 3
    Could not add version:
      Validation failed: Base Another component already includes content view with ID 3

Version Tested:

6.5.0 Snap 14.

Marking issue as verified.

Comment 14 errata-xmlrpc 2019-05-14 12:36:57 UTC
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/RHSA-2019:1222


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