← Back to Pull requests

Switch to custom Vagrant boxes and Magefiles instead of Makefile #264

Closed
unknown closed this pull request without merging on Apr 27, 2023 20:10 UTC
View on GitHub
unknown unknown commented on Apr 27, 2023 12:29 UTC
Author

Features

This PR includes two features:

1. These are experimental Vagrant boxes which attempt to address issues like WinRM not starting, and boot timeouts, OS and VirtualBox guest additions update, and enable/disable VirtualBox features explicitly (for documentation, control, easier troubleshooting). These boxes have proved to be a working solution, and significantly speed up cluster provisioning for testing. Check the boxes repository for details: https://github.com/mloskot/sig-windows-dev-tools-boxes

2. Add Magefiles - https://magefile.org - as functional equivalent to the existing Makefile, but as a portable solution for all platforms supported by Go. Magefiles _remove requirement_ of use of WSL as a proxy providing GNU Make on Windows host, aks true windows support.

Tester's Quickstart (with Mage)

_TODO: This guide could be copied into the README.md before merge_

Warning: Currently tested on Windows host, but this procedure should (be made to) work on Linux, Mac OS too

1. Install latest VirtualBox 7.0, latest Vagrant, Go 1.20 and latest Mage. See updated README.md
2. Switch your local repo to this PR: gh pr checkout 264
3. Optionally, copy variables.yaml to variables.local.yaml and modify variables.local.yaml as you desire, for example:
- tweak RAM and CPUs for machines
- bump Kubernetes to 1.27
- bump Calico to 3.25.1
- bump containerd to 1.7.0
4. Launch PowerShell or Command Prompt and run mage -l to list all available Mage targets (as check mage works for you)
5. Run mage all | tee m.log or just mage | tee m.log to download required Kubernetes software, download Vagrant boxes (1 and 2), run Vagrant to provision the two-node cluster, run smoke tests (it is known the smoke tests may fail).
6. Run mage status in separate console.
As soon as Vagrant completes provisioning the two VM-s, open new console and start running mage status every couple of minutes to watch the cluster status. The mage status is a convenient proxy to execute sequence of

    vagrant status
    vagrant ssh controlplane -c 'kubectl get nodes'
    vagrant ssh controlplane -c 'kubectl get -A pods'
    

Alternatively, you can run vagrant ssh controlplane and inspect the cluster with kubectl.

Alternatively, you can download kubeconfig form the controlplane node to run any Kubernetes client directly from the Windows host:

    vagrant plugin install vagrant-scp
    vagrant scp controlplane:~/.kube/config ./swdt-kubeconfig
    kubectl --kubeconfig=./swdt-kubeconfig get nodes
    kubectl --kubeconfig=./swdt-kubeconfig get -A pods
    ...
    

8. Report back your results

------

My initial run logs https://gist.github.com/mloskot/2670e7e7331f90e390eb5a750de7bf78

Diff: 401 lines (+300 / -101) across 5 files Reviewer: jayunit100 Review duration: 461m
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 401 lines diff across 5 files
0.45
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.359
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #264"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 44.7% (MEDIUM) · Higher = larger blast radius
44.7%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 17.7% · Safe to merge
17.7%