Skip to content

fix(platform-chart): add observability-alert-rule to web-application ComponentType allowedTraits - #591

Open
senithkay wants to merge 1 commit into
wso2:mainfrom
senithkay:fix/web-application-componenttype-observability-trait
Open

fix(platform-chart): add observability-alert-rule to web-application ComponentType allowedTraits#591
senithkay wants to merge 1 commit into
wso2:mainfrom
senithkay:fix/web-application-componenttype-observability-trait

Conversation

@senithkay

Copy link
Copy Markdown
Contributor

Summary

  • deployment_spec.go attaches the observability-alert-rule ClusterTrait to all deployment components (service and web-application) when ResolveAutoRCAEnabled is true (see alert_rule_trait.go:DesiredObservabilityAlertRuleTraits)
  • The web-application ComponentType had no allowedTraits field at all, so OC rejected release generation for every webapp component with: traits [ClusterTrait:observability-alert-rule] are not in the allowed list []
  • This is the same class of bug as fix(platform-chart): add observability-alert-rule to service ComponentType allowedTraits #590 (which fixed service), just for the web-application ComponentType
  • Web-application components don't expose a managed API gateway path, so only observability-alert-rule is needed (no api-configuration)

Proof

Live cluster blocked with this error (expense-webapp in mm1):

run: deploy failed: component "expense-webapp": cut release: generate release: bad request: validation error: traits [ClusterTrait:observability-alert-rule] are not in the allowed list []

Live fix applied:

kubectl patch componenttype web-application -n default --type=merge \
  -p '{"spec":{"allowedTraits":[{"kind":"ClusterTrait","name":"observability-alert-rule"}]}}'

componenttype.openchoreo.dev/web-application patched ✓

Related

…ComponentType allowedTraits

deployment_spec.go attaches the observability-alert-rule ClusterTrait to all
deployment components (service and web-application) when ResolveAutoRCAEnabled
is true. Without this trait in the ComponentType's allowedTraits list, OC
rejects release generation with:
  traits [ClusterTrait:observability-alert-rule] are not in the allowed list []

Live cluster fix: kubectl patch applied to web-application ComponentType.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c48d78e1-678b-4d8a-8d66-47c9193edcc5

📥 Commits

Reviewing files that changed from the base of the PR and between 728dafb and 27b7145.

📒 Files selected for processing (1)
  • deployments/helm-charts/platform/templates/openchoreo-org-types/componenttype-web-application.yaml

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


📝 Walkthrough

Summary

  • Allows the web-application ComponentType to use the observability-alert-rule ClusterTrait.
  • Enables release generation when ResolveAutoRCAEnabled is true.
  • Does not add api-configuration.

Walkthrough

The web-application ComponentType now allows the observability-alert-rule ClusterTrait through its allowedTraits configuration.

Merge Risk: ⚪ Minimal · up to 27b71

This change allows web-application components to use the observability alert trait they already receive during deployment. No actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the platform chart change and the specific trait added to the web-application ComponentType.
Description check ✅ Passed The description directly explains the affected ComponentType, the release-generation failure, and the intended fix.
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 files. (1 skipped: 1 unsupported.)
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

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.

2 participants