chore: updated makefile - #373
Conversation
📝 WalkthroughWalkthroughThe Makefile refactors its ChangesBuild tooling
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ 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 |
Coverage Report for CI Build 26624758378Coverage increased (+1.4%) to 85.022%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
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 `@Makefile`:
- Around line 6-7: The curl invocation in the Makefile (the line starting with
"curl --fail -sSL
https://raw.githubusercontent.com/opendefensecloud/dev-kit/$(DEV_KIT_VERSION)/common.mk
-o .common.mk-download") lacks timeout flags; update that command to include a
connection timeout (e.g., --connect-timeout 10) and a total timeout (e.g.,
--max-time 60) so the download cannot hang indefinitely, and optionally add
sensible retry flags (e.g., --retry 3) if desired.
- Around line 5-7: The current Makefile check skips downloading if
.common.mk-download exists but curl -o can leave a partial file on failure,
preventing retries; update the download logic that references
.common.mk-download so failed attempts are not cached: either remove the
existence check and let curl fail (so CI/Make will retry), or implement an
atomic download pattern—curl to a temporary file (e.g., .common.mk-download.tmp)
with --fail and then mv to .common.mk-download only on success, and ensure the
temp file is removed on error—apply this change to the block that runs curl
--fail -sSL
https://raw.githubusercontent.com/opendefensecloud/dev-kit/$(DEV_KIT_VERSION)/common.mk
-o .common.mk-download.
- Around line 4-10: The Makefile target "common.mk" currently has no
prerequisites so changing DEV_KIT_VERSION doesn't re-run the download; update
the target so its recipe is re-executed when DEV_KIT_VERSION changes by making
"common.mk" depend on the stamp file ".common.mk-version" (or vice versa) and
write the current DEV_KIT_VERSION into that stamp, or mark the target phony and
gate the download using the contents of ".common.mk-version"; specifically
adjust the target for common.mk, its recipe that writes ".common.mk-version",
and the stamp logic around ".common.mk-version" so Make treats the target as
out-of-date when DEV_KIT_VERSION changes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
What
see opendefensecloud/dev-kit#15 for upstream PR
Summary by CodeRabbit