Skip to content

fix: watch managed Argo applications - #4

Merged
patrickleet merged 1 commit into
mainfrom
fix/watch-environment-applications
Sep 2, 2026
Merged

patrickleet merged 1 commit into
mainfrom
fix/watch-environment-applications

Conversation

@patrickleet

@patrickleet patrickleet commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • enable target-resource watches for composed Argo Application objects
  • recreate externally deleted environment Applications immediately instead of waiting for the provider poll interval
  • assert watch behavior for the shared preview environment

Production evidence

During legacy Application adoption, Argo safely pruned the three old parent Applications without cascading to child workloads. The Kubernetes provider Objects had watch disabled, so their cached Ready status did not immediately notice deletion. A one-time managed-resource reconcile restored all three parents; they are now Synced and Healthy under Crossplane ownership, and the Storybook preview remained Healthy throughout.

Verification

  • Dory: make render:all
  • Dory: up project build
  • production API server dry-run accepts the rendered shared-preview XR and composed resources
  • KCL suite parses and builds; local Dory runner wait was stopped after its known wait-endpoint stall, so native Docker CI is authoritative for execution
  • git diff --check

Implements [[tasks/harmony-1397]]

Summary by CodeRabbit

  • New Features
    • Enabled continuous watching for generated preview application resources, allowing updates to be detected automatically.

Implements [[tasks/harmony-1397]]
@coderabbitai

coderabbitai Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 705424b0-3352-4505-a27c-3889ffcada7c

📥 Commits

Reviewing files that changed from the base of the PR and between 1a77b47 and 8ed1045.

📒 Files selected for processing (2)
  • functions/render/130-application.yaml.gotmpl
  • tests/test-render/main.k

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The application render template now sets spec.watch: true on the Crossplane Object. The preview render test verifies this field.

Changes

Application resource watching

Layer / File(s) Summary
Configure and verify resource watching
functions/render/130-application.yaml.gotmpl, tests/test-render/main.k
The rendered Crossplane Object enables spec.watch. The preview render test asserts that the field is True.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 8ed10

This localized change enables managed Argo Applications to be recreated promptly after external deletion and adds coverage for the rendered watch setting; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: enabling watches for managed Argo Application objects.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/watch-environment-applications

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Published Crossplane Package

The following Crossplane package was published as part of this PR:

Package: ghcr.io/hops-ops/gitops-environment:pr-4-18ae227f070db0a39e79d0301d60b756d5cb6e43

View Package

@patrickleet
patrickleet merged commit 13c820d into main Sep 2, 2026
8 checks passed
@patrickleet
patrickleet deleted the fix/watch-environment-applications branch September 2, 2026 01:38
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