[PP-1] Harden UUID validation in ComponentTreeStructureConstraintValidator

Created on 29 August 2024, 21 days ago
Updated 12 September 2024, 8 days ago

Overview

In ComponentTreeStructureConstraintValidator we have the todo

// @todo Validate that the string is a valid UUID. *And* that it is unique in the tree.

Proposed resolution

Add this validation.

See if we can do this all in \Drupal\experience_builder\Plugin\Validation\Constraint\ComponentTreeStructureConstraintValidator::validateTree

User interface changes

None

📌 Task
Status

Postponed

Component

Data model

Created by

🇺🇸United States tedbow Ithaca, NY, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @tedbow
  • Assigned to abhisekmazumdar
  • 🇮🇳India abhisekmazumdar India

    Picking this up and giving my best try.

  • Pipeline finished with Failed
    9 days ago
    Total: 377s
    #279240
  • Pipeline finished with Failed
    9 days ago
    Total: 440s
    #279244
  • Issue was unassigned.
  • Status changed to Needs review 9 days ago
  • 🇮🇳India abhisekmazumdar India

    The MR is ready for review.

  • Assigned to tedbow
  • 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺

    Thanks @abhisekmazumdar!

    @tedbow Thoughts on all the test-only UUIDs that now cause failures, such as

    +    'tree[uuid-in-root][the_body][0][uuid]' => 'The UUID "<em class="placeholder">uuid-level-1</em>" is not a valid UUID.'
    +    'tree[uuid-level-2][the_body][0][uuid]' => 'The UUID "<em class="placeholder">uuid-level-3</em>" is not a valid UUID.'
    +    'tree[uuid-level-2][the_body][1][uuid]' => 'The UUID "<em class="placeholder">uuid-last-in-tree</em>" is not a valid UUID.'
    +    'tree[uuid-level-1][the_body][0][uuid]' => 'The UUID "<em class="placeholder">uuid-level-2</em>" is not a valid UUID.'
    

    ?

  • Pipeline finished with Failed
    9 days ago
    Total: 534s
    #279254
  • Pipeline finished with Failed
    9 days ago
    Total: 427s
    #279266
  • Issue was unassigned.
  • Status changed to Postponed 8 days ago
  • 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺

    LGTM! Well done, @abhisekmazumdar 😊 That looks as simple/elegant as I'd hoped 😄

    📌 Update default config to make a fresh install result in an XB UI with an empty canvas Fixed will change/reduce the amount of test expectations that need to be updated, so postponing this on that.

Production build 0.71.5 2024