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

YAML: Comments seemingly randomly chosen for removal #1351

Open
1 task done
jimid27 opened this issue May 30, 2023 · 1 comment
Open
1 task done

YAML: Comments seemingly randomly chosen for removal #1351

jimid27 opened this issue May 30, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@jimid27
Copy link

jimid27 commented May 30, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Currently, updatecli is removing some comments that we have in place in our YAML definitions. Specifically those comments that are at the beginning of a file. Feels similar-ish to #903
Seems to ignore most if not all comments that are inline w/ code fine but removes most comments that are on their own line.

Screenshot 2023-05-30 at 11 19 32 AM
Screenshot 2023-05-30 at 11 26 19 AM

Expected Behavior

Comments are ignored by UpdateCLI for YAML unless specifically included in the manifest definition.

Steps To Reproduce

Manifest (excerpt related to above):

---
sources:
  istio_gateway:
    kind: helmchart
    spec:
      url: https://istio-release.storage.googleapis.com/charts
      name: gateway
      version: 1.*.*
  prometheus_postgres:
    kind: helmchart
    spec:
      url: https://prometheus-community.github.io/helm-charts
      name: prometheus-postgres-exporter
      version: 4.*.*
conditions: {}
targets:
  istio_gateway:
    name: bump chart dependencies
    kind: yaml
    spec:
      file: apps/istio/dataplane/gateway-helmrelease.yaml
      key: spec.chart.spec.version
    sourceid: istio_gateway
  istio_gateway_label:
    name: bump chart dependencies
    kind: yaml
    spec:
      file: apps/istio/dataplane/gateway-helmrelease.yaml
      key: 'spec.values.labels.service\.istio\.io/canonical-revision'
    sourceid: istio_gateway
  prometheus_exporter:
    name: bump chart dependencies
    kind: yaml
    spec:
      file: apps/monitoring/prometheus/metrics/postgres-exporter.yaml
      key: spec.chart.spec.version
    sourceid: prometheus_postgres

Environment

- OS: Ubuntu 22.04 (ubuntu-latest GHA)
- updatecli: v0.52.0

Anything else?

No response

@jimid27 jimid27 added the bug Something isn't working label May 30, 2023
@olblak
Copy link
Member

olblak commented May 30, 2023

Thanks for opening this issue, the problem that you report seems to be related to goccy/go-yaml#345 and would be addressed in goccy/go-yaml#346

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

2 participants