Skip to content

Conversation

@0xda157
Copy link
Contributor

@0xda157 0xda157 commented Dec 3, 2025

Closes: https://github.com/nix-community/stylix/issues/2056

@stylix-automation stylix-automation bot added the topic: flake /flake.nix, /flake.lock, and /flake/ subsystems label Dec 3, 2025
@0xda157 0xda157 force-pushed the builtbot-full branch 2 times, most recently from dc1e859 to 39615fa Compare December 4, 2025 00:50
Copy link
Member

@trueNAHO trueNAHO left a comment

Choose a reason for hiding this comment

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

Although this is not a critical test, it would be great to also evaluate formatter.${system} in ci.buildbot.

@trueNAHO trueNAHO added the backport: release-25.11 To be backported to the release-25.11 stable branch label Dec 4, 2025
@stylix-automation stylix-automation bot added the status: merge conflict Merge conflict label Dec 6, 2025
@0xda157 0xda157 removed the status: merge conflict Merge conflict label Dec 6, 2025
Copy link
Member

@MattSturgeon MattSturgeon left a comment

Choose a reason for hiding this comment

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

A couple prompts/questions about grouping up some of the related/trivial checks for the purpose of reducing the number of workers/jobs buildbot-nix needs to spin up:

indentWidth = 2;
lineWidth = 80;
treefmt = {
projectRootFile = "flake.nix";
Copy link
Member

@MattSturgeon MattSturgeon Dec 6, 2025

Choose a reason for hiding this comment

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

Off-topic: this projectRootFile is no longer correct, now that you have two flake.nix files in-tree.

You could use "flake/dev/flake.nix" or any other path that can only be resolved when at the root of the flake.

We don't really need a flakeRootFile now, since treefmt knows to ask git rev-parse --show-toplevel if it's not defined. However, I don't think treefmt-nix is updated to know that, so it will always define it...

@stylix-automation stylix-automation bot added the topic: ci /.github/ subsystem label Dec 6, 2025
@0xda157 0xda157 force-pushed the builtbot-full branch 2 times, most recently from 4632081 to 7d28206 Compare December 7, 2025 00:40
@MattSturgeon
Copy link
Member

Testing locally:

$ nix repl --option extra-experimental-features pipe-operators

nix-repl> :lf .
Added 26 variables.

nix-repl> :a inputs.nixpkgs.lib
Added 465 variables.

nix-repl> ci.buildbot |> foldlAttrs (acc: system: checks: acc ++ (checks |> attrNames |> map (name: "${system}.${name}"))) []
[
  "aarch64-darwin.devShells"
  "aarch64-darwin.packages"
  "aarch64-darwin.public-and-dev-version-consistency"
  "aarch64-darwin.testbeds"
  "aarch64-linux.devShells"
  "aarch64-linux.packages"
  "aarch64-linux.public-and-dev-version-consistency"
  "aarch64-linux.testbeds"
  "x86_64-darwin.devShells"
  "x86_64-darwin.packages"
  "x86_64-darwin.public-and-dev-version-consistency"
  "x86_64-darwin.testbeds"
  "x86_64-linux.devShells"
  "x86_64-linux.packages"
  "x86_64-linux.public-and-dev-version-consistency"
  "x86_64-linux.testbeds"
]

However, I can't see any of the new attrs being built here: https://buildbot.nix-community.org/#/builders/7620/builds/158

Does buildbot-nix get the attrs to be built from the base branch instead of the head of the PR?

@0xda157
Copy link
Contributor Author

0xda157 commented Dec 7, 2025

Does buildbot-nix get the attrs to be built from the base branch instead of the head of the PR?

it shouldn't. cc @zowoq

@zowoq
Copy link

zowoq commented Dec 7, 2025

https://buildbot.nix-community.org/api/v2/logs/1848491/raw_inline

Looks like they are skipped because they already built and cached?

@0xda157 0xda157 requested a review from trueNAHO December 9, 2025 06:22
Copy link
Member

@trueNAHO trueNAHO left a comment

Choose a reason for hiding this comment

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

What about evaluating formatter.${system} in ci.buildbot? I assume this is a negligible performance hit and ensures everything is tested.

@MattSturgeon
Copy link
Member

MattSturgeon commented Dec 10, 2025

What about evaluating formatter.${system} in ci.buildbot?

The formatter derivation (treefmt) is a dependency of your default devShell, which is built by buildbot-nix:

      ci.buildbot = { inherit (config) devShells; };

(Incidentally, that should probably be a linkFarm, for the same reasons as elsewhere:

      ci.buildbot.devShells = pkgs.linkFarm "devShells" config.devShells;

@0xda157
Copy link
Contributor Author

0xda157 commented Dec 10, 2025

What about evaluating formatter.${system} in ci.buildbot?

The formatter derivation (treefmt) is a dependency of your default devShell, which is built by buildbot-nix:

      ci.buildbot = { inherit (config) devShells; };

(Incidentally, that should probably be a linkFarm, for the same reasons as elsewhere:

      ci.buildbot.devShells = pkgs.linkFarm "devShells" config.devShells;

treefmt is also built as part of the pre-commit drv

Copy link
Member

Choose a reason for hiding this comment

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

If removing this workflow, you'll need to update your ruleset just before you merge; currently this PR is blocked waiting on required checks that'll never run.

Copy link
Member

Choose a reason for hiding this comment

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

If removing this workflow, you'll need to update your ruleset just before you merge

Will this not automatically be updated once this workflow is no longer on the target master branch? In that case, pending PRs that are not rebased on top of this patchset will implicitly use an incomplete Buildbot CI, meaning pending PRs should be rebased before merging.

currently this PR is blocked waiting on required checks that'll never run.

I force merged this PR for now.

Copy link
Member

Choose a reason for hiding this comment

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

Will this not automatically be updated once this workflow is no longer on the target master branch? In that case, pending PRs that are not rebased on top of this patchset will implicitly use an incomplete Buildbot CI, meaning pending PRs should be rebased before merging.

No. Required status checks relates to the name of the status check, it has nothing to do with the workflow. For workflows, the status check name is the same as the job name.

Currently your ruleset will have something like:

  • Required status checks:
    • "x86_64-linux"
    • "aarch64-linux"
    • "x86_64-darwin"
    • "aarch64-darwin"

I.e. it expects status checks with each of the above names to be reported as "successful" or "skipped". It doesn't know or care that these come from jobs in the check.yml workflow.

You need to update your ruleset to instead expect the nix-build status check, as used by buildbot. Or, for belts and braces, nix-eval and nix-build.

In that case, pending PRs that are not rebased on top of this patchset will implicitly use an incomplete Buildbot CI

That's already the case, and is unrelated to your ruleset. Buildbot will run on all branches, using that branch's configuration and flake outputs.

Other PRs not rebased on this should still run the GHA workflow, since it is still present in their branch. You'll have to manually pay attention to this during the transition period once it is not a "required" status check.

Even without "required status checks", you will still notice the big red ❌ on the PR indicating that at least some CI thing failed.

Copy link
Member

Choose a reason for hiding this comment

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

Will this not automatically be updated once this workflow is no longer on the target master branch? In that case, pending PRs that are not rebased on top of this patchset will implicitly use an incomplete Buildbot CI, meaning pending PRs should be rebased before merging.

No. Required status checks relates to the name of the status check, it has nothing to do with the workflow. For workflows, the status check name is the same as the job name.

Currently your ruleset will have something like:

  • Required status checks:
    • "x86_64-linux"
    • "aarch64-linux"
    • "x86_64-darwin"
    • "aarch64-darwin"

I.e. it expects status checks with each of the above names to be reported as "successful" or "skipped". It doesn't know or care that these come from jobs in the check.yml workflow.

You need to update your ruleset to instead expect the nix-build status check, as used by buildbot. Or, for belts and braces, nix-eval and nix-build.

Thanks as always for the thorough explanation.

Based on the CI status from commit 551df12 ("flake: add remaining drvs to ci.buildbot (#2060)"), it seems the buildbot/nix-build, buildbot/nix-effects, and buildbot/nix-eval checks are already included. According to nix-community/infra#2027 (comment), this happened automatically. In that case, only the following assumed entries have to be removed:

  • "x86_64-linux"
  • "aarch64-linux"
  • "x86_64-darwin"
  • "aarch64-darwin"

AFAICT, I do not have permission to view or modify the rulesets. IIUC, @nix-community/stylix-committers seems to indicate that @danth has the necessary permissions. IIRC, #655 (comment) is the last time @danth changed the rulesets.

In that case, pending PRs that are not rebased on top of this patchset will implicitly use an incomplete Buildbot CI

That's already the case, and is unrelated to your ruleset. Buildbot will run on all branches, using that branch's configuration and flake outputs.

Other PRs not rebased on this should still run the GHA workflow, since it is still present in their branch. You'll have to manually pay attention to this during the transition period once it is not a "required" status check.

Even without "required status checks", you will still notice the big red ❌ on the PR indicating that at least some CI thing failed.

I suppose unless we force merge, the broken CI will be obvious enough that no extra precautions are needed.

Copy link
Member

@MattSturgeon MattSturgeon Dec 25, 2025

Choose a reason for hiding this comment

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

The point of required status checks is to make "force" merging necessary when the specified check failed (or hasn't run).

I.e. you can't normally merge a PR until all required status checks have finished successfully (or been skipped).

The required status checks ruleset rule doesn't affect which checks actually run.

Any repo admin or owner, and any org owner, can manage rulesets. Cc @zowoq.

Copy link
Member

@danth danth Dec 25, 2025

Choose a reason for hiding this comment

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

I've updated the ruleset to require the new Buildbot checks, and removed the old GitHub Actions ones. Existing PRs will show the Buildbot checks as "expected" until a new commit is pushed, triggering a CI run.

Copy link
Member

@trueNAHO trueNAHO left a comment

Choose a reason for hiding this comment

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

LGTM.

@trueNAHO trueNAHO merged commit 551df12 into nix-community:master Dec 24, 2025
3 checks passed
@stylix-automation
Copy link
Contributor

Successfully created backport PR for release-25.11:

@github-actions github-actions bot added the has: port to stable This has been backported to the latest stable branch label Dec 24, 2025
@0xda157 0xda157 deleted the builtbot-full branch December 26, 2025 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport: release-25.11 To be backported to the release-25.11 stable branch has: port to stable This has been backported to the latest stable branch topic: ci /.github/ subsystem topic: flake /flake.nix, /flake.lock, and /flake/ subsystems

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants