feat: use dynamic target version in lint check messages#9
feat: use dynamic target version in lint check messages#9lburgazzoli merged 1 commit intoopendatahub-io:mainfrom
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughDynamic major.minor version labels were added (MajorMinorLabel) and propagated into many checks; target context was embedded in request structs and version labels threaded through helper signatures, replacing hardcoded "3.x" strings with formatted target-version labels. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
pkg/lint/check/validate/workload.go (1)
20-42:TargetduplicatesClient,IO, andDebugfields already present onWorkloadRequest.
WorkloadRequestnow embeds the fullcheck.Target(which containsClient,IO,Debug) alongside its ownClient,IO, andDebugfields. Existing consumers usereq.Clientetc., so removing them now would be a breaking change, but consider deprecating the standalone fields in favor ofreq.Target.*to avoid drift.pkg/lint/checks/components/kserve/serverless.go (1)
59-61: Nit:tvis computed between thejq.Querycall and its error-handling switch.This is functionally fine since
MajorMinorLabelis pure and doesn't depend onerr/state, but placingtvbefore the query (or after the switch's error return) would be slightly more conventional — keeping the error-producing call adjacent to its error check.
0faea33 to
be56ca1
Compare
Replace hardcoded "RHOAI 3.x" in lint check condition messages with the actual target version (e.g. "RHOAI 3.0", "RHOAI 3.3") derived from the --target-version flag. - Add version.MajorMinorLabel() helper to format semver as "major.minor" - Embed full check.Target in ComponentRequest and WorkloadRequest so validation callbacks can access target version info - Update validate.Removal() to auto-inject target version label - Update all lint checks to use dynamic version in runtime messages - Static check names/descriptions kept as-is (set at construction time) Co-authored-by: Cursor <cursoragent@cursor.com>
92f6c1e to
6733940
Compare
Replace hardcoded "RHOAI 3.x" in lint check condition messages with the
actual target version (e.g. "RHOAI 3.0", "RHOAI 3.3") derived from the
--target-version flag.
validation callbacks can access target version info
Co-authored-by: Cursor cursoragent@cursor.com
Description
How Has This Been Tested?
Merge criteria:
Summary by CodeRabbit