Uploaded image for project: 'Product Technical Learning'
  1. Product Technical Learning
  2. PTL-14319

AD248-7.4 Feedback: I would like to report an issue with the current playbook used for grading that relies on commands like cat, awk, and similar tools to parse XML files. This approach is causing th

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • en-US (English)

      Please fill in the following information:


      URL: https://role.rhu.redhat.com/rol-rhu/app/courses/ad248-7.4/pages/ch13s02 
      Reporter RHNID: shasingh01
      Section Title:    Lab: Comprehensive Review of Red Hat JBoss Application Administration I                                                                      

      Issue description

       Description:  I would like to report an issue with the current playbook used for grading that relies on commands like cat, awk, and similar tools to parse XML files. This approach is causing the grading to be too rigid and results in false negatives. The issue arises because these tools look for exact text matches, which means even minor format variations in the XML can cause the script to fail, even if the configuration is logically correct.

      For example, if an XML element ends with " /> instead of "/>, the current script considers it incorrect, even though both are valid XML syntax. This results in grading errors that are not indicative of actual problems in the configuration.

      For an XML file like domain.xml in JBoss, the preferred solution would be to use the JBoss CLI to validate the configuration or utilize tools like xmllint that are designed for parsing XML properly. Alternatively, in an Ansible playbook, it would be better to use a dedicated XML module that supports XPath or a similar mechanism to check for the presence and values of specific nodes and attributes.

      The current method of relying on exact text matches is not suitable for structured data like XML, as XML can have different valid representations that should not be considered errors. I recommend replacing the current approach with one that uses an XML-aware tool to ensure that grading is based on the logical structure and values, rather than on strict formatting. 

      Steps to reproduce:

       

      Workaround:

       

      Expected result:

              gls-curriculum-ocp-adv@redhat.com PTL - AppDev Team
              shasingh01 Shashi Singh
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: