deploy-sourcegraph icon indicating copy to clipboard operation
deploy-sourcegraph copied to clipboard

demonstration: sg ops update produces nasty formatting diffs / doesn't work as expected

Open emidoots opened this issue 3 years ago • 2 comments

DO NOT MERGE

This is a demonstration that sg ops update doesn't really work today.

This change was produced via:

sg ops update-images -t 187572_2022-12-06_cbecc5321c7d -kind k8s ./base

Most changes here are innocuous, but a few formatting changes here are quite aggressive:

  • It wants to flatten this ConfigMap into a single line: https://github.com/sourcegraph/deploy-sourcegraph/pull/4207/files#diff-0b5302eb7e87647476e54c051bfa144b3179167ec2134751574c21a7a36565aa
  • It also wants to flatten this ConfigMap into a single line: base/prometheus/prometheus.ConfigMap.yaml
  • Many files formatting is changed quite extensively, which will introduce some rather nasty conflicts for those trying to merge our upstream into their fork.

emidoots avatar Dec 06 '22 19:12 emidoots

This appears to produce the least intrusive diff (still formatting in some files, but not too bad):

sg ops update-images -t 187572_2022-12-06_cbecc5321c7d -kind k8s ./base
git checkout -- **/*.ConfigMap.yaml **/*.Role.yaml **/*.Ingress.yaml **/*.Service.yaml **/*.IndexerService.yaml
git add base/

emidoots avatar Dec 06 '22 20:12 emidoots

Another complaint/observation:

sg ops update-images cannot update the pure-docker/ directory in https://github.com/sourcegraph/deploy-sourcegraph-docker which means the changes it wants to make to that repository are always incomplete (it would be bad to merge a change there to only Docker Compose and not the bash scripts.)

emidoots avatar Dec 06 '22 20:12 emidoots