Skip to content

FLPATH-4770 - fix getting started examples for multi-resource catalog items - #21

Merged
testetson22 merged 1 commit into
dcm-project:mainfrom
testetson22:FLPATH-4770-fix-user-journey
Aug 20, 2026
Merged

FLPATH-4770 - fix getting started examples for multi-resource catalog items#21
testetson22 merged 1 commit into
dcm-project:mainfrom
testetson22:FLPATH-4770-fix-user-journey

Conversation

@testetson22

@testetson22 testetson22 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

The Getting Started tutorials still used the old schema, causing users to get HTTP 400 errors when following the documented steps.

The control-plane's catalog item schema was updated (FLPATH-4384) to require spec.resources (an array of named resource definitions) instead of the flat spec.service_type / spec.fields structure. The instance schema now requires user_values[].resource to specify which resource each value applies to.

Changes

  • Update small-vm.yaml example to use the multi-resource schema (spec.resources[]) introduced by control-plane PR docs: add missing enhancement pages from enhancements repo #11
  • Update my-vm.yaml example to include the required resource field in each user_values entry
  • Add explanatory text about the resources and resource fields for users following the tutorials

Dependent PR

Test plan

  • hugo --minify builds without errors
  • Local hugo server renders both pages correctly
  • YAML examples match what the current control-plane API accepts (spec.resources required, user_values[].resource required)

Summary by Sourcery

Align the Getting Started VM tutorials with the current catalog item and instance schemas.

Bug Fixes:

  • Update the Getting Started catalog item and instance examples to use the current multi-resource schemas, preventing HTTP 400 errors when users follow the tutorials.

Enhancements:

  • Clarify how catalog resources and per-instance resource references work in the single-resource example.

Documentation:

  • Refresh the Getting Started YAML examples and explanatory text for the current control-plane API.

Updates the small VM catalog item and instance tutorials to reflect the
new `spec.resources` schema, where each resource has a name and
service type. Instance `user_values` entries now specify the target
resource by name.

Signed-off-by: Thomas Stetson <tstetson@redhat.com>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • Consider briefly explaining why the resource is named main in the example (e.g., a common convention) to help users choose meaningful names for multi-resource catalog items.
  • In the catalog item tutorial, you might add a short note or example showing how multiple resources would look (even just a second stub resource) to make the new multi-resource schema clearer for users who will define more complex items.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider briefly explaining why the resource is named `main` in the example (e.g., a common convention) to help users choose meaningful names for multi-resource catalog items.
- In the catalog item tutorial, you might add a short note or example showing how multiple resources would look (even just a second stub resource) to make the new multi-resource schema clearer for users who will define more complex items.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Fix Getting Started examples for multi-resource catalog items

🐞 Bug fix 📝 Documentation 🕐 Less than 10 minutes

Grey Divider

AI Description

• Migrates Small VM catalog YAML to the required named spec.resources schema.
• Scopes instance user values to main, preventing control-plane HTTP 400 responses.
• Explains resource naming across catalog item and instance tutorials.
Diagram

graph TD
  A["Tutorial user"] --> B["Catalog YAML"] --> C["Named resource"] --> D["Instance YAML"] --> E["Scoped values"] --> F["Control-plane API"]
Loading
High-Level Assessment

Directly aligning both linked tutorials with the required control-plane schema is the optimal approach. A shared generated example was considered unnecessary for two small, context-specific tutorial snippets and would add maintenance complexity.

Files changed (2) +46 / -36

Documentation (2) +46 / -36
create-small-vm-catalog-item.mdMigrate Small VM catalog example to named resources +38/-34

Migrate Small VM catalog example to named resources

• Moves the VM service type and field definitions beneath 'spec.resources[]' and names the resource 'main'. Adds guidance explaining multi-resource catalog items and the role of resource names.

content/docs/getting-started/create-small-vm-catalog-item.md

create-small-vm-instance.mdScope Small VM instance values to the main resource +8/-2

Scope Small VM instance values to the main resource

• Adds 'resource: main' to each 'user_values' entry so the instance matches the current schema. Explains how instance values target catalog resources by name.

content/docs/getting-started/create-small-vm-instance.md

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can keep summaries lean with Finding overflow, which tucks the rest behind 'View more'

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@testetson22
testetson22 merged commit 56a4cfe into dcm-project:main Aug 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant