← Back to Pull requests

Dead code hunt, deleted some unused files #243

Closed
unknown closed this pull request without merging on Apr 28, 2023 14:47 UTC
View on GitHub
unknown unknown commented on Apr 07, 2023 19:22 UTC
Author

Some unused scripts were deleted!

Script/Codes in SWDT and its usage

Hierarchy of SWDT repo with codes in it and their uses.

sig-windows-dev-tools/

    experiments/image-builder/

        overlays/

            vm-guest-tools.ps1 -- This is used by image-buils.sh

        image-build.sh -- An experimental script used to build a Windows node images from scratch
     forked/

        config.ps1 -- It is being used by node-service.ps1 for setting Env variables.

        node-service.ps1 -- Nowhere we are using (This is taken from main Calico folder).

        StartKubelet.ps1 -- It is used by SWDT/sync/windows/forked.sh that applies this file if the version of k8s is greater than 1.23 (This is taken from kubernetes-sigs/sig-windows-tools/kubeadm)
    
    kpng/ -- Consists yaml folders!


    sync/

        linux/
        
            antrea-0.sh -- Used by Vagrentfile to install Antrea to the cluster.

            calico-0.sh -- Used by vagrentfile that runs calico installer.

            controlplane.sh -- Used by Vagrentfile to setup the control plane.

            e2e.sh -- Used by Makefile to run e2e teste and also in wine2e.yaml.

        shared/ -- No script files present here just a README file with stub text. Deleted.

        windows/

            0-antrea.ps1 -- Used by Vagrentfile that downloads and installs components suchas NSSM, Antrea, and OpenSSL.

            0-calico.ps1 -- Used by Vagrentfiles and installs the calico networking plugins.

            0-kubelet.ps1 -- Nowhere used! Deleted.

            1-antrea.ps1 -- Used by Vagrentfile that installs and configure Antrea CNI plugin for k8s on windows node.

            1-calico.ps1 -- Used by vagrentfile that installs and starts calico

            forked.ps1 -- Used by Vagrentfile.

            ssh.ps1 -- Nowhere used! Deleted.
    
    build.sh -- Used by Makefile to build binaries.

    fetch.sh -- Used by Makefile

    Makefile 

    Vagrentfile 

Deleted files:

  • debug-power-shell-cmds

  • doubt

  • sync/linux/untitled

  • sync/shared/README

  • sync/windows/0-kubelet.ps1

  • sync/windows/forked.ps1
  • Diff: 273 lines (+204 / -69) across 3 files Reviewer: jayunit100 Review duration: 29964m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 273 lines diff across 3 files
    0.40
    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.336
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #243"
    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: 39.5% (MEDIUM) · Higher = larger blast radius
    39.5%
    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: 15.6% · Safe to merge
    15.6%