jenkins-x / jx

Jenkins X provides automated CI+CD for Kubernetes with Preview Environments on Pull Requests using Cloud Native pipelines from Tekton
https://jenkins-x.io/
Apache License 2.0
4.57k stars 786 forks source link

unwanted changes to releases.yaml causing merge conflicts when oci used #8349

Open danjmccay opened 2 years ago

danjmccay commented 2 years ago

I successfully deployed a tool (kubecost) from an oci chart repo (oci://public.ecr.aws/kubecost)

filepath: ""
environments:
  default:
    values:
    - jx-values.yaml
namespace: kubecost
repositories:
- name: kubecost
  url: public.ecr.aws/kubecost
  oci: true
releases:
- chart: kubecost/cost-analyzer
  version: 1.96.0
  name: cost-analyzer
  values:
  - values.yaml
  - jx-values.yaml
templates: {}
renderedvalues: {}

But since then, every time the bootjob runs there is an unwanted change to docs/releases.yaml. 'firstDeployed' and 'lastDeployed' are updated for this chart when no version change has occured.

- namespace: kubecost
  path: helmfiles/kubecost/helmfile.yaml
  releases:
  - - firstDeployed: "2022-09-06T13:46:49Z"
  -  lastDeployed: "2022-09-06T13:46:49Z"
  + - firstDeployed: "2022-09-06T13:50:40Z"
  +  lastDeployed: "2022-09-06T13:50:40Z"

This is causing many merge conflicts to arise.

Expected behaviour: Release from OCI repos should behave the same as non OCI repos. The 'firstDeployed' and 'lastDeployed' values in release.yaml should not be updated with every bootjob if there has been no version change.

msvticket commented 2 years ago

Which version are you running? In particular what version of the jx-boot image is used to execute the boot job. It can be seen in versionStream/git-operator/job.yaml.

Have you modified versionStream/src/Makefile.mk and in that case how? How does your Makefile look like?

Is it really the boot job that does these changes to docs/releases.yaml and not the pull request pipeline?