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

chore: use yamlfmt for all yaml files (but not helm templates) #2130

Merged
merged 3 commits into from
Jun 17, 2024

Conversation

corneliusroemer
Copy link
Contributor

@corneliusroemer corneliusroemer commented Jun 10, 2024

Summary

  • Add yamlfmt config to root
  • Recommend yamlfmt vscode extension

This formatter with current config doesn't wrap long lines, which saves us a lot of lines.

Install formatter with:

go install github.com/google/yamlfmt/cmd/yamlfmt@latest

Blog writeup on the formatter: https://til.simonwillison.net/yaml/yamlfmt

Alternative to #2124

@corneliusroemer corneliusroemer added the preview Triggers a deployment to argocd label Jun 10, 2024
@corneliusroemer corneliusroemer mentioned this pull request Jun 10, 2024
@anna-parker
Copy link
Contributor

Could you check if this formatter also for some reasons breaks kubernetes/loculus/templates/keycloak-config-map.yaml? #2124 (review)

@anna-parker
Copy link
Contributor

anna-parker commented Jun 11, 2024

@corneliusroemer I just installed using the instructions in https://github.com/google/yamlfmt and tried to run

$ yamlfmt .                             

encountered the following formatting errors:
loculus/templates/loculus-backend-service.yaml: yaml: line 5: did not find expected node content
loculus/templates/loculus-database-service.yaml: yaml: did not find expected node content
loculus/templates/loculus-database-standin.yaml: yaml: did not find expected node content
loculus/templates/keycloak-service.yaml: yaml: line 5: did not find expected node content
loculus/templates/keycloak-database-deployment.yaml: yaml: did not find expected node content
loculus/templates/ingest-deployment.yaml: yaml: did not find expected node content
loculus/templates/keycloak-deployment.yaml: yaml: did not find expected node content
loculus/templates/loculus-preprocessing-config.yaml: yaml: did not find expected node content
loculus/templates/lapis-silo-database-config.yaml: yaml: did not find expected node content
loculus/templates/lapis-silo-deployment.yaml: yaml: did not find expected node content
loculus/templates/secrets.yaml: yaml: did not find expected node content
loculus/templates/ingressroute.yaml: yaml: line 7: did not find expected node content
loculus/templates/loculus-preprocessing-deployment.yaml: yaml: did not find expected node content
loculus/templates/lapis-service.yaml: yaml: did not find expected node content
loculus/templates/lapis-ingress.yaml: yaml: did not find expected node content
loculus/templates/website-service.yaml: yaml: line 5: did not find expected node content
loculus/templates/ingest-config.yaml: yaml: did not find expected node content
loculus/templates/loculus-backend.yaml: yaml: did not find expected node content
loculus/templates/loculus-website.yaml: yaml: did not find expected node content
loculus/templates/loculus-website-config.yaml: yaml: did not find expected node content
loculus/templates/keycloak-database-service.yaml: yaml: did not find expected node content
loculus/templates/keycloak-config-map.yaml: yaml: did not find expected node content

It looks like this still has some issues for helm charts: google/yamlfmt#114

@anna-parker
Copy link
Contributor

Decided to create a new comment for clarity. From reading the issue this just means that this formatter will skip over helm templates - which is actually good as the other formatter that I tried: https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml didn't do this and because of that incorrectly reformatted sections of the template.

So I am very happy with switching to this formatter :-)

@corneliusroemer corneliusroemer removed the preview Triggers a deployment to argocd label Jun 11, 2024
Resolves #2117

chore(deps): bump the minorandpatch group in /docs with 2 updates (#2126)

Bumps the minorandpatch group in /docs with 2 updates: [@astrojs/starlight](https://github.com/withastro/starlight/tree/HEAD/packages/starlight) and [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro).

Updates `@astrojs/starlight` from 0.23.2 to 0.24.1
- [Release notes](https://github.com/withastro/starlight/releases)
- [Changelog](https://github.com/withastro/starlight/blob/main/packages/starlight/CHANGELOG.md)
- [Commits](https://github.com/withastro/starlight/commits/@astrojs/[email protected]/packages/starlight)

Updates `astro` from 4.9.2 to 4.10.1
- [Release notes](https://github.com/withastro/astro/releases)
- [Changelog](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md)
- [Commits](https://github.com/withastro/astro/commits/[email protected]/packages/astro)

---
updated-dependencies:
- dependency-name: "@astrojs/starlight"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minorandpatch
- dependency-name: astro
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minorandpatch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

chore(deps-dev): bump uuid from 9.0.1 to 10.0.0 in /website (#2129)

Bumps [uuid](https://github.com/uuidjs/uuid) from 9.0.1 to 10.0.0.
- [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md)
- [Commits](uuidjs/uuid@v9.0.1...v10.0.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

chore: format values.yaml with yamlfmt

Add yamlfmt config to root
Recommend yamlfmt vscode extension

use newest values.yaml from main
Copy link

✅dependabot config looks good 👍

@corneliusroemer corneliusroemer changed the title chore: format values.yaml with yamlfmt chore: use yamlfmt for all yaml files (but not helm templates) Jun 17, 2024
@corneliusroemer corneliusroemer added the preview Triggers a deployment to argocd label Jun 17, 2024
@corneliusroemer corneliusroemer merged commit f7401b2 into main Jun 17, 2024
14 checks passed
@corneliusroemer corneliusroemer deleted the yamlfmt branch June 17, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Triggers a deployment to argocd
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants