# v3.6 to 3.7

## Breaking Changes

<!-- Any breaking behavior change:
Any removal or change of default behavior that requires user action -->

### Kustomize patches that set cluster cache environment variables

> [!WARNING]
> If you set any of the following environment variables on the application controller with a
> Kustomize strategic merge patch that uses `value`, Kubernetes rejects the updated controller
> StatefulSet or Deployment, and the controller stays on the previous version. The controller
> manifests now read these variables from `argocd-cmd-params-cm`, so your patch gives the same
> variable a second source.

Before you upgrade, move each setting to its `argocd-cmd-params-cm` key and remove it from the
patch:

| Environment variable | `argocd-cmd-params-cm` key |
|---|---|
| `ARGOCD_CLUSTER_CACHE_RESYNC_DURATION` | `controller.cluster.cache.resync.duration` |
| `ARGOCD_CLUSTER_CACHE_WATCH_RESYNC_DURATION` | `controller.cluster.cache.watch.resync.duration` |
| `ARGOCD_CLUSTER_SYNC_RETRY_TIMEOUT_DURATION` | `controller.cluster.cache.sync.retry.timeout` |
| `ARGOCD_CLUSTER_CACHE_LIST_PAGE_SIZE` | `controller.cluster.cache.list.page.size` |
| `ARGOCD_CLUSTER_CACHE_LIST_PAGE_BUFFER_SIZE` | `controller.cluster.cache.list.page.buffer.size` |
| `ARGOCD_CLUSTER_CACHE_LIST_SEMAPHORE` | `controller.cluster.cache.list.semaphore` |
| `ARGOCD_CLUSTER_CACHE_ATTEMPT_LIMIT` | `controller.cluster.cache.attempt.limit` |
| `ARGOCD_CLUSTER_CACHE_RETRY_USE_BACKOFF` | `controller.cluster.cache.retry.use.backoff` |

### `HEAD` no longer resolves to a branch named `HEAD`

If a repository has a branch literally named `HEAD` (`refs/heads/HEAD`), a `targetRevision` of `HEAD`
(or an empty `targetRevision`) previously resolved to that branch. It now follows the repository's
symbolic `HEAD` to the tip of the default branch, as Git does.

**Impact:**

- Applications and ApplicationSets tracking `HEAD` in such a repository will switch from the
  `refs/heads/HEAD` branch to the default branch, and may sync different manifests.
- To keep tracking the branch, set `targetRevision: refs/heads/HEAD`. Otherwise, consider deleting the
  branch with `git push origin --delete refs/heads/HEAD`.

