Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot fetch remote branch: EOF #422

Closed
PierreBart opened this issue Aug 24, 2022 · 1 comment · Fixed by #423
Closed

cannot fetch remote branch: EOF #422

PierreBart opened this issue Aug 24, 2022 · 1 comment · Fixed by #423
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Milestone

Comments

@PierreBart
Copy link
Contributor

Describe the bug

After upgrading Flux from v2.29.5 to v0.32.0, the Image Automation controller throws the following error:

{"error":"cannot fetch remote branch: EOF", "level":"error", "logger":"controller.imageupdateautomation", "msg":"Reconciler error", "name":"staging-image-update", "namespace":"flux2", "reconciler group":"image.toolkit.fluxcd.io", "reconciler kind":"ImageUpdateAutomation", "ts":"2022-08-24T12:42:28.576Z"}

This ImageUpdateAutomation object is deployed on the cluster:

apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImageUpdateAutomation
metadata:
  name: staging-image-update
  namespace: flux2
spec:
  git:
    checkout:
      ref:
        branch: master
    commit:
 [...]
    push:
      branch: master
  interval: 1m0s
  sourceRef:
    kind: GitRepository
    name: flux2
  update:
    path: ./apps/staging
    strategy: Setters

I am facing the same issue in v0.31.5 but not in v0.30.2.

Expected behavior

The Image Automation controller throws no error.

Kubernetes version

GKE 1.23.8

Git provider

Gitlab private repository.

Additional context

In Slack, @pjbgf noticed I use the same branch for pushing and pulling the sources in the ImageUpdateAutomation definition. He recommended I remove the push.branch field from the spec and that did fix the error.

@pjbgf pjbgf added the bug Something isn't working label Aug 24, 2022
@pjbgf pjbgf added this to the GA milestone Aug 24, 2022
@pjbgf pjbgf added help wanted Extra attention is needed good first issue Good for newcomers labels Aug 24, 2022
@pjbgf
Copy link
Member

pjbgf commented Aug 24, 2022

Thank you @PierreBart for reporting the issue.

I suggest we fix this by ignoring the push branch when:

  • Branch ref is being used.
  • The checkout branch is the same as push branch.

For reference, that logic resides at:

@pjbgf pjbgf moved this to Since Last Dev Meeting in Maintainers' Focus Aug 25, 2022
@pjbgf pjbgf moved this from Since Last Dev Meeting to Done in Maintainers' Focus Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants