CNTRLPLANE-3791: fix: revert api-lint --whole-files to avoid surfacing pre-existing violations - #9071
Conversation
…olations Reverts the api-lint and api-lint-fix targets to use --new-from-rev without --whole-files. The --whole-files flag causes the entire file to be linted when any line changes, surfacing pre-existing violations that the author did not introduce. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
Skipping CI for Draft Pull Request. |
📝 WalkthroughWalkthroughThe Makefile now derives Suggested reviewers: 🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@bryan-cox: This pull request references CNTRLPLANE-3791 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. |
|
/area ci-tooling |
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 `@Makefile`:
- Line 106: Update the PULL_BASE_SHA assignment to validate that the selected
UPSTREAM_REMOTE/main or main revision resolves successfully and is non-empty,
rather than silently accepting an empty value from git rev-parse. Fail
immediately with a clear error before the lint targets using PULL_BASE_SHA are
defined or invoked, while preserving any explicitly provided valid
PULL_BASE_SHA.
🪄 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: a8ec9afb-8964-4507-892e-11c7dd8806a9
📒 Files selected for processing (1)
Makefile
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9071 +/- ##
=======================================
Coverage 44.50% 44.50%
=======================================
Files 774 774
Lines 96980 96980
=======================================
Hits 43164 43164
Misses 50828 50828
Partials 2988 2988
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
/verified by linter passing in gha |
|
@bryan-cox: This PR has been marked as verified by 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. |
|
Scheduling tests matching the |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bryan-cox, devguyio 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 |
|
/override ci/prow/e2e-aks |
|
@bryan-cox: Overrode contexts on behalf of bryan-cox: ci/prow/e2e-aks, ci/prow/e2e-aws, ci/prow/e2e-aws-upgrade-hypershift-operator, ci/prow/e2e-azure-v2-self-managed, ci/prow/e2e-kubevirt-aws-ovn-reduced, ci/prow/e2e-v2-aws, ci/prow/e2e-v2-gke 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 kubernetes-sigs/prow repository. |
|
@bryan-cox: 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. |
What this PR does / why we need it:
Reverts the
api-lintandapi-lint-fixMakefile targets to use--new-from-revwithout--whole-files. The--whole-filesflag (added in #9016) causes the entire file to be linted when any line changes, surfacing pre-existing violations that the PR author did not introduce.This restores the original behavior where only changed lines are checked. A follow-up Jira ticket will track fixing all pre-existing linter violations so
--whole-files(or full-file linting) can be re-enabled.Which issue(s) this PR fixes:
Addresses feedback from #9063
Special notes for your reviewer:
This is an alternative to #9063 which proposed removing
--new-from-reventirely and fixing all ~570 pre-existing violations. This PR takes the simpler approach of reverting to the original scoping while a Jira ticket tracks the full cleanup.Checklist:
Summary by CodeRabbit