Skip to content

feat: add ValidatePlaceholders for catalog entry service files#204

Merged
mrhillsman merged 1 commit into
mainfrom
feat/validate-placeholders
Jun 14, 2026
Merged

feat: add ValidatePlaceholders for catalog entry service files#204
mrhillsman merged 1 commit into
mainfrom
feat/validate-placeholders

Conversation

@mrhillsman

Copy link
Copy Markdown
Contributor

Summary

  • Add ValidatePlaceholders(entry *CatalogEntry) ([]string, []string) to internal/workloads/catalog.go
  • Extracts {{key}} placeholders from all service files via regex and cross-references against declared param keys
  • Returns errors for placeholders that don't match any declared param (likely typos, e.g. {{trhreads}} instead of {{threads}})
  • Returns warnings for declared params not referenced in any service file (possibly intentional)
  • Results are sorted for deterministic output
  • 5 new test cases in catalog_test.go: all-match, typo error, unused param warning, mixed errors+warnings, no-params

Test plan

  • ginkgo -v --focus "ValidatePlaceholders" ./internal/workloads/ - all 5 tests pass
  • go test ./... - full suite green, no regressions

Resolves #201

@exe-prow-github-app exe-prow-github-app Bot requested a review from OchiengEd June 14, 2026 21:39
@exe-prow-github-app

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mrhillsman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@exe-prow-github-app exe-prow-github-app Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 14, 2026
@mrhillsman mrhillsman force-pushed the feat/validate-placeholders branch 2 times, most recently from ee74afc to 7b9d67e Compare June 14, 2026 22:02
Extracts {{key}} placeholders from all service files via regex and
cross-references against declared param keys. Returns errors for
unknown placeholders (likely typos) and warnings for declared params
not referenced in any service file.

Signed-off-by: Melvin Hillsman <mhillsma@redhat.com>
@mrhillsman mrhillsman force-pushed the feat/validate-placeholders branch from 7b9d67e to 9036926 Compare June 14, 2026 22:08
@mrhillsman mrhillsman merged commit 802524f into main Jun 14, 2026
3 of 4 checks passed
@mrhillsman mrhillsman deleted the feat/validate-placeholders branch June 15, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add ValidatePlaceholders for catalog entry service files

1 participant