Skip to content

fix: ArgoCD deployer generates valid YAML, add structural validation (#410)#413

Merged
lockwobr merged 3 commits intomainfrom
fix/agrocd-yaml
Mar 16, 2026
Merged

fix: ArgoCD deployer generates valid YAML, add structural validation (#410)#413
lockwobr merged 3 commits intomainfrom
fix/agrocd-yaml

Conversation

@lockwobr
Copy link
Copy Markdown
Contributor

Summary

  • Fix Go template whitespace trimming in application.yaml.tmpl that caused sources: and destination: to render at column 0 instead of under spec:, producing invalid YAML
  • Add TestGenerate_ApplicationYAMLStructure unit test that parses generated ArgoCD Application YAML and validates the document structure (spec.sources, spec.destination, spec.source.path)
  • Add assertValidYAML checks to existing ArgoCD deployer tests
  • Add yamllint validation to the e2e argocd-deployer step
  • Exclude bundle/ from yamllint (generated output, already gitignored)

Close #410

Test plan

  • make test passes
  • make lint-go passes (0 issues)
  • make e2e passes (17/17 including yamllint on ArgoCD bundle output)
  • make qualify passes

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • Build/CI/tooling

Component(s) Affected

  • CLI (cmd/aicr, pkg/cli)
  • API server (cmd/aicrd, pkg/api, pkg/server)
  • Recipe engine / data (pkg/recipe)
  • Bundlers (pkg/bundler, pkg/component/*)
  • Collectors / snapshotter (pkg/collector, pkg/snapshotter)
  • Validator (pkg/validator)
  • Core libraries (pkg/errors, pkg/k8s)
  • Docs/examples (docs/, examples/)
  • Other: ____________

Implementation Notes

Testing

# Commands run (prefer `make qualify` for non-trivial changes)
make qualify

Risk Assessment

  • Low — Isolated change, well-tested, easy to revert
  • Medium — Touches multiple components or has broader impact
  • High — Breaking change, affects critical paths, or complex rollout

Rollout notes:

Checklist

  • Tests pass locally (make test with -race)
  • Linter passes (make lint)
  • I did not skip/disable tests to make CI green
  • I added/updated tests for new functionality
  • I updated docs if user-facing behavior changed
  • Changes follow existing patterns in the codebase
  • Commits are cryptographically signed (git commit -S) — GPG signing info

@lockwobr lockwobr enabled auto-merge (squash) March 16, 2026 18:58
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 16, 2026

Coverage Report ✅

Metric Value
Coverage 73.5%
Threshold 70%
Status Pass
Coverage Badge
![Coverage](https://img.shields.io/badge/coverage-73.5%25-green)

No Go source files changed in this PR.

@lockwobr lockwobr disabled auto-merge March 16, 2026 19:13
@lockwobr lockwobr enabled auto-merge (squash) March 16, 2026 19:13
@lockwobr lockwobr merged commit 70efe82 into main Mar 16, 2026
24 checks passed
@lockwobr lockwobr deleted the fix/agrocd-yaml branch March 16, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: argocd deployer generates invalid app yaml

2 participants