HYPERFLEET-1138 - docs: add condition mapping configuration guide - #334
HYPERFLEET-1138 - docs: add condition mapping configuration guide#334rafabene wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdded Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
Risk Score: 2 —
|
| Signal | Detail | Points |
|---|---|---|
| PR size | 636 lines (>500) | +2 |
| Sensitive paths | none | +0 |
Computed by hyperfleet-risk-scorer
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/condition-mapping.md`:
- Around line 172-190: Remove the “Custom CEL Functions” section and its
toJson/dig examples from condition-mapping.md, since these functions are
Adapter-only and not API capabilities. Do not add API registrations or
implementation changes; keep the documentation limited to functions supported by
the API.
- Line 377: Update the documentation near the CEL mapping result to remove the
claim that sensitive fields are automatically masked before CEL evaluation.
State that adapter status data is exposed to CEL through data and filtering is
the operator’s responsibility; only document masking if mapper-level masking and
corresponding tests are implemented.
- Around line 60-99: Update the condition-mapping documentation to match the
implemented EntityDescriptor and UnmarshalExact configuration contract: remove
deployment/integration claims and the unsupported entities[].conditions
structure, or implement the mapper and document its actual contract. Align the
guide with the architecture’s adapters.<resource>.conditions map, retain the
100-character limit for generated resource condition type values, use 128
characters for adapter condition inputs, and change message-truncation logging
from info to warning.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 056ff684-3413-4473-8113-4a881892be1c
📒 Files selected for processing (1)
docs/condition-mapping.md
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
openshift-hyperfleet/architecture(manual)openshift-hyperfleet/hyperfleet-api(manual)openshift-hyperfleet/hyperfleet-sentinel(manual)openshift-hyperfleet/hyperfleet-adapter(manual)openshift-hyperfleet/hyperfleet-broker(manual)
| | Variable | Type | Description | | ||
| |----------|------|-------------| | ||
| | `statuses` | `list(dyn)` | Array of adapter statuses for the resource. Entries with any `Unknown` condition are excluded. | | ||
| | `resource` | `dyn` | Full resource object (Cluster/NodePool) as a map. Sensitive fields are masked. | |
There was a problem hiding this comment.
Tip
nit — non-blocking suggestion
Category: JIRA
The JIRA AC calls out env in the CEL evaluation context, but it's only mentioned down in the DSL Keyword Consistency section (line 542). Operators coming from the adapter framework or sentinel might look for env.* here and be confused when it's absent.
Consider adding a brief note after the Variables table, e.g.:
> **Note**: Unlike the Adapter Framework and Sentinel, condition mapping does not expose an `env` variable. Use the `resource` variable for resource-level context instead.| | `output.reason.expression` | string (CEL) | Yes | Machine-readable CamelCase reason string. Max 256 characters (condition skipped if exceeded). | | ||
| | `output.message.expression` | string (CEL) | Yes | Human-readable description. Max 2048 characters (truncated if exceeded). | | ||
|
|
||
| Three additional fields are **automatically generated** by the API: |
There was a problem hiding this comment.
Are we missing LastUpdatedTime here?
Summary
docs/condition-mapping.md— comprehensive operator guide for the CEL-based condition mapping feature (PR HYPERFLEET-538 - feat: CEL-based condition mapping engine #329)Acceptance Criteria Coverage
Dependencies
Test plan
make verifypasses