Skip to content

Add shared dev environment integration#313

Draft
mpryc wants to merge 1 commit into
medik8s:mainfrom
mpryc:add-dev-environment
Draft

Add shared dev environment integration#313
mpryc wants to merge 1 commit into
medik8s:mainfrom
mpryc:add-dev-environment

Conversation

@mpryc

@mpryc mpryc commented Jul 2, 2026

Copy link
Copy Markdown

Why we need this PR

Integrates the shared medik8s dev environment from medik8s/tools. Adding a small snippet to the Makefile gives all contributors access to make dev-* targets for local development and testing.

Changes made

  • Makefile: Added dev environment snippet at the end. Uses a local sibling ../tools checkout if available, otherwise shallow-clones the tools repo into .tools/ on first use.
  • .gitignore: Added .tools/ to ignore the auto-cloned copy.

Available targets after this change

make dev-setup              # Create Kind cluster (1 CP + 3 workers)
make dev-deploy             # Build, load image, install CRDs, deploy operator
make dev-describe           # Full summary (nodes, pods, CRs, events)
make dev-simulate-failure   # Stop kubelet on a worker -> triggers remediation
make dev-recover            # Restore all workers
make dev-teardown           # Destroy Kind cluster
make dev-help               # Show all dev targets

Also supports external clusters (OCP, etc.) with SKIP_KIND=true and ttl.sh ephemeral registry.

Which issue(s) this PR fixes

N/A — new functionality.

Test plan

  • Verified make dev-setup && make dev-deploy && make dev-describe works on Kind (podman)
  • Verified SKIP_KIND=true make dev-setup && SKIP_KIND=true make dev-deploy works on OCP
  • Full NHC + SNR remediation flow tested end-to-end

Summary by CodeRabbit

  • New Features

    • Added a shared development environment setup that can automatically use a nearby tools checkout or fetch one on first use.
    • Development workflows now load additional tooling when available, making local setup more convenient.
  • Chores

    • Updated ignore rules to exclude the local tools directory from version control.

@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mpryc
Once this PR has been reviewed and has the lgtm label, please assign clobrano for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@mpryc, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 97588422-961e-44ba-b3be-6a9e8c5c92d3

📥 Commits

Reviewing files that changed from the base of the PR and between 657c49a and 3eb79c6.

📒 Files selected for processing (2)
  • .gitignore
  • Makefile
📝 Walkthrough

Walkthrough

This PR adds a "Shared dev environment" bootstrap block to the Makefile that locates a sibling ../tools checkout or shallow-clones medik8s/tools into a local .tools/ directory, sets TOOLS_DIR/DEV_MK, and includes dev.mk. .gitignore is updated to exclude .tools/.

Changes

Shared dev tooling setup

Layer / File(s) Summary
Dev tools bootstrap and ignore rule
Makefile, .gitignore
Makefile defines TOOLS_DIR/DEV_MK, shallow-clones medik8s/tools into .tools/ when a shared ../tools checkout or dev.mk is missing, and non-fatally includes $(DEV_MK); .gitignore excludes the .tools/ directory.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: integrating a shared dev environment into the Makefile.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`:
- Around line 551-559: The tools bootstrap in the Makefile is happening during
parse time via the DEV_MK check and git clone call, so unrelated make goals can
trigger network access. Move the .tools/dev.mk download logic behind explicit
dev-related targets or a dedicated bootstrap target, and keep the existing
DEV_MK include path resolution in place so only those targets invoke the clone
when needed.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1d90f29e-2c05-439b-8417-3f2634dab25d

📥 Commits

Reviewing files that changed from the base of the PR and between 173a2b5 and 657c49a.

📒 Files selected for processing (2)
  • .gitignore
  • Makefile

Comment thread Makefile
@mpryc
mpryc force-pushed the add-dev-environment branch from 657c49a to db5722b Compare July 2, 2026 12:50
@mpryc

mpryc commented Jul 2, 2026

Copy link
Copy Markdown
Author

Depends-on: medik8s/tools#21

@openshift-ci

openshift-ci Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

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.

Include the medik8s/tools dev environment snippet in the Makefile.
Uses a local sibling checkout (../tools) if available, otherwise
shallow-clones the tools repo into .tools/ on first use.

Signed-off-by: Michal Pryc <mpryc@redhat.com>
@mpryc
mpryc force-pushed the add-dev-environment branch from db5722b to 3eb79c6 Compare July 9, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant