Skip to content

Conversation

@sjd78
Copy link
Member

@sjd78 sjd78 commented Nov 11, 2025

See: konveyor/tackle2-ui#2726

For live discovery, at least one organization name is required.

Summary by CodeRabbit

  • Chores
    • Enhanced data validation to enforce minimum array requirements for improved system reliability and robustness. Array fields and organizations now require at least one item minimum, preventing incomplete configurations and improving overall data consistency. These updates ensure more reliable and robust system behavior when managing resources and organizational structures throughout the application.

… schema

See: konveyor/tackle2-ui#2726

For live discovery, at least one organization name is required.

Signed-off-by: Scott J Dickerson <[email protected]>
@coderabbitai
Copy link

coderabbitai bot commented Nov 11, 2025

Walkthrough

The PR adds minimum item constraints to array properties in the custom resource schema template. Two array fields now require at least one item: one in the first schema definition and the organizations array in the second. This enforces validation at the schema level.

Changes

Cohort / File(s) Change Summary
Schema Validation Updates
roles/tackle/templates/customresource-schema.yml.j2
Added minItems: 1 constraints to two array properties, enforcing that arrays must contain at least one item for validation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • The changes are minimal and repetitive (same constraint applied twice)
  • No complex logic or structural changes involved
  • Review should focus on verifying the constraint placement is correct and that the schema structure is maintained

Possibly related PRs

  • konveyor/operator#484: Modifies the same schema template file with organization array validation constraints, indicating coordinated schema validation improvements.

Suggested reviewers

  • jmontleon

Poem

🐰 Arrays now must have at least one dear,
minItems: 1 keeps validation clear,
Organizations lined up, never alone,
Schema constraints firmly sewn!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding minItems constraint for organizations in the platform/cloudfoundry/filter schema.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9d801ef and 14cc440.

📒 Files selected for processing (1)
  • roles/tackle/templates/customresource-schema.yml.j2 (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: jortel
Repo: konveyor/operator PR: 484
File: roles/tackle/templates/customresource-schema.yml.j2:87-109
Timestamp: 2025-11-04T17:06:56.277Z
Learning: In roles/tackle/templates/customresource-schema.yml.j2, the cloudfoundry filter schema intentionally uses three flat, optional arrays (organizations, spaces, names) rather than a nested structure. This flat design is the correct implementation despite the PR description mentioning hierarchical organization→spaces→applications relationships.
📚 Learning: 2025-11-04T17:06:56.277Z
Learnt from: jortel
Repo: konveyor/operator PR: 484
File: roles/tackle/templates/customresource-schema.yml.j2:87-109
Timestamp: 2025-11-04T17:06:56.277Z
Learning: In roles/tackle/templates/customresource-schema.yml.j2, the cloudfoundry filter schema intentionally uses three flat, optional arrays (organizations, spaces, names) rather than a nested structure. This flat design is the correct implementation despite the PR description mentioning hierarchical organization→spaces→applications relationships.

Applied to files:

  • roles/tackle/templates/customresource-schema.yml.j2
🔇 Additional comments (1)
roles/tackle/templates/customresource-schema.yml.j2 (1)

87-110: ****

The original review comment conflicts with the intentional design of this schema. Based on retrieved learnings from the repository maintainer (jortel) for this same file and PR, the cloudfoundry filter schema is designed with three flat, optional arrays (organizations, spaces, names)—not with required constraints. This flat design is the correct implementation despite the PR description mentioning hierarchical relationships.

The suggestion to add required: [organizations] contradicts this approved design pattern. The schema as implemented is correct; no changes are needed.

Likely an incorrect or invalid review comment.


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 and usage tips.

sjd78 added a commit to sjd78/tackle2-ui that referenced this pull request Nov 11, 2025
Resolves: konveyor#2726
Requires: konveyor/operator#491

Add `minItems: 1` for organizations filter prop to the Cloud
Foundry discovery filter form.

Signed-off-by: Scott J Dickerson <[email protected]>
Copy link
Contributor

@jortel jortel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jortel jortel added the cherry-pick/release-0.8 This PR should be cherry-picked to release-0.8 branch label Nov 11, 2025
@jortel jortel merged commit caa1353 into konveyor:main Nov 12, 2025
7 checks passed
@sjd78 sjd78 deleted the cf_filter_schema branch November 12, 2025 14:41
sjd78 added a commit to sjd78/konveyor-operator that referenced this pull request Nov 12, 2025
…ma (konveyor#491)

Backport-Of: konveyor#491
Backport-Of: konveyor#484
See: konveyor/tackle2-ui#2726

For live discovery, at least one organization name is required.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

* **Chores**
* Enhanced data validation to enforce minimum array requirements for
improved system reliability and robustness. Array fields and
organizations now require at least one item minimum, preventing
incomplete configurations and improving overall data consistency. These
updates ensure more reliable and robust system behavior when managing
resources and organizational structures throughout the application.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Scott J Dickerson <[email protected]>
sjd78 added a commit to sjd78/konveyor-operator that referenced this pull request Nov 12, 2025
…ma (konveyor#491)

See: konveyor/tackle2-ui#2726

For live discovery, at least one organization name is required.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Enhanced data validation to enforce minimum array requirements for
improved system reliability and robustness. Array fields and
organizations now require at least one item minimum, preventing
incomplete configurations and improving overall data consistency. These
updates ensure more reliable and robust system behavior when managing
resources and organizational structures throughout the application.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Scott J Dickerson <[email protected]>
sjd78 added a commit to konveyor/tackle2-ui that referenced this pull request Nov 12, 2025
Resolves: #2726
Requires: konveyor/operator#491

Add `minItems: 1` for organizations filter prop to the Cloud Foundry
discovery filter form.

---------

Signed-off-by: Scott J Dickerson <[email protected]>
github-actions bot pushed a commit to konveyor/tackle2-ui that referenced this pull request Nov 12, 2025
Resolves: #2726
Requires: konveyor/operator#491

Add `minItems: 1` for organizations filter prop to the Cloud Foundry
discovery filter form.

---------

Signed-off-by: Scott J Dickerson <[email protected]>
Signed-off-by: Cherry Picker <[email protected]>
sjd78 added a commit to konveyor/tackle2-ui that referenced this pull request Nov 12, 2025
Resolves: #2726
Requires: konveyor/operator#491

Add `minItems: 1` for organizations filter prop to the Cloud Foundry
discovery filter form.

---------

Signed-off-by: Scott J Dickerson <[email protected]>
Signed-off-by: Cherry Picker <[email protected]>
Co-authored-by: Scott Dickerson <[email protected]>
sjd78 added a commit that referenced this pull request Nov 12, 2025
…ma (#491) (#494)

Backport-Of: #491
Backport-Of: #484
See: konveyor/tackle2-ui#2726

For live discovery, at least one organization name is required.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary

* **Chores**
* Enhanced data validation to enforce minimum array requirements for
improved system reliability and robustness. Array fields and
organizations now require at least one item minimum, preventing
incomplete configurations and improving overall data consistency. These
updates ensure more reliable and robust system behavior when managing
resources and organizational structures throughout the application.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Jeff Ortel <[email protected]>
Signed-off-by: Scott J Dickerson <[email protected]>
Co-authored-by: Jeff Ortel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick/release-0.8 This PR should be cherry-picked to release-0.8 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants