Skip to content

refactor(ci): convert managed-policy e2e wrapper to Go - #1559

Merged
skevetter merged 2 commits into
mainfrom
refactor/ci-managed-policy-go
Oct 19, 2026
Merged

skevetter merged 2 commits into
mainfrom
refactor/ci-managed-policy-go

Conversation

@skevetter

@skevetter skevetter commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Converts hack/run-managed-policy-e2e.sh into the Go subcommand managed-policy-e2e in hack/microsandbox. The script is deleted. A non-Linux stub reports the command as unsupported.

Why

Moves the shell wrapper's mount-namespace, overlayfs, and policy-install logic into the Go CLI that already drives the other microsandbox suites. Same invariants and order; stderr messages unchanged.

Deviations from the script:

  • Lowercase fixture_root, namespace_id_file, and parent_mount_namespace exports are dropped. No consumer reads them.
  • hasOverlayMount requires upper and work on the same mountinfo line. The awk version accumulated them across lines.
  • The non-Linux stub lives in its own file, not a shared one.

Size: non-test changed lines against base are 521, above the 300-line target. Most of it is the new 347-line managed_policy_linux.go, plus the 96-line script deletion. The author accepted the overrun.

Open PR #1492 edits the same paths-filter block in pr-ci.yml, so a trivial rebase conflict is expected.

Validation

  • mise run cli:format: exit 0
  • mise run cli:lint:ci (host): 0 issues
  • GOOS=linux golangci-lint run ./hack/microsandbox/...: 0 issues
  • go vet for linux, darwin, windows: clean
  • Linux container (golang:1.26): go vet and go test -race -count=1 ./hack/microsandbox/ pass
  • Darwin go test -race -count=1 ./hack/microsandbox/: pass

Real unshare/overlayfs execution is covered only by CI, because the local host lacks Linux namespaces. The stages are tested through fakes.

CodeRabbit CLI

66e818d3e: 0 findings over 8 reviewed files. The rerun on 326709e5d was rate-limited (free tier, about 9 minutes until reset), so the current head has no CodeRabbit result yet.

Auto-merge

Not enabled. Draft PR for human review.

Next

@skevetter skevetter added the ci-refactor CI/e2e refactor label Oct 18, 2026
@netlify

netlify Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 326709e
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6ad5197ebb8fe7eec5ce5537

@netlify

netlify Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 326709e
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6ad5197e2a192082cc5ae8c6

@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 37 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f0dafc6d-8dcc-4bd3-b353-a1eabbafa945
📥 Commits

Reviewing files that changed from the base of the PR and between 66837e2 and 326709e.

📒 Files selected for processing: 8
  • .github/workflows/pr-ci.yml
  • hack/microsandbox/main.go
  • hack/microsandbox/managed_policy_linux.go
  • hack/microsandbox/managed_policy_other.go
  • hack/microsandbox/managed_policy_test.go
  • hack/microsandbox/run.go
  • hack/microsandbox/run_test.go
  • hack/run-managed-policy-e2e.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@skevetter
skevetter marked this pull request as ready for review October 19, 2026 02:20
@mergify

mergify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@skevetter

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@skevetter
skevetter merged commit b418898 into main Oct 19, 2026
199 of 201 checks passed
@skevetter
skevetter deleted the refactor/ci-managed-policy-go branch October 19, 2026 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-refactor CI/e2e refactor size/xl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant