Skip to content

chore(deps): argo-cd v2->v3 + k8s 1.34 migration and Dependabot patches - #7011

Closed
prkhrkat wants to merge 0 commit into
mainfrom
dependabot-safe-patches-k8s134
Closed

prkhrkat wants to merge 0 commit into
mainfrom
dependabot-safe-patches-k8s134

Conversation

@prkhrkat

Copy link
Copy Markdown
Contributor

Fixes #6839

Targets the cluster running k8s 1.35.6 / Argo CD 3.4.6.

Scope note: this branch is stacked on k8s-1.34-argocd-v3, so the PR carries
the argo-cd v2→v3 + k8s 1.34 migration (5d2362369) as well as the Dependabot
round. It is current with main.

Dependency bumps

from to
argo-cd/v3 3.3.12 3.4.7 — matches the cluster's 3.4.6 server
kin-openapi ⚠️ critical 0.132.0 0.144.0
google.golang.org/grpc 1.79.3 1.82.1
cel-go 0.26.0 0.29.0
go-git/v5 5.19.1 5.19.2
oras-go/v2 2.6.1 2.6.2
oapi-codegen/v2 2.4.2 2.7.1

common-lib / authenticator point at devtron-services
v0.0.0-20260819081723-33e7db5be0e5 (head of devtron-labs/devtron-services#401),
so the two PRs are meant to land together.

argo-cd v3.4 required two non-obvious changes

1. gitops-engine moved in-repo to github.com/argoproj/argo-cd/gitops-engine.
Argo CD resolves it with a local replace ./gitops-engine, which does not apply
to consumers, and the version it requires does not exist at the new path — so
go mod tidy fails outright. Pinned via replace to the v3.4.7 tag revision and
repointed our 7 importing files. The old standalone github.com/argoproj/gitops-engine
is dropped entirely.

2. SyncPolicyAutomated.{Prune,SelfHeal,AllowEmpty} became *bool, and
Enabled *bool was added. One real code change, in
client/argocdServer/helper.go. Enabled == nil still means automated sync is
on, so behaviour is preserved — verified against the live CRD rather than assumed
(see below).

3. Dropped the filepath-securejoin replace. main pins it to v0.3.6 because
argo-cd/v2 needs the old MkdirAll signature; argo-cd v3 requires v0.6.1,
so that pin is wrong on this branch. Our v0.4.1 => form was already inert (the
require is v0.6.1, so the left-hand side never matched) — removed rather than left
as dead weight.

Build fixes

  • Dockerfile / DockerfileEA: golang:1.25.6 → 1.26.6. gitops-engine
    requires go 1.26.0, so the go directive moved and the image build failed. Both
    tags resolve to the same Debian trixie base (verified by comparing per-arch
    digests), so no glibc shift for the ubuntu:24.04 runtime — which matters
    because that build has CGO enabled.
  • Dropped a stray import "C" in pkg/config/configDiff/bean/bean.go. It had no
    cgo preamble and used no C symbol, but it made the package cgo-only, so any
    CGO-disabled build silently excluded every file in it
    (build constraints exclude all Go files). Invisible in a native macOS build;
    breaks GOOS=linux.

helm 3.20.2 deliberately not taken

It requires k8s 0.35.1, and no Argo CD release builds against k8s 0.35 (3.4.x
pins 0.34, 3.5.x pins 0.36). k8s stays at 0.34.9, one minor behind the 1.35.6
cluster — a supported skew. Deferred.

Also still open, no upstream fix: go-pg/pg v8.

Verification

  • Vendor-mode build of all non-mock packages for darwin and GOOS=linux;
    devtron binary links
  • Against the live k8s 1.35.6 / Argo CD 3.4.6 cluster: discovery negotiated,
    core/v1 + apps/v1 + batch/v1 + networking/v1 + rbac/v1 all listed. An
    Application built from the v3.4.7 Go types — using the exact shape
    helper.go produces — was accepted by the real CRD via server-side dry-run
    and decoded back intact (automated=true prune=true). Nothing persisted.
  • Devtron's own code hardcodes only apps/v1 and batch/v1; both are served by
    1.35.6.

🤖 Generated with Claude Code

@bito-code-review

Copy link
Copy Markdown

Bito Automatic Review Skipped - PR Too Large

Bito didn't auto-review this PR because it exceeds the size limits of the free plan.To review large pull requests, please upgrade to a paid plan here.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
D Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Comment thread .github/workflows/hotfix-main-pr.yaml Fixed
Comment thread .github/workflows/update-release-notes.yml Fixed
Comment thread .github/workflows/update-release-notes.yml Fixed
Comment thread .github/workflows/hotfix-main-pr.yaml Fixed
Comment thread .github/workflows/tag-patch-incre.yaml Fixed

@github-advanced-security github-advanced-security AI 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.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@github-advanced-security github-advanced-security AI 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.

SonarCloud found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@Ash-exp Ash-exp closed this Sep 22, 2026
@Ash-exp
Ash-exp force-pushed the dependabot-safe-patches-k8s134 branch from dc87224 to d413bb1 Compare September 22, 2026 19:04
@sonarqubecloud

Copy link
Copy Markdown

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.

Bug: Security vulnerabilities in devtron

3 participants