hack/setup-dev-base.sh: Add Docker daemon and resource pre-flight validation#7281
hack/setup-dev-base.sh: Add Docker daemon and resource pre-flight validation#7281Krishiv-Mahajan wants to merge 5 commits intokarmada-io:masterfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Code Review
This pull request enhances the development setup script by adding pre-flight checks for the Docker daemon's status and resource allocation. This is a valuable improvement that will help developers identify environment issues early. The implementation is straightforward. I've added a couple of suggestions to improve the robustness of the resource checks against potential empty values, preventing script failures in edge cases.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7281 +/- ##
==========================================
+ Coverage 42.02% 42.03% +0.01%
==========================================
Files 874 874
Lines 53547 53547
==========================================
+ Hits 22502 22509 +7
+ Misses 29353 29346 -7
Partials 1692 1692
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds Docker pre-flight checks to hack/setup-dev-base.sh so the script fails fast when Docker isn’t usable and can warn when Docker Desktop resources are under-provisioned, improving the local dev setup experience (notably on macOS).
Changes:
- Verify Docker daemon connectivity early (with OS-aware guidance on failure).
- Inspect Docker-reported memory/CPU and accumulate warnings when below recommended thresholds.
- Print collected Docker resource warnings.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
2f05ea2 to
2a2dddb
Compare
Signed-off-by: Krishiv-Mahajan <mahajankrishiv10@gmail.com>
Signed-off-by: Krishiv-Mahajan <mahajankrishiv10@gmail.com>
…hmetic errors Signed-off-by: Krishiv-Mahajan <mahajankrishiv10@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Krishiv-Mahajan <mahajankrishiv10@gmail.com>
Signed-off-by: Krishiv-Mahajan <mahajankrishiv10@gmail.com>
2a2dddb to
65b1ee7
Compare
What type of PR is this?
/kind bug
What this PR does / why we need it:
The script only verified that the Docker binary existed via util::cmd_must_exist "docker" but did not validate that the Docker daemon was actually running or that sufficient resources were allocated. On macOS, Docker Desktop must be started manually — the CLI can exist without the daemon running. This caused the script to proceed through all setup steps and fail much later at util::create_cluster with a cryptic socket error, wasting the user's time.
This PR adds a pre-flight validation block that:
Which issue(s) this PR fixes:
Fixes #7280
Part of #7269
Special notes for your reviewer:
The resource check is a warning only — it does not hard fail — to avoid blocking users who may have intentionally constrained their Docker Desktop resources.
Does this PR introduce a user-facing change?:
release
hack/local-up-karmada.sh: Added pre-flight Docker daemon and resource validation to surf