I'm trying to upgrade from Airbyte Self-Managed Co...
# ask-ai
k
I'm trying to upgrade from Airbyte Self-Managed Community version 1.3.1 to Airbyte Self-Managed Community version 1.7.1 and I'm receiving the error: airbyte-bootloader: An error occurred on connector rollout object creation unable to install airbyte chart: unable to install helm: cannot patch "airbyte-abctl-workload-api-server" with kind Deployment: The order in patch list: [map[name:AIRBYTE_EDITION valueFrommap[configMapKeyRefmap[key:AIRBYTE_EDITION name:airbyte-abctl-airbyte-env]]] map[name:MICROMETER_METRICS_STEP valueFrommap[configMapKeyRefmap[key:MICROMETER_METRICS_STEP name:airbyte-abctl-airbyte-env]]] map[name:MICROMETER_METRICS_OTLP_ENABLED valueFrommap[configMapKeyRefmap[key:MICROMETER_METRICS_OTLP_ENABLED name:airbyte-abctl-airbyte-env]]] map[name:OTEL_COLLECTOR_ENDPOINT valueFrommap[configMapKeyRefmap[key:OTEL_COLLECTOR_ENDPOINT name:airbyte-abctl-airbyte-env]]] map[name:MICROMETER_METRICS_STATSD_ENABLED valueFrommap[configMapKeyRefmap[key:MICROMETER_METRICS_STATSD_ENABLED name:airbyte-abctl-airbyte-env]]] map[name:SEGMENT_WRITE_KEY valueFrommap[configMapKeyRefmap[key:SEGMENT_WRITE_KEY name:airbyte-abctl-airbyte-env]]] map[name:TRACKING_STRATEGY valueFrommap[configMapKeyRefmap[key:TRACKING_STRATEGY name:airbyte-abctl-airbyte-env]]] map[name:AB_JWT_SIGNATURE_SECRET valueFrommap[secretKeyRefmap[key:jwt-signature-secret name:airbyte-auth-secrets]]] map[name:AB_JWT_SIGNATURE_SECRET valueFrommap[secretKeyRefmap[key:jwt-signature-secret name:airbyte-auth-secrets]]] map[name:MICRONAUT_ENVIRONMENTS valueFrommap[configMapKeyRefmap[key:WORKERS_MICRONAUT_ENVIRONMENTS name:airbyte-abctl-airbyte-env]]] map[name:AIRBYTE_API_AUTH_HEADER_NAME value:X-Airbyte-Auth] map[name:AIRBYTE_API_AUTH_HEADER_VALUE value:Internal worker] map[name:API_AUTHORIZATION_ENABLED value:true] map[name:AIRBYTE_INSTALLATION_ID value:6604aa1a-ebcb-4fdb-b68b-73464b230a34]] doesn't match $setElementOrder list: [map[name:AIRBYTE_VERSION] map[name:AIRBYTE_EDITION] map[name:INTERNAL_API_HOST] map[name:AIRBYTE_API_HOST] map[name:MICROMETER_METRICS_ENABLED] map[name:MICROMETER_METRICS_STEP] map[name:MICROMETER_METRICS_OTLP_ENABLED] map[name:OTEL_COLLECTOR_ENDPOINT] map[name:MICROMETER_METRICS_STATSD_ENABLED] map[name:MICROMETER_METRICS_STATSD_FLAVOR] map[name:SEGMENT_WRITE_KEY] map[name:STATSD_HOST] map[name:STATSD_PORT] map[name:TEMPORAL_HOST] map[name:TRACKING_STRATEGY] map[name:WORKLOAD_API_BEARER_TOKEN] map[name:AB_JWT_SIGNATURE_SECRET] map[name:MICRONAUT_ENVIRONMENTS] map[name:AB_JWT_SIGNATURE_SECRET] map[name:AIRBYTE_API_AUTH_HEADER_NAME] map[name:AIRBYTE_API_AUTH_HEADER_VALUE] map[name:API_AUTHORIZATION_ENABLED] map[name:DATABASE_HOST] map[name:DATABASE_PORT] map[name:DATABASE_DB] map[name:DATABASE_USER] map[name:DATABASE_PASSWORD] map[name:DATABASE_URL] map[name:AIRBYTE_INSTALLATION_ID] map[name:JOB_KUBE_MAIN_CONTAINER_IMAGE_PULL_SECRET] map[name:SYNC_JOB_INIT_RETRY_TIMEOUT_MINUTES] map[name:SYNC_JOB_MAX_ATTEMPTS] map[name:SYNC_JOB_MAX_TIMEOUT_DAYS] map[name:SYNC_JOB_RETRIES_COMPLETE_FAILURES_MAX_SUCCESSIVE] map[name:SYNC_JOB_RETRIES_COMPLETE_FAILURES_MAX_TOTAL] map[name:SYNC_JOB_RETRIES_PARTIAL_FAILURES_MAX_SUCCESSIVE] map[name:SYNC_JOB_RETRIES_PARTIAL_FAILURES_MAX_TOTAL]] && cannot patch "airbyte-abctl-workload-launcher" with kind Deployment: Deployment.apps "airbyte-abctl-workload-launcher" is invalid: spec.template.spec.containers[0].env[40].valueFrom: Invalid value: "": may not be specified when
value
is not empty
k
The error you are encountering during your upgrade from Airbyte Self-Managed Community 1.3.1 to 1.7.1 is related to a known issue with Helm patching and environment variable ordering in Kubernetes Deployments. Specifically, the error:
Copy code
unable to install airbyte chart: unable to install helm: cannot patch "airbyte-abctl-workload-api-server" with kind Deployment: The order in patch list: ... doesn't match $setElementOrder list: ...
This issue has been reported multiple times in the Airbyte community and GitHub issues. It is typically caused by: - Duplicate environment variable entries (e.g.,
AB_JWT_SIGNATURE_SECRET
appears twice). - The order of environment variables in the patch list not matching the expected
$setElementOrder
in the Kubernetes resource, which causes Helm to fail when applying the patch. Key points from the knowledge sources: - This is a known bug, and the Airbyte team is working on a fix. The problem is especially prevalent when upgrading or re-installing with
abctl
or via Helm, and when custom environment variables are set in your
values.yaml
file or through other means [[source](https://github.com/airbytehq/airbyte/issues/60918)]. - Users have reported that removing custom
env_vars
from their
values.yaml
(especially those not strictly required) can sometimes resolve the issue [[source](https://github.com/airbytehq/airbyte/issues/62519)]. - There are also reports of duplicate environment variable definitions in the Helm chart templates themselves, which can cause this error. For example,
AB_JWT_SIGNATURE_SECRET
was found twice in the workload API server deployment template, and a PR was submitted to fix this [[source](https://github.com/airbytehq/airbyte/issues/58591)]. - The Airbyte documentation acknowledges this as a "Status: Fixing" issue, and there is no official workaround yet other than waiting for a patch or manually editing your deployment manifests to remove duplicates or unnecessary customizations [[source](https://docs.airbyte.com/platform/deploying-airbyte/troubleshoot-deploy#failed-to-create-patch-order-in-patch-list)]. What you can try: 1. Check for duplicate environment variables in your
values.yaml
or any overlays you are using, and remove any unnecessary or duplicate entries. 2. Remove custom environment variables (especially those related to metrics or JWT secrets) from your configuration and try the upgrade again. 3. If you are using ArgoCD or another GitOps tool, ensure that your manifests do not introduce additional environment variable entries or override the order. 4. If you are blocked and need an immediate workaround, you may need to manually patch the deployment or use a tool like Kustomize to ensure the environment variable order matches what Kubernetes expects, as suggested by some users in the GitHub issues [[source](https://github.com/airbytehq/airbyte/issues/58591)]. Summary: This is a known and currently unresolved issue with Airbyte upgrades involving Helm and environment variable ordering. The best immediate steps are to check for and remove duplicate or unnecessary environment variables in your configuration. If the problem persists, you may need to wait for an official fix from the Airbyte team. If you need more detailed, step-by-step guidance, please provide your
values.yaml
or any custom configuration you are using, and I can help review it for problematic entries.