Flux: Improve error message of `fluxctl release`: 'Error: no changes made in repo'

Created on 10 Feb 2020  路  3Comments  路  Source: fluxcd/flux

Describe the bug

When using the fluxctl release command to release a new image version the command fails with 'Error: no changes made in repo' and does not release the new image.

To Reproduce

Steps to reproduce the behaviour:

  1. Run the below commands to ensure flux has detected the new image:
    fluxctl list-images --k8s-fwd-ns fluxcd --workload default:helmrelease/nginx-demo-dev
    WORKLOAD CONTAINER IMAGE CREATED
    default:helmrelease/nginx-demo-dev chart-image nginx-demo-app
    | 11c09637c5a0e8335a4b19ecaccfb096c52451f3 10 Feb 20 14:38 UTC
    '-> 446fa8d69e8a50a96e975612dc2f3dbe7302b8a0 17 Jan 20 10:32 UTC
    7093681a314b612db5afd3fed98a4d07a9bd8d68 17 Jan 20 09:42 UTC
  1. Run the below commands to release the image:
    NAMESPACE="default"
    IMAGE_NAME="nginx-demo-app"
    IMAGE_VERSION="11c09637c5a0e8335a4b19ecaccfb096c52451f3"
    fluxctl release --k8s-fwd-ns fluxcd --workload=${NAMESPACE}:helmrelease/${IMAGE_NAME} --update-image=${IMAGE_NAME}:${IMAGE_VERSION}
    Submitting release ...
    Error: no changes made in repo
    Run 'fluxctl release --help' for usage.

Expected behavior

The new image version is released and config is written back to the git repo.

Logs
ts=2020-02-10T15:06:44.096271122Z caller=loop.go:135 component=sync-loop jobID=9a5ad091-dd0e-37f4-1d6b-a629171eb449 state=in-progress
ts=2020-02-10T15:06:44.273165673Z caller=releaser.go:59 component=sync-loop jobID=9a5ad091-dd0e-37f4-1d6b-a629171eb449 type=release updates=0
ts=2020-02-10T15:06:44.273206373Z caller=releaser.go:61 component=sync-loop jobID=9a5ad091-dd0e-37f4-1d6b-a629171eb449 type=release exit="no images to update for services given"
ts=2020-02-10T15:06:44.369425767Z caller=loop.go:145 component=sync-loop jobID=9a5ad091-dd0e-37f4-1d6b-a629171eb449 state=done success=false err="no changes made in repo"
ts=2020-02-10T15:06:44.580332363Z caller=loop.go:127 component=sync-loop event=refreshed url=ssh://[email protected]/v3/dwpgovuk/Terraform%2520Shared%2520Services/gitops-k8s branch=master HEAD=333b4e174e39588ad2f93e4ce1b5b7fc1261ce24

Additional context

  • Flux version: 1.17.1
  • Kubernetes version: 1.14.8
  • Git provider: Azure DevOps
  • Container registry provider: Azure Container Registry
enhancement

Most helpful comment

Reopening, since the error message should had been more helpful (indicating that there wasn't a match)

All 3 comments

@cloudpea How did you fix it? I think i'm having the same issue......

It was my error i was passing in IMAGE_NAME assuming it was the same name as the workload but they were actually different.

IMAGE_NAME="nginx-demo-app"
WORKLOAD_NAME="nginx-demo-dev"

Reopening, since the error message should had been more helpful (indicating that there wasn't a match)

Was this page helpful?
0 / 5 - 0 ratings