flux2: flux bootstrap error after upgrading flux CLI to v0.33.0

Describe the bug

Upgraded CLI with brew upgrade fluxcd/tap/flux then attempted to bootstrap the same way I do after every upgrade and receive an error:

✗ failed to reconcile Git repository "https://github.com/MyGitHub/flux-test": multiple errors occurred:
- PATCH https://api.github.com/repos/MyGitHub/flux-test: 400 Body should be a JSON object []
- PATCH https://api.github.com/repos/MyGitHub/flux-test: 400 Body should be a JSON object []

Steps to reproduce

brew upgrade fluxcd/tap/flux to get the latest flux CLI version, then attempt a cluster upgrade:

flux bootstrap github \
        --owner=MyGitHub \
        --repository=flux-test \
        --read-write-key \
        --reconcile \
        --branch=master \
        --path=cluster \
        --components-extra=image-reflector-controller,image-automation-controller

Expected behavior

Flux components on the cluster would be upgraded and any required changes committed back to git.

Screenshots and recordings

No response

OS / Distro

macOS 12.3.1

Flux version

v0.33.0

Flux check

✔ Kubernetes 1.21.13-eks-84b4fe6 >=1.20.6-0
► checking controllers
✔ helm-controller: deployment ready
► ghcr.io/fluxcd/helm-controller:v0.22.2
✔ image-automation-controller: deployment ready
► ghcr.io/fluxcd/image-automation-controller:v0.24.1
✔ image-reflector-controller: deployment ready
► ghcr.io/fluxcd/image-reflector-controller:v0.20.0
✔ kustomize-controller: deployment ready
► ghcr.io/fluxcd/kustomize-controller:v0.27.0
✔ notification-controller: deployment ready
► ghcr.io/fluxcd/notification-controller:v0.25.1
✔ source-controller: deployment ready
► ghcr.io/fluxcd/source-controller:v0.26.1
► checking crds
✔ alerts.notification.toolkit.fluxcd.io/v1beta1
✔ buckets.source.toolkit.fluxcd.io/v1beta1
✔ gitrepositories.source.toolkit.fluxcd.io/v1beta1
✔ helmcharts.source.toolkit.fluxcd.io/v1beta1
✔ helmreleases.helm.toolkit.fluxcd.io/v2beta1
✔ helmrepositories.source.toolkit.fluxcd.io/v1beta1
✔ imagepolicies.image.toolkit.fluxcd.io/v1beta1
✔ imagerepositories.image.toolkit.fluxcd.io/v1beta1
✔ imageupdateautomations.image.toolkit.fluxcd.io/v1beta1
✔ kustomizations.kustomize.toolkit.fluxcd.io/v1beta2
✔ ocirepositories.source.toolkit.fluxcd.io/v1beta2
✔ providers.notification.toolkit.fluxcd.io/v1beta1
✔ receivers.notification.toolkit.fluxcd.io/v1beta1
✔ all checks passed

Git provider

No response

Container Registry provider

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project’s Code of Conduct

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 16 (10 by maintainers)

Most upvoted comments

@souleb that PR works for me:

alex@riker:~/go/src/github.com/souleb/flux2|reconcile-repository ⇒  ./bin/flux bootstrap github --token-auth \
        --owner=MyOrg \
        --repository=flux-test \
        --read-write-key \
        --reconcile \
        --branch=master \
        --path=cluster \
        --components-extra=image-reflector-controller,image-automation-controller \
        --verbose 2>&1
Please enter your GitHub personal access token (PAT):
► connecting to github.com
► cloning branch "master" from Git repository "https://github.com/MyOrg/flux-test.git"
✔ cloned repository
► generating component manifests
✔ generated component manifests
✔ committed sync manifests to "master" ("65b62ae22febefb9a929065297a20acbb45fb2da")
► pushing component manifests to "https://github.com/MyOrg/flux-test.git"
✔ reconciled components
► determining if source secret "flux-system/flux-system" exists
► generating source secret
► applying source secret "flux-system/flux-system"
✔ reconciled source secret
► generating sync manifests
✔ generated sync manifests
✔ committed sync manifests to "master" ("069ed06ae045738e7f8cd74861c314d893675e6f")
► pushing sync manifests to "https://github.com/MyOrg/flux-test.git"
► applying sync manifests
✔ reconciled sync configuration
◎ waiting for Kustomization "flux-system/flux-system" to be reconciled
✔ Kustomization reconciled successfully
► confirming components are healthy
✔ helm-controller: deployment ready
✔ image-automation-controller: deployment ready
✔ image-reflector-controller: deployment ready
✔ kustomize-controller: deployment ready
✔ notification-controller: deployment ready
✔ source-controller: deployment ready
✔ all components are healthy