← Back to Pull requests

CNF-26741: Deprecate deployer #5987

Open
unknown opened this pull request with 382 lines diff across 4 files
View on GitHub
unknown unknown commented on Nov 01, 2026 11:57 UTC
Author

Summary

The operator still pulled a handful of packages from the external
github.com/k8stopologyawareschedwg/deployer module, even though PR #6010 had already
internalized most of the deployer under pkg/numaresourcesoperator/. This PR finishes the
job: it relocates the already in-tree packages to their final homes, internalizes the
remaining external packages, drops the external module entirely, and trims the result down
to the surface the operator actually uses. Everything deployer-derived now lives under
internal/ (or beside its only consumer).

There is no functional change - this is a move/cleanup. Each commit compiles on its
own, so the history is bisectable.

Commits

1. AA: Relocate internalized deployer packages to internal/


Moves the packages PR #6010 placed under pkg/numaresourcesoperator/ to where they
belong, next to their consumers:
  • images -> existing pkg/images

  • objectupdate/find.go -> existing pkg/objectupdate

  • assets, flagcodec, manifests, options, platform, objectupdate/{ocp,rbac,rte}

  • -> internal/ (no existing counterpart, operator-private)

    All importers are repointed. The external deployer module is still vendored and consumed
    at this stage.

    2. AA: Remove external deployer module dependency


    Copies the remaining external deployer packages in tree and folds them into their
    natural homes:
  • client, kubeletconfig, nodes, environment helpers -> internal/clientutil

  • validators -> internal/validator

  • deployment-wait helper -> merged into the existing internal/wait
  • Repoints every importer and drops the module from go.mod, go.sum, and vendor/. The
    copied files are brought in verbatim - packages that are copied here only to be trimmed
    in the next commit are not pre-emptively edited.

    Docs are updated in this commit, where the dependency removal makes them true:

  • ARCHITECTURE.md no longer describes the deployer as an external dependency and notes

  • the code is now internalized under internal/.
  • .snyk exclude is repointed from the dropped vendor/.../deployer/.../kubeletconfig

  • path to internal/clientutil/kubeletconfig/*, preserving the existing scan-exclusion
    behaviour.

    3. AA: Integrate deployer libraries


    The copied packages carried the deployer's full standalone API. Trims each
    deployer-derived package down to the surface the operator actually calls, and drops the
    types, functions, and files left entirely unused (clientutil/kubeletconfig,
    validator/clusterversion.go).

    4. AA: Simplify deployer-derived APIs


    The validator code is consumed only by nrovalidate, so keeping a standalone
    internal/validator package is needless indirection. Moves its remaining pieces beside
    that tool under nrovalidate/validator and drops the now-redundant wrapper import from the
    callers.

    Testing

  • make lint - 0 issues

  • make test-unit - pass

  • make binary-all - all binaries build

  • make verify-generated - clean

  • go vet ./... - clean (per commit)

  • go mod verify - all modules verified
  • Diff: 382 lines (+286 / -96) across 4 files Reviewer: shajmakh Review duration: 43868m
    All Vouch review confidence checks passed
    Residual risk 0.37 = Change Risk (0.66) × (1 − Review Confidence (0.44)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.66 · 382 lines diff across 4 files
    0.66
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    44%
    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.356
    Shallow Review Depth shallow_review_depth
    0.344
    Sensitive Paths sensitive_paths
    0.066
    Real PR Conversation Timeline
    1 comments
    "Review active on #5987"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: medium confidence: 44.2% reviewed sensitive_module
    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: 66.1% (HIGH) · Higher = larger blast radius
    66.1%
    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: 44.2% · Lower = rushed or shallow review
    44.2%
    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: 36.9% · Moderate risk
    36.9%