OU-1389: add OWNERS_ALIAS and feature based OWNERS files#1083
Conversation
|
@PeterYurkovich: This pull request references OU-1389 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set. DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
WalkthroughThe change adds ownership aliases and OWNERS files across repository and web paths, and introduces an enabled ESLint rule that requires each ChangesFeature ownership enforcement
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant ESLint
participant requireFeatureOwners
participant FileSystem
ESLint->>requireFeatureOwners: lint file with feature path
requireFeatureOwners->>FileSystem: check feature/OWNERS
FileSystem-->>requireFeatureOwners: return existence result
requireFeatureOwners-->>ESLint: accept file or report missingOwners
Suggested reviewers: 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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 `@web/eslint-rules/require-feature-owners.ts`:
- Around line 41-43: Update the owners existence check in the feature validation
logic to require ownersPath to be a regular file rather than merely an existing
path, while preserving the cache behavior. Add a test covering a directory named
OWNERS and verify it does not satisfy the rule.
- Line 12: Scope or remove the module-level cache in the require-feature-owners
rule so OWNERS checks are not reused across ESLint invocations; preserve caching
only within one invocation if retained. In
web/eslint-rules/require-feature-owners.ts, update the cache associated with the
rule implementation, and in web/eslint-rules/require-feature-owners.spec.ts
lines 8-45 add a regression test that reuses the same rule instance while
existsSync changes from true to false and verifies the second run reflects the
change.
In `@web/eslint.config.ts`:
- Line 187: Replace the `as any` cast on the `local-rules` plugin registration
with a type-checked plugin object using `satisfies Linter.Plugin` or the
project’s equivalent typed form. Preserve the existing `file-naming` and
`require-feature-owners` rule registrations while ensuring the object remains
validated by ESLint types.
🪄 Autofix (Beta)
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: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 68b6fdd8-7cdb-4904-94ce-4f734df85704
📒 Files selected for processing (13)
OWNERSOWNERS_ALIASESweb/cypress/OWNERSweb/eslint-rules/require-feature-owners.spec.tsweb/eslint-rules/require-feature-owners.tsweb/eslint.config.tsweb/src/features/alerts/OWNERSweb/src/features/incidents/OWNERSweb/src/features/legacy-dashboards/OWNERSweb/src/features/metrics/OWNERSweb/src/features/perses-dashboards/OWNERSweb/src/features/targets/OWNERSweb/src/shared/OWNERS
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@web/eslint-rules/require-feature-owners.ts`:
- Line 37: Update the OWNERS-path validation around existsSync to require that
ownersPath resolves to a regular file, not merely an existing path; use
statSync(...).isFile() or the rule’s existing injectable predicate while
preserving current missing-file behavior. Add a regression test covering an
OWNERS directory and verify it is rejected.
🪄 Autofix (Beta)
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: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 41c199ca-cb8d-4630-b3b4-34c9a6cfb0bd
📒 Files selected for processing (3)
web/eslint-rules/require-feature-owners.spec.tsweb/eslint-rules/require-feature-owners.tsweb/eslint.config.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- web/eslint-rules/require-feature-owners.spec.ts
- web/eslint.config.ts
|
/label qe-approved |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jgbernalp, PeterYurkovich The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
|
@PeterYurkovich: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Add per-feature OWNERS files and specific
sharedandcypressOWNER's files.Adds @DavidRajnoha as a reviewer and approver in the cypress folder
Summary by CodeRabbit
Summary by CodeRabbit
Chores
OWNERSfiles and Cypress-specific ownership rules.New Features
Bug Fixes
Tests