See [Branches named `HEAD`](../../user-guide/tracking_strategies.md#branches-named-head).

## Behavioral Improvements / Fixes

### Metrics can be pushed via OTLP

The API server, application controller and repo server can now push the metrics served at
`/metrics` to an OpenTelemetry collector, controlled by `otlp.metrics.enabled` and
`otlp.metrics.interval` in `argocd-cmd-params-cm`. It is off by default; see
[Pushing metrics via OTLP](../observability.md#pushing-metrics-via-otlp).

Two changes apply to deployments that already set `--otlp-address` for tracing:

- Spans now carry a `service.instance.id` resource attribute set to the pod hostname, in
  addition to `service.name`. Collector pipelines that derive metrics from spans (for example the
  `spanmetrics` connector with its default resource keys) will see series split per pod. Drop the
  attribute in the collector, or configure the connector's resource key attributes, if that is
  unwanted.
- On shutdown the tracer now drains its span queue with a 10s timeout instead of aborting on the
  cancelled process context, so the last batch of spans is exported rather than dropped.

### ApplicationSet webhook responses now match the API server webhook

The ApplicationSet controller's webhook endpoint now handles requests the same way as the API
server's `/api/webhook` endpoint:

- Payloads larger than the `webhook.maxPayloadSizeMB` value in the `argocd-cm` ConfigMap (default
  50MB) are rejected with `400 Bad Request`. Previously, the ApplicationSet webhook had no payload
  size limit.
- A GHCR event that fails signature verification is rejected with `401 Unauthorized` instead of
  `400 Bad Request`.
- When a payload cannot be parsed, the response body is a generic `Webhook processing failed`
  message. The parser error is logged by the ApplicationSet controller instead of being returned to
  the caller.

If you monitor the ApplicationSet webhook's response codes or bodies, update any checks that relied
on the previous behavior.

### Custom Healthchecks Added

- A bundled health check for Vault Secrets Operator's `secrets.hashicorp.com/VaultStaticSecret`
  resource. It reports `Healthy` when the `Healthy` condition is `True` and `Degraded` with the
  sync error when it is `False`, and stays `Progressing` until the operator has reconciled the
  current generation. With operator versions before 1.0.0, which set no conditions, it reports
  `Healthy` once `status.lastGeneration` matches the resource's generation.
- A bundled health check for the Keycloak operator's `k8s.keycloak.org/KeycloakRealmImport`
  resource. It reports `Healthy` when the `Done` condition is `True`, `Progressing` while the
  import Job runs or the operator waits for the Keycloak StatefulSet to be created and ready, and
  `Degraded` with the operator's message when the `HasErrors` condition reports any other error,
  such as a missing `Keycloak`. `Healthy` means that the import Job completed, not that the
  current realm spec was applied, since Keycloak skips the import when the realm already exists.
  A failed import Job is reported as `Progressing`, because the Job may still retry and the
  operator's status doesn't show when its retries are used up. A realm import whose Job keeps
  failing stays `Progressing` and holds its sync wave, while the Job, shown under the realm
  import, turns `Degraded` once it reaches its backoff limit.

### Built-in actions for gitops-promoter rollback

Argo CD now includes built-in resource actions for rolling back a
[gitops-promoter](https://gitops-promoter.readthedocs.io/en/latest/advanced-usage/rolling-back/)
environment and releasing the promotion block afterward.

| Custom Resource | Action | What it does |
| --- | --- | --- |
| PromotionStrategy | `rollback-environment` | Creates a RestoreActiveCommit for the environment branch and hydrated SHA you provide |
| RestoreActiveCommit | `release-environment-block` | Sets `spec.blockEnvironment` to false after the rollback has recorded `status.activeSha` |

`promotionStrategyRef`, `branch`, and `sha` are immutable. Releasing the block patches the live
RestoreActiveCommit. It does not delete the object. Deleting it while the block is still set does
not stamp `Promoter-restore-unblocked-at`.

A non-empty `status.activeSha` only means that the restore commit is on the active branch. Before
you release the block, check that the RestoreActiveCommit is `Ready`, that the restored commit has
synced, and that the workloads are healthy. Releasing the block lets promotions to the environment
resume.

Grant these Argo CD action permissions:

- `action/promoter.argoproj.io/PromotionStrategy/rollback-environment`
- `action/promoter.argoproj.io/RestoreActiveCommit/release-environment-block`

The AppProject must permit the `PromotionStrategy` and `RestoreActiveCommit` resources. Both
actions write a `RestoreActiveCommit`: rollback creates one, and release patches it. Argo CD does
that with the destination cluster's credentials, so that cluster identity needs Kubernetes `create`
and `patch` permission for `RestoreActiveCommit`. See
[resource actions](../resource_actions.md#built-in-actions).

## Other Changes

### Revoked token resync interval

`argocd-server` now reloads revoked tokens from Redis every 5 minutes instead of every 15 seconds. The interval is configurable with `ARGOCD_SESSION_REVOKED_TOKEN_RESYNC_DURATION`. See [Revoked token resync](../user-management/index.md#revoked-token-resync).

### Cluster cache settings in `argocd-cmd-params-cm`

You can now configure the application controller's cluster cache with `argocd-cmd-params-cm` keys
or controller flags. The environment variables you use today keep working, unless you set them
with a Kustomize strategic merge patch that uses `value` (see Breaking Changes). See
[argocd-cmd-params-cm.yaml](../argocd-cmd-params-cm-yaml.md) for the `controller.cluster.cache.*`
keys and their defaults.

The duration flags (`--cluster-cache-resync-duration`, `--cluster-cache-watch-resync-duration`,
`--cluster-cache-sync-retry-timeout` and `--cluster-cache-events-processing-interval`) take Go
duration strings such as `10m` or `12h`. The environment variables and `argocd-cmd-params-cm` keys
also accept days (for example `1d`), but the flags do not.

If you install Argo CD with the Helm chart, keep setting these values with `controller.env` until
the chart supports the new keys.

### `--http-retry-max` now applies to TLS (and `--grpc-web`) connections

Prior to v3.7, the CLI's global `--http-retry-max` flag had no effect on TLS
connections (the default) — the retryable HTTP transport was silently discarded
during TLS setup, so retries only ever applied to `--plaintext` connections.
This is now fixed, so `--http-retry-max` retries transient failures (connection
errors, HTTP `429`, and `5xx` except `501`) for HTTP requests over plaintext or TLS,
including `--grpc-web`. (Native gRPC connections use a separate, built-in retry
interceptor that this flag does not configure.)

The flag still defaults to `0` (no retries), so behavior is unchanged unless you
have opted in. If you do set `--http-retry-max`, be aware:

> [!WARNING]
> - Retries apply to **all** gRPC-web requests, including non-idempotent ones.
>   gRPC-web tunnels every RPC as an HTTP `POST`, so the retry layer cannot
>   distinguish reads from writes. A transient `5xx` returned *after* the server
>   has already processed a mutating request (e.g. `argocd account generate-token`,
>   `argocd app actions run`) will cause the request to be re-sent. Prefer enabling
>   the flag for idempotent/declarative operations (e.g. `app set`/`app sync`), and
>   consider this before enabling it globally for mutating commands.
> - Retries add latency ahead of any command-level timeout. Backoff is capped at
>   10s per attempt, but `--http-retry-max` attempts still accumulate; size it with
>   your `--timeout` values (e.g. `app sync`/`app wait`) in mind.
