Skip to content

ci/treefmt: add yamlfmt#416115

Merged
wolfgangwalther merged 2 commits intoNixOS:masterfrom
wolfgangwalther:ci-treefmt-yamlfmt
Jun 15, 2025
Merged

ci/treefmt: add yamlfmt#416115
wolfgangwalther merged 2 commits intoNixOS:masterfrom
wolfgangwalther:ci-treefmt-yamlfmt

Conversation

@wolfgangwalther
Copy link
Contributor

@wolfgangwalther wolfgangwalther commented Jun 12, 2025

Most workflow files are already well formatted, but to make it easier to keep it that way, we can add yamlfmt.

I personally have a preference for non-indented arrays for YAML, but wanted to avoid bigger diffs here - the status-quo clearly are indented arrays.

Things done


Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: julia Julia is a high-level, high-performance dynamic language for technical computing. 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: policy discussion Discuss policies to work in and around Nixpkgs backport release-24.11 labels Jun 12, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jun 12, 2025
@wolfgangwalther
Copy link
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 416115 --package antora.tests --package tfk8s.tests
Commit: 2017655993e2a92574e3dcad425ad368a84b4f4f


x86_64-linux

✅ 2 packages built:
  • antora.tests.run
  • tfk8s.tests.sample1

aarch64-linux

✅ 2 packages built:
  • antora.tests.run
  • tfk8s.tests.sample1

x86_64-darwin

✅ 2 packages built:
  • antora.tests.run
  • tfk8s.tests.sample1

aarch64-darwin

✅ 2 packages built:
  • antora.tests.run
  • tfk8s.tests.sample1

@wolfgangwalther wolfgangwalther marked this pull request as ready for review June 12, 2025 12:19
@philiptaron
Copy link
Contributor

I'm recusing myself from this review because it involves thinking about the format of YAML.

@wolfgangwalther
Copy link
Contributor Author

Well, that's kind of the point of this PR: To not have to think about formatting yaml for workflow files anymore. treefmt will do it. :)

Copy link
Contributor

@SigmaSquadron SigmaSquadron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If at all possible, I'd like to see two commits: one for the treewide format, and another that actually adds the yamlfmt configuration to treefmt-nix

This applies changes from running yamlfmt with the `retain_line_breaks`
formatting option enabled.
Most workflow files are already well formatted, but to make it easier to
keep it that way, we can add yamlfmt.

I personally have a preference for non-indented arrays for YAML, but
wanted to avoid bigger diffs here - the status-quo clearly are indented
arrays.

Some changes are made manually to the get-merge-commit action and the
issue templates. Those would otherwise make yamlfmt misbehave on those.
@wolfgangwalther
Copy link
Contributor Author

Right, good point. This should make it easier to review. Especially because some of the changes are not auto-generated, but were done by hand - I left those in the second commit.

Copy link
Contributor

@philiptaron philiptaron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I said I was recusing myself but evidently I can hold my nose and read about YAML on a Friday.

https://yaml-multiline.info/ is cursed knowledge but I guess not totally cursed.

@wolfgangwalther wolfgangwalther merged commit 8ba5040 into NixOS:master Jun 15, 2025
24 of 25 checks passed
@wolfgangwalther wolfgangwalther deleted the ci-treefmt-yamlfmt branch June 15, 2025 10:10
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Jun 15, 2025

Backport failed for release-24.11, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-24.11
git worktree add -d .worktree/backport-416115-to-release-24.11 origin/release-24.11
cd .worktree/backport-416115-to-release-24.11
git switch --create backport-416115-to-release-24.11
git cherry-pick -x 66981875e8cb8ab8a4bd0eb54bd1371de91d084d 8ec23df6f6c8e647719cbbded5376fd83679a28b

@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Jun 15, 2025

Backport failed for release-25.05, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-25.05
git worktree add -d .worktree/backport-416115-to-release-25.05 origin/release-25.05
cd .worktree/backport-416115-to-release-25.05
git switch --create backport-416115-to-release-25.05
git cherry-pick -x 66981875e8cb8ab8a4bd0eb54bd1371de91d084d 8ec23df6f6c8e647719cbbded5376fd83679a28b

@wolfgangwalther
Copy link
Contributor Author

Of course, I should have rebased before merge. Two other formatting nits were introduced on master meanwhile, fixed in #416919.

@wolfgangwalther wolfgangwalther added the 8.has: port to stable This PR already has a backport to the stable release. label Jun 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: julia Julia is a high-level, high-performance dynamic language for technical computing. 6.topic: policy discussion Discuss policies to work in and around Nixpkgs 8.has: port to stable This PR already has a backport to the stable release. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants