Change default sort order of CI/CD component inputs

What does this MR do and why?

Component inputs were sorted by input-name length instead of their order in the YAML spec:inputs: block. The spec jsonb column reorders object keys by length, so the name-keyed inputs hash lost its order on persistence.

Inputs are now stored as an ordered array instead, since jsonb preserves array element order. Publishing the components now records the declared order in a server-owned spec['inputs_order'] array, and the GraphQL resolver orders the inputs by it. The inputs object itself is unchanged. This MR only adds a sibling key, so there is no new-vs-legacy shape to migrate away from later.

In a follow-up MR, we will implement the backfill mechanism, see Backfill existing CI/CD Catalog component input... (#619182)

🛠️ with ❤️ at Siemens

References

Screenshots or screen recordings

Sorted by length Sorted by order in yaml file
component-unsorted component-sort

How to set up and validate locally

  1. In any project, add a component template under templates/ whose spec:inputs: are intentionally out of length order, e.g.:
  spec:
    inputs:
      bazbazbaz:
      foo:
      barbar:
  ---
  image: alpine
  1. Enable Settings → CI/CD → Catalog resource, then publish a release (tag) so a version is created.
  2. Open Explore → CI/CD Catalog → your component and confirm the Inputs table lists them in YAML order (bazbaz, foo, barbar) not by name length.

MR acceptance checklist

MR Checklist ( @nwittstruck)

Related to #550261 (closed)

Edited by Nicholas Wittstruck

Merge request reports

Loading
Loading