this post was submitted on 03 Jan 2025
90 points (95.0% liked)

Programming

20483 readers
18 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

A 10 minute read covering some YAML edge-cases that you should have in mind when writing complex YAML files

you are viewing a single comment's thread
view the rest of the comments
[–] tyler@programming.dev 37 points 5 months ago (3 children)

You shouldn’t write complex yaml files. Keep it simple and yaml is great. Do complex stuff and you’ll hate your life.

[–] ruk_n_rul@monyet.cc 25 points 5 months ago (3 children)

If you write your own tooling then it's great. The vast majority of us are using other people's tooling and have to deal with their imposed complexity. I for one hate GitHub actions with a passion.

[–] tyler@programming.dev 11 points 5 months ago

None of the complexity of GitHub actions would be solved with any other configuration language. It needs to be a full scripting language at minimum. The problems with GHA have nothing to do with yaml.

[–] atzanteol@sh.itjust.works 7 points 5 months ago* (last edited 5 months ago)

I'm convinced everybody who told me that "GitHub actions are great!" were just part of one big prank.

[–] dotslashme 6 points 5 months ago (2 children)

I have the same feeling about kubernetes.

[–] rottingleaf@lemmy.world 1 points 5 months ago

Kubernetes seems closer to the top of the tower of Babel than to the basement. Part of it anyway.

[–] corsicanguppy@lemmy.ca 1 points 5 months ago

Kubes. Not even once?

[–] eager_eagle@lemmy.world 4 points 5 months ago (2 children)

I wouldn't call those examples complex

[–] ripripripriprip@lemmy.world 2 points 5 months ago

I think that proves the author's point. I also think you're right in regards to the comment you replied to.

[–] tyler@programming.dev 1 points 4 months ago

The description of the post said “complex yaml files”.

[–] rottingleaf@lemmy.world 2 points 5 months ago (1 children)

If you keep it simple, then probably JSON is easier. In other cases too.

[–] tyler@programming.dev 1 points 4 months ago

JSON is not easier for most strings. Anything multiline for example.

But yaml is a superset of JSON so you literally can use JSON and it’s still valid YAML.