Skip to content

Print the configuration hash of failing tests - #1394

Closed
cbarrete wants to merge 1 commit into
facebook:mainfrom
cbarrete:print-failing-test-config
Closed

Print the configuration hash of failing tests#1394
cbarrete wants to merge 1 commit into
facebook:mainfrom
cbarrete:print-failing-test-config

Conversation

@cbarrete

Copy link
Copy Markdown
Contributor

This mirrors the behavior of buck2 build.

Before:

3 TESTS FAILED
  ✗ root//:tests
  ✗ root//:tests
  ✗ root//:tests

After:

3 TESTS FAILED
  ✗ root//:tests (cfg:<empty>#bc315f4ba533984d)
  ✗ root//:tests (cfg:<empty>#da5b993178d15eca)
  ✗ root//:tests (cfg:<empty>#9251783cb051b3f7)

This mirrors the behavior of `buck2 build`.

Before:

```
3 TESTS FAILED
  ✗ root//:tests
  ✗ root//:tests
  ✗ root//:tests
```

After:

```
3 TESTS FAILED
  ✗ root//:tests (cfg:<empty>#bc315f4ba533984d)
  ✗ root//:tests (cfg:<empty>#da5b993178d15eca)
  ✗ root//:tests (cfg:<empty>#9251783cb051b3f7)
```
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 22, 2026
@meta-codesync

meta-codesync Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

This pull request has been imported. If you are a Meta employee, you can view this in D113167521. (Because this pull request was imported automatically, there will not be any future comments.)

@scottcao scottcao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review automatically exported from Phabricator review in Meta.

@8Keep

8Keep commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

@cbarrete I notice in your configuration hashes that you have printed have (cfg:<empty>#9251783cb051b3f7)

Do you know how to configure named configurations? I'm not sure if it's documented anywhere. You can have a set of constraints where you configure names so it can be more human friendly instead of just a hash, so you could have (cfg:linux-opt-clang-x86_64-etc#blahhashy) for the most useful constraints.

https://github.com/facebook/buck2/blob/main/prelude/cfg/modifier/name.bzl

@cbarrete

Copy link
Copy Markdown
Contributor Author
  1. I had no idea, thanks!
  2. I'm pretty sure it's not documented
  3. Unless I'm misreading the implementation, it (currently) only works with that hard coded list of constraint settings, no?

@8Keep

8Keep commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Yes, it's probably hard coded

Would love a PR that makes it more usable for open source

@cbarrete

Copy link
Copy Markdown
Contributor Author

I'm putting this in my todo list :)

@meta-codesync meta-codesync Bot closed this in aa1cbe5 Jul 24, 2026
@meta-codesync meta-codesync Bot added the Merged label Jul 24, 2026
@meta-codesync

meta-codesync Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

@8Keep merged this pull request in aa1cbe5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